From 9a1f9b96ee922b7826b2619544e0c04fa4f7896d Mon Sep 17 00:00:00 2001 From: Lionel Debroux Date: Sun, 12 Nov 2023 22:29:47 +0100 Subject: [PATCH] WIP libticalcs: promote Nspire folder deletion to a top-level operation. Adjust test_ticalcs_2 and torture_ticalcs. Fixes #84. Signed-off-by: Lionel Debroux --- libticalcs/trunk/src/calc_00.cc | 12 ++++- libticalcs/trunk/src/calc_73.cc | 24 ++++++---- libticalcs/trunk/src/calc_84p.cc | 42 +++++++++++------ libticalcs/trunk/src/calc_89t.cc | 6 ++- libticalcs/trunk/src/calc_8x.cc | 48 +++++++++++++------- libticalcs/trunk/src/calc_9x.cc | 48 +++++++++++++------- libticalcs/trunk/src/calc_nsp.cc | 36 ++++++++++++++- libticalcs/trunk/src/calc_xx.cc | 45 ++++++++++++++++++ libticalcs/trunk/src/internal.h | 1 + libticalcs/trunk/src/ticalcs.h | 36 +++------------ libticalcs/trunk/tests/test_ticalcs_2.cc | 58 +++++++++++++++++------- libticalcs/trunk/tests/torture_ticalcs.c | 20 ++++---- 12 files changed, 259 insertions(+), 117 deletions(-) diff --git a/libticalcs/trunk/src/calc_00.cc b/libticalcs/trunk/src/calc_00.cc index 6f64cf0d..bff32267 100644 --- a/libticalcs/trunk/src/calc_00.cc +++ b/libticalcs/trunk/src/calc_00.cc @@ -218,6 +218,12 @@ int noop_get_lab_equipment_data (CalcHandle* handle, CalcModel model, CalcLabEqu return 0; } +int noop_del_folder (CalcHandle* handle, VarRequest* vr) +{ + (void)handle, (void)vr; + return 0; +} + extern const CalcFncts calc_00 = { CALC_NONE, @@ -256,7 +262,8 @@ extern const CalcFncts calc_00 = "", /* send_all_vars_backup */ "", /* recv_all_vars_backup */ "", /* send_lab_equipment_data */ - "" /* get_lab_equipment_data */ }, + "", /* get_lab_equipment_data */ + "", /* del_folder */ }, &noop_is_ready, &noop_send_key, &noop_execute, @@ -287,5 +294,6 @@ extern const CalcFncts calc_00 = &noop_send_all_vars_backup, &noop_recv_all_vars_backup, &noop_send_lab_equipment_data, - &noop_get_lab_equipment_data + &noop_get_lab_equipment_data, + &noop_del_folder, }; diff --git a/libticalcs/trunk/src/calc_73.cc b/libticalcs/trunk/src/calc_73.cc index fefd28e6..97ad7331 100644 --- a/libticalcs/trunk/src/calc_73.cc +++ b/libticalcs/trunk/src/calc_73.cc @@ -1670,7 +1670,8 @@ extern const CalcFncts calc_73 = "", /* send_all_vars_backup */ "", /* recv_all_vars_backup */ "", /* send_lab_equipment_data */ - "" /* get_lab_equipment_data */ }, + "", /* get_lab_equipment_data */ + "", /* del_folder */ }, &is_ready, &send_key, &execute, @@ -1701,7 +1702,8 @@ extern const CalcFncts calc_73 = &noop_send_all_vars_backup, &noop_recv_all_vars_backup, &noop_send_lab_equipment_data, - &noop_get_lab_equipment_data + &noop_get_lab_equipment_data, + &noop_del_folder, }; extern const CalcFncts calc_83p = @@ -1744,7 +1746,8 @@ extern const CalcFncts calc_83p = "", /* send_all_vars_backup */ "", /* recv_all_vars_backup */ "", /* send_lab_equipment_data */ - "" /* get_lab_equipment_data */ }, + "", /* get_lab_equipment_data */ + "", /* del_folder */ }, &is_ready, &send_key, &execute, @@ -1775,7 +1778,8 @@ extern const CalcFncts calc_83p = &noop_send_all_vars_backup, &noop_recv_all_vars_backup, &noop_send_lab_equipment_data, - &noop_get_lab_equipment_data + &noop_get_lab_equipment_data, + &noop_del_folder, }; extern const CalcFncts calc_84p = @@ -1818,7 +1822,8 @@ extern const CalcFncts calc_84p = "", /* send_all_vars_backup */ "", /* recv_all_vars_backup */ "", /* send_lab_equipment_data */ - "" /* get_lab_equipment_data */ }, + "", /* get_lab_equipment_data */ + "", /* del_folder */ }, &is_ready, &send_key, &execute, @@ -1849,7 +1854,8 @@ extern const CalcFncts calc_84p = &noop_send_all_vars_backup, &noop_recv_all_vars_backup, &noop_send_lab_equipment_data, - &noop_get_lab_equipment_data + &noop_get_lab_equipment_data, + &noop_del_folder, }; extern const CalcFncts calc_84pcse = @@ -1892,7 +1898,8 @@ extern const CalcFncts calc_84pcse = "", /* send_all_vars_backup */ "", /* recv_all_vars_backup */ "", /* send_lab_equipment_data */ - "" /* get_lab_equipment_data */ }, + "", /* get_lab_equipment_data */ + "", /* del_folder */ }, &is_ready, &send_key, &execute, @@ -1923,5 +1930,6 @@ extern const CalcFncts calc_84pcse = &noop_send_all_vars_backup, &noop_recv_all_vars_backup, &noop_send_lab_equipment_data, - &noop_get_lab_equipment_data + &noop_get_lab_equipment_data, + &noop_del_folder, }; diff --git a/libticalcs/trunk/src/calc_84p.cc b/libticalcs/trunk/src/calc_84p.cc index be54a91e..70d04008 100644 --- a/libticalcs/trunk/src/calc_84p.cc +++ b/libticalcs/trunk/src/calc_84p.cc @@ -2111,7 +2111,8 @@ extern const CalcFncts calc_84p_usb = "2P", /* send_all_vars_backup */ "2P", /* recv_all_vars_backup */ "", /* send_lab_equipment_data */ - "" /* get_lab_equipment_data */ }, + "", /* get_lab_equipment_data */ + "", /* del_folder */ }, &is_ready, &send_key, &execute, @@ -2142,7 +2143,8 @@ extern const CalcFncts calc_84p_usb = &send_all_vars_backup, &tixx_recv_all_vars_backup, &noop_send_lab_equipment_data, - &noop_get_lab_equipment_data + &noop_get_lab_equipment_data, + &noop_del_folder, }; extern const CalcFncts calc_84pcse_usb = @@ -2186,7 +2188,8 @@ extern const CalcFncts calc_84pcse_usb = "2P", /* send_all_vars_backup */ "2P", /* recv_all_vars_backup */ "", /* send_lab_equipment_data */ - "" /* get_lab_equipment_data */ }, + "", /* get_lab_equipment_data */ + "", /* del_folder */ }, &is_ready, &send_key, &execute, @@ -2217,7 +2220,8 @@ extern const CalcFncts calc_84pcse_usb = &send_all_vars_backup, &tixx_recv_all_vars_backup, &noop_send_lab_equipment_data, - &noop_get_lab_equipment_data + &noop_get_lab_equipment_data, + &noop_del_folder, }; extern const CalcFncts calc_83pce_usb = @@ -2261,7 +2265,8 @@ extern const CalcFncts calc_83pce_usb = "2P", /* send_all_vars_backup */ "2P", /* recv_all_vars_backup */ "", /* send_lab_equipment_data */ - "" /* get_lab_equipment_data */ }, + "", /* get_lab_equipment_data */ + "", /* del_folder */ }, &is_ready, &send_key, &execute, @@ -2292,7 +2297,8 @@ extern const CalcFncts calc_83pce_usb = &send_all_vars_backup, &tixx_recv_all_vars_backup, &noop_send_lab_equipment_data, - &noop_get_lab_equipment_data + &noop_get_lab_equipment_data, + &noop_del_folder, }; extern const CalcFncts calc_84pce_usb = @@ -2336,7 +2342,8 @@ extern const CalcFncts calc_84pce_usb = "2P", /* send_all_vars_backup */ "2P", /* recv_all_vars_backup */ "", /* send_lab_equipment_data */ - "" /* get_lab_equipment_data */ }, + "", /* get_lab_equipment_data */ + "", /* del_folder */ }, &is_ready, &send_key, &execute, @@ -2367,7 +2374,8 @@ extern const CalcFncts calc_84pce_usb = &send_all_vars_backup, &tixx_recv_all_vars_backup, &noop_send_lab_equipment_data, - &noop_get_lab_equipment_data + &noop_get_lab_equipment_data, + &noop_del_folder, }; extern const CalcFncts calc_82a_usb = @@ -2411,7 +2419,8 @@ extern const CalcFncts calc_82a_usb = "2P", /* send_all_vars_backup */ "2P", /* recv_all_vars_backup */ "", /* send_lab_equipment_data */ - "" /* get_lab_equipment_data */ }, + "", /* get_lab_equipment_data */ + "", /* del_folder */ }, &is_ready, &send_key, &execute, @@ -2442,7 +2451,8 @@ extern const CalcFncts calc_82a_usb = &send_all_vars_backup, &tixx_recv_all_vars_backup, &noop_send_lab_equipment_data, - &noop_get_lab_equipment_data + &noop_get_lab_equipment_data, + &noop_del_folder, }; extern const CalcFncts calc_84pt_usb = @@ -2486,7 +2496,8 @@ extern const CalcFncts calc_84pt_usb = "2P", /* send_all_vars_backup */ "2P", /* recv_all_vars_backup */ "", /* send_lab_equipment_data */ - "" /* get_lab_equipment_data */ }, + "", /* get_lab_equipment_data */ + "", /* del_folder */ }, &is_ready, &send_key, &execute, @@ -2517,7 +2528,8 @@ extern const CalcFncts calc_84pt_usb = &send_all_vars_backup, &tixx_recv_all_vars_backup, &noop_send_lab_equipment_data, - &noop_get_lab_equipment_data + &noop_get_lab_equipment_data, + &noop_del_folder, }; extern const CalcFncts calc_82aep_usb = @@ -2561,7 +2573,8 @@ extern const CalcFncts calc_82aep_usb = "2P", /* send_all_vars_backup */ "2P", /* recv_all_vars_backup */ "", /* send_lab_equipment_data */ - "", /* get_lab_equipment_data */ }, + "", /* get_lab_equipment_data */ + "", /* del_folder */ }, &is_ready, &send_key, &execute, @@ -2592,5 +2605,6 @@ extern const CalcFncts calc_82aep_usb = &send_all_vars_backup, &tixx_recv_all_vars_backup, &noop_send_lab_equipment_data, - &noop_get_lab_equipment_data + &noop_get_lab_equipment_data, + &noop_del_folder, }; diff --git a/libticalcs/trunk/src/calc_89t.cc b/libticalcs/trunk/src/calc_89t.cc index d9ce86f6..a3d6e167 100644 --- a/libticalcs/trunk/src/calc_89t.cc +++ b/libticalcs/trunk/src/calc_89t.cc @@ -1433,7 +1433,8 @@ extern const CalcFncts calc_89t_usb = "2P1L", /* send_all_vars_backup */ "2P1L", /* recv_all_vars_backup */ "", /* send_lab_equipment_data */ - "" /* get_lab_equipment_data */ }, + "", /* get_lab_equipment_data */ + "", /* del_folder */ }, &is_ready, &send_key, &execute, @@ -1464,5 +1465,6 @@ extern const CalcFncts calc_89t_usb = &send_all_vars_backup, &tixx_recv_all_vars_backup, &noop_send_lab_equipment_data, - &noop_get_lab_equipment_data + &noop_get_lab_equipment_data, + &noop_del_folder, }; diff --git a/libticalcs/trunk/src/calc_8x.cc b/libticalcs/trunk/src/calc_8x.cc index 452cb7eb..7db2e9d7 100644 --- a/libticalcs/trunk/src/calc_8x.cc +++ b/libticalcs/trunk/src/calc_8x.cc @@ -1426,7 +1426,8 @@ extern const CalcFncts calc_80 = "", /* send_all_vars_backup */ "", /* recv_all_vars_backup */ "", /* send_lab_equipment_data */ - "" /* get_lab_equipment_data */ }, + "", /* get_lab_equipment_data */ + "", /* del_folder */ }, &noop_is_ready, &noop_send_key, &noop_execute, @@ -1457,7 +1458,8 @@ extern const CalcFncts calc_80 = &noop_send_all_vars_backup, &noop_recv_all_vars_backup, &noop_send_lab_equipment_data, - &noop_get_lab_equipment_data + &noop_get_lab_equipment_data, + &noop_del_folder, }; extern const CalcFncts calc_82 = @@ -1499,7 +1501,8 @@ extern const CalcFncts calc_82 = "", /* send_all_vars_backup */ "", /* recv_all_vars_backup */ "", /* send_lab_equipment_data */ - "" /* get_lab_equipment_data */ }, + "", /* get_lab_equipment_data */ + "", /* del_folder */ }, &noop_is_ready, &noop_send_key, &noop_execute, @@ -1530,7 +1533,8 @@ extern const CalcFncts calc_82 = &noop_send_all_vars_backup, &noop_recv_all_vars_backup, &noop_send_lab_equipment_data, - &noop_get_lab_equipment_data + &noop_get_lab_equipment_data, + &noop_del_folder, }; extern const CalcFncts calc_83 = @@ -1573,7 +1577,8 @@ extern const CalcFncts calc_83 = "", /* send_all_vars_backup */ "", /* recv_all_vars_backup */ "", /* send_lab_equipment_data */ - "" /* get_lab_equipment_data */ }, + "", /* get_lab_equipment_data */ + "", /* del_folder */ }, &noop_is_ready, &send_key, &execute, @@ -1604,7 +1609,8 @@ extern const CalcFncts calc_83 = &noop_send_all_vars_backup, &noop_recv_all_vars_backup, &noop_send_lab_equipment_data, - &noop_get_lab_equipment_data + &noop_get_lab_equipment_data, + &noop_del_folder, }; extern const CalcFncts calc_85 = @@ -1646,7 +1652,8 @@ extern const CalcFncts calc_85 = "", /* send_all_vars_backup */ "", /* recv_all_vars_backup */ "", /* send_lab_equipment_data */ - "" /* get_lab_equipment_data */ }, + "", /* get_lab_equipment_data */ + "", /* del_folder */ }, &noop_is_ready, &noop_send_key, &noop_execute, @@ -1677,7 +1684,8 @@ extern const CalcFncts calc_85 = &noop_send_all_vars_backup, &noop_recv_all_vars_backup, &noop_send_lab_equipment_data, - &noop_get_lab_equipment_data + &noop_get_lab_equipment_data, + &noop_del_folder, }; extern const CalcFncts calc_86 = @@ -1719,7 +1727,8 @@ extern const CalcFncts calc_86 = "", /* send_all_vars_backup */ "", /* recv_all_vars_backup */ "", /* send_lab_equipment_data */ - "" /* get_lab_equipment_data */ }, + "", /* get_lab_equipment_data */ + "", /* del_folder */ }, &noop_is_ready, &send_key, &noop_execute, @@ -1750,7 +1759,8 @@ extern const CalcFncts calc_86 = &noop_send_all_vars_backup, &noop_recv_all_vars_backup, &noop_send_lab_equipment_data, - &noop_get_lab_equipment_data + &noop_get_lab_equipment_data, + &noop_del_folder, }; extern const CalcFncts calc_cbl = @@ -1792,7 +1802,8 @@ extern const CalcFncts calc_cbl = "", /* send_all_vars_backup */ "", /* recv_all_vars_backup */ "", /* send_lab_equipment_data */ - "" /* get_lab_equipment_data */ }, + "", /* get_lab_equipment_data */ + "", /* del_folder */ }, &is_ready, &noop_send_key, &noop_execute, @@ -1823,7 +1834,8 @@ extern const CalcFncts calc_cbl = &noop_send_all_vars_backup, &noop_recv_all_vars_backup, &tixx_send_lab_equipment_data, - &tixx_get_lab_equipment_data + &tixx_get_lab_equipment_data, + &noop_del_folder, }; extern const CalcFncts calc_cbr = @@ -1865,7 +1877,8 @@ extern const CalcFncts calc_cbr = "", /* send_all_vars_backup */ "", /* recv_all_vars_backup */ "", /* send_lab_equipment_data */ - "" /* get_lab_equipment_data */ }, + "", /* get_lab_equipment_data */ + "", /* del_folder */ }, &is_ready, &noop_send_key, &noop_execute, @@ -1896,7 +1909,8 @@ extern const CalcFncts calc_cbr = &noop_send_all_vars_backup, &noop_recv_all_vars_backup, &tixx_send_lab_equipment_data, - &tixx_get_lab_equipment_data + &tixx_get_lab_equipment_data, + &noop_del_folder, }; extern const CalcFncts calc_cbr2 = @@ -1938,7 +1952,8 @@ extern const CalcFncts calc_cbr2 = "", /* send_all_vars_backup */ "", /* recv_all_vars_backup */ "", /* send_lab_equipment_data */ - "" /* get_lab_equipment_data */ }, + "", /* get_lab_equipment_data */ + "", /* del_folder */ }, &is_ready, &noop_send_key, &noop_execute, @@ -1969,5 +1984,6 @@ extern const CalcFncts calc_cbr2 = &noop_send_all_vars_backup, &noop_recv_all_vars_backup, &tixx_send_lab_equipment_data, - &tixx_get_lab_equipment_data + &tixx_get_lab_equipment_data, + &noop_del_folder, }; diff --git a/libticalcs/trunk/src/calc_9x.cc b/libticalcs/trunk/src/calc_9x.cc index f3f2ffc7..a1c335d7 100644 --- a/libticalcs/trunk/src/calc_9x.cc +++ b/libticalcs/trunk/src/calc_9x.cc @@ -1840,7 +1840,8 @@ extern const CalcFncts calc_89 = "2P1L", /* send_all_vars_backup */ "2P1L" /* recv_all_vars_backup */ "", /* send_lab_equipment_data */ - "" /* get_lab_equipment_data */ }, + "", /* get_lab_equipment_data */ + "", /* del_folder */ }, &is_ready, &send_key, &execute, @@ -1871,7 +1872,8 @@ extern const CalcFncts calc_89 = &send_all_vars_backup, &tixx_recv_all_vars_backup, &tixx_send_lab_equipment_data, - &tixx_get_lab_equipment_data + &tixx_get_lab_equipment_data, + &noop_del_folder, }; extern const CalcFncts calc_92p = @@ -1915,7 +1917,8 @@ extern const CalcFncts calc_92p = "2P1L", /* send_all_vars_backup */ "2P1L" /* recv_all_vars_backup */ "", /* send_lab_equipment_data */ - "" /* get_lab_equipment_data */ }, + "", /* get_lab_equipment_data */ + "", /* del_folder */ }, &is_ready, &send_key, &execute, @@ -1946,7 +1949,8 @@ extern const CalcFncts calc_92p = &send_all_vars_backup, &tixx_recv_all_vars_backup, &tixx_send_lab_equipment_data, - &tixx_get_lab_equipment_data + &tixx_get_lab_equipment_data, + &noop_del_folder, }; extern const CalcFncts calc_89t = @@ -1990,7 +1994,8 @@ extern const CalcFncts calc_89t = "2P1L", /* send_all_vars_backup */ "2P1L" /* recv_all_vars_backup */ "", /* send_lab_equipment_data */ - "" /* get_lab_equipment_data */ }, + "", /* get_lab_equipment_data */ + "", /* del_folder */ }, &is_ready, &send_key, &execute, @@ -2021,7 +2026,8 @@ extern const CalcFncts calc_89t = &send_all_vars_backup, &tixx_recv_all_vars_backup, &tixx_send_lab_equipment_data, - &tixx_get_lab_equipment_data + &tixx_get_lab_equipment_data, + &noop_del_folder, }; extern const CalcFncts calc_v2 = @@ -2065,7 +2071,8 @@ extern const CalcFncts calc_v2 = "2P1L", /* send_all_vars_backup */ "2P1L" /* recv_all_vars_backup */ "", /* send_lab_equipment_data */ - "" /* get_lab_equipment_data */ }, + "", /* get_lab_equipment_data */ + "", /* del_folder */ }, &is_ready, &send_key, &execute, @@ -2096,7 +2103,8 @@ extern const CalcFncts calc_v2 = &send_all_vars_backup, &tixx_recv_all_vars_backup, &tixx_send_lab_equipment_data, - &tixx_get_lab_equipment_data + &tixx_get_lab_equipment_data, + &noop_del_folder, }; extern const CalcFncts calc_92 = @@ -2139,7 +2147,8 @@ extern const CalcFncts calc_92 = "", /* send_all_vars_backup */ "", /* recv_all_vars_backup */ "", /* send_lab_equipment_data */ - "" /* get_lab_equipment_data */ }, + "", /* get_lab_equipment_data */ + "", /* del_folder */ }, &is_ready, &send_key, &execute, @@ -2170,7 +2179,8 @@ extern const CalcFncts calc_92 = &noop_send_all_vars_backup, &noop_recv_all_vars_backup, &tixx_send_lab_equipment_data, - &tixx_get_lab_equipment_data + &tixx_get_lab_equipment_data, + &noop_del_folder, }; extern const CalcFncts calc_cbl2 = @@ -2213,7 +2223,8 @@ extern const CalcFncts calc_cbl2 = "", /* send_all_vars_backup */ "", /* recv_all_vars_backup */ "", /* send_lab_equipment_data */ - "" /* get_lab_equipment_data */ }, + "", /* get_lab_equipment_data */ + "", /* del_folder */ }, &is_ready, &noop_send_key, &noop_execute, @@ -2244,7 +2255,8 @@ extern const CalcFncts calc_cbl2 = &noop_send_all_vars_backup, &noop_recv_all_vars_backup, &tixx_send_lab_equipment_data, - &tixx_get_lab_equipment_data + &tixx_get_lab_equipment_data, + &noop_del_folder, }; extern const CalcFncts calc_labpro = @@ -2287,7 +2299,8 @@ extern const CalcFncts calc_labpro = "", /* send_all_vars_backup */ "", /* recv_all_vars_backup */ "", /* send_lab_equipment_data */ - "" /* get_lab_equipment_data */ }, + "", /* get_lab_equipment_data */ + "", /* del_folder */ }, &is_ready, &noop_send_key, &noop_execute, @@ -2318,7 +2331,8 @@ extern const CalcFncts calc_labpro = &noop_send_all_vars_backup, &noop_recv_all_vars_backup, &tixx_send_lab_equipment_data, - &tixx_get_lab_equipment_data + &tixx_get_lab_equipment_data, + &noop_del_folder, }; extern const CalcFncts calc_tipresenter = @@ -2360,7 +2374,8 @@ extern const CalcFncts calc_tipresenter = "", /* send_all_vars_backup */ "", /* recv_all_vars_backup */ "", /* send_lab_equipment_data */ - "" /* get_lab_equipment_data */ }, + "", /* get_lab_equipment_data */ + "", /* del_folder */ }, &is_ready, &noop_send_key, &noop_execute, @@ -2391,5 +2406,6 @@ extern const CalcFncts calc_tipresenter = &noop_send_all_vars_backup, &noop_recv_all_vars_backup, &noop_send_lab_equipment_data, - &noop_get_lab_equipment_data + &noop_get_lab_equipment_data, + &noop_del_folder, }; diff --git a/libticalcs/trunk/src/calc_nsp.cc b/libticalcs/trunk/src/calc_nsp.cc index 781921fc..ce5ece77 100644 --- a/libticalcs/trunk/src/calc_nsp.cc +++ b/libticalcs/trunk/src/calc_nsp.cc @@ -1138,6 +1138,36 @@ static int rename_var (CalcHandle* handle, VarRequest* oldname, VarRequest* new return ret; } +static int del_folder (CalcHandle* handle, VarRequest* vr) +{ + char *utf8; + char *path; + int ret; + + ret = nsp_session_open(handle, NSP_SID_FILE_MGMT); + if (ret) + { + return ret; + } + + path = g_strconcat("/", vr->folder, NULL); + utf8 = ticonv_varname_to_utf8(handle->model, path, -1); + ticalcs_slprintf(handle->updat->text, sizeof(handle->updat->text), _("Deleting %s..."), utf8); + ticonv_utf8_free(utf8); + ticalcs_update_label(handle); + + ret = nsp_cmd_s_del_folder(handle, path); + g_free(path); + if (!ret) + { + ret = nsp_cmd_r_del_folder(handle); + } + + DO_CLOSE_SESSION(handle); + + return ret; +} + #define CALC_NSP_COMMON_COUNTERS \ { \ "", /* is_ready */ \ @@ -1168,7 +1198,8 @@ static int rename_var (CalcHandle* handle, VarRequest* oldname, VarRequest* new "", /* rename */ \ "", /* chattr */ \ "2P1L", /* send_all_vars_backup */ \ - "2P1L" /* recv_all_vars_backup */ \ + "2P1L", /* recv_all_vars_backup */ \ + "1L", /* del_folder */ \ } #define CALC_NSP_COMMON_FPTRS \ @@ -1203,7 +1234,8 @@ static int rename_var (CalcHandle* handle, VarRequest* oldname, VarRequest* new &noop_send_all_vars_backup, \ &tixx_recv_all_vars_backup, \ &noop_send_lab_equipment_data, \ - &noop_get_lab_equipment_data \ + &noop_get_lab_equipment_data, \ + &del_folder, \ } extern const CalcFncts calc_nsp = diff --git a/libticalcs/trunk/src/calc_xx.cc b/libticalcs/trunk/src/calc_xx.cc index 77a0e23d..bff419a1 100644 --- a/libticalcs/trunk/src/calc_xx.cc +++ b/libticalcs/trunk/src/calc_xx.cc @@ -1566,6 +1566,51 @@ TIEXPORT3 int TICALL ticalcs_calc_get_lab_equipment_data(CalcHandle *handle, Cal return ret; } +/** + * ticalcs_calc_del_fld: + * @handle: a previously allocated handle + * @vr: name of folder to delete (vr->folder) + * + * Request deletion of a folder. Beware: %vr.name may be modified ! + * + * Return value: 0 if successful, an error code otherwise. + **/ +int TICALL ticalcs_calc_del_fld(CalcHandle* handle, VarRequest* vr) +{ + const CalcFncts *calc; + int ret = 0; + + VALIDATE_HANDLE(handle); + VALIDATE_VARREQUEST(vr); + + calc = handle->calc; + VALIDATE_CALCFNCTS(calc); + + RETURN_IF_HANDLE_NOT_ATTACHED(handle); + RETURN_IF_HANDLE_NOT_OPEN(handle); + RETURN_IF_HANDLE_BUSY(handle); + + ticalcs_info(_("Deleting folder '%s':"), vr->folder); + handle->busy = 1; + if (calc->fncts.del_fld) + { + CalcEventData event; + ticalcs_event_fill_header(handle, &event, /* type */ CALC_EVENT_TYPE_BEFORE_GENERIC_OPERATION, /* retval */ 0, /* operation */ FNCT_DEL_FOLDER); + event.data.ptrval = (void *)vr; + ret = ticalcs_event_send(handle, &event); + if (!ret) + { + ret = calc->fncts.del_fld(handle, vr); + } + ticalcs_event_fill_header(handle, &event, /* type */ CALC_EVENT_TYPE_AFTER_GENERIC_OPERATION, /* retval */ ret, /* operation */ FNCT_DEL_FOLDER); + event.data.ptrval = (void *)vr; + ret = ticalcs_event_send(handle, &event); + } + handle->busy = 0; + + return ret; +} + // --- /** diff --git a/libticalcs/trunk/src/internal.h b/libticalcs/trunk/src/internal.h index 92196fb7..06dab294 100644 --- a/libticalcs/trunk/src/internal.h +++ b/libticalcs/trunk/src/internal.h @@ -459,6 +459,7 @@ int noop_send_all_vars_backup (CalcHandle* handle, FileContent* content); int noop_recv_all_vars_backup (CalcHandle* handle, FileContent* content); int noop_send_lab_equipment_data (CalcHandle* handle, CalcModel model, CalcLabEquipmentData * data); int noop_get_lab_equipment_data (CalcHandle* handle, CalcModel model, CalcLabEquipmentData * data); +int noop_del_folder (CalcHandle* handle, VarRequest* vr); // calc_xx.c diff --git a/libticalcs/trunk/src/ticalcs.h b/libticalcs/trunk/src/ticalcs.h index ab7f70f7..8c53dd5d 100644 --- a/libticalcs/trunk/src/ticalcs.h +++ b/libticalcs/trunk/src/ticalcs.h @@ -306,6 +306,7 @@ typedef enum FNCT_RECV_ALL_VARS_BACKUP, FNCT_SEND_LAB_EQUIPMENT_DATA, FNCT_GET_LAB_EQUIPMENT_DATA, + FNCT_DEL_FOLDER, CALC_FNCT_LAST // Keep this one last } CalcFnctsIdx; @@ -725,6 +726,7 @@ typedef struct * @recv_all_vars_backup: request a fake backup (set of files and FlashApps) * @send_lab_equipment_data: send data in a format suitable for lab equipment * @get_lab_equipment_data: get data from a piece of lab equipment + * @del_fld: delete folder (if supported) * * A structure containing pointers to functions implementing the various operations (potentially) supported by a hand-held. * !!! This structure is for private use !!! @@ -778,6 +780,8 @@ struct _CalcFnctPtrs int (*send_lab_equipment_data) (CalcHandle*, CalcModel, CalcLabEquipmentData *); int (*get_lab_equipment_data) (CalcHandle*, CalcModel, CalcLabEquipmentData *); + + int (*del_fld) (CalcHandle*, VarRequest*); }; /** @@ -788,35 +792,7 @@ struct _CalcFnctPtrs * @description: description of hand-held like "TI89 calculator" * @features: supported operations (CalcOperations) * @counters: defines which CalcUpdate counters have to be refreshed (indexed by CalcFnctsIdx) - * @is_ready: check whether calculator is ready - * @send_key: send key value - * @execute: remotely execute a program or application - * @recv_screen: request a screendump - * @get_dirlist: request a listing of variables, folders (if any) and apps (if any) - * @send_backup: send a backup - * @recv_backup: request a backup - * @send_var: send a variable (silent mode) - * @recv_var: request a variable silent mode) - * @send_var_ns: send a variable (non-silent mode) - * @recv_var_ns: receive a variable (non-silent mode) - * @send_flash: send a FLASH app/os - * @recv_flash: request a FLASH app/os - * @recv_idlist: request hand-held IDLIST - * @dump_rom_1: dump the hand-held ROM: send dumper (if any) - * @dump_rom_2: dump the hand-held ROM: launch dumper - * @set_clock: set date/time - * @get_clock: get date/time - * @del_var: delete variable - * @new_fld: create new folder (if supported) - * @get_version: returns Boot code & OS version - * @send_cert: send certificate stuff - * @recv_cert: receive certificate stuff - * @rename_var: rename a variable - * @change_attr: change attributes of a variable - * @send_all_vars_backup: send a fake backup (set of files and FlashApps) - * @recv_all_vars_backup: request a fake backup (set of files and FlashApps) - * @send_lab_equipment_data: send data to lab equipment - * @get_lab_equipment_data: get data from lab equipment + * @fncts: function pointers for calculator operations * * A structure used for handling a hand-held. * !!! This structure is for private use !!! @@ -1103,6 +1079,8 @@ typedef struct TIEXPORT3 int TICALL ticalcs_calc_send_lab_equipment_data(CalcHandle *handle, CalcModel, CalcLabEquipmentData *); TIEXPORT3 int TICALL ticalcs_calc_get_lab_equipment_data(CalcHandle *handle, CalcModel, CalcLabEquipmentData *); + TIEXPORT3 int TICALL ticalcs_calc_del_fld(CalcHandle *handle, VarRequest*); + TIEXPORT3 int TICALL ticalcs_calc_send_tigroup(CalcHandle *handle, TigContent*, TigMode); TIEXPORT3 int TICALL ticalcs_calc_recv_tigroup(CalcHandle *handle, TigContent*, TigMode); diff --git a/libticalcs/trunk/tests/test_ticalcs_2.cc b/libticalcs/trunk/tests/test_ticalcs_2.cc index 98d673cd..6e5d002f 100644 --- a/libticalcs/trunk/tests/test_ticalcs_2.cc +++ b/libticalcs/trunk/tests/test_ticalcs_2.cc @@ -1267,6 +1267,30 @@ static int get_lab_equipment_data(CalcHandle * h, int, char * input) return ret; } +static int del_folder(CalcHandle * h, int, char *) +{ + int ret = 1; + VarEntry ve; + + memset(&ve, 0, sizeof(ve)); + if (ticonv_model_is_tinspire(h->model)) + { + printf("Enter folder name: "); + ret = scan_print_output_1("", "%" xstr(FILENAME_DATA_SIZE) "s", "%s", ve.folder, ve.folder); + if (ret < 1) + { + fputs("Missing parameters\n", stderr); + ret = 1; + } + else + { + ret = ticalcs_calc_del_fld(h, &ve); + } + } + + return ret; +} + static int buffer_set_data(CalcHandle * h, int, char * input) { int ret; @@ -2380,65 +2404,67 @@ static menu_entry fnct_menu[] = DEFINE_MENU_ENTRY("FNCT Send({...}) (send list data)", send_lab_equipment_data), DEFINE_MENU_ENTRY("FNCT Get (get list data)", get_lab_equipment_data), NULL_ENTRY, + DEFINE_MENU_ENTRY("FNCT Del folder", del_folder), // 40 + NULL_ENTRY, // Front-ends for raw packet sending / receiving / manipulation functions. - DEFINE_MENU_ENTRY("BUF Enter data bytes into packet buffer", buffer_set_data), // 40 + DEFINE_MENU_ENTRY("BUF Enter data bytes into packet buffer", buffer_set_data), DEFINE_MENU_ENTRY("BUF Dump data bytes from packet buffer", buffer_get_data), NULL_ENTRY, DEFINE_MENU_ENTRY("BUF Peek data in the packet buffer", buffer_peek_data), DEFINE_MENU_ENTRY("BUF Poke data in the packet buffer", buffer_poke_data), - DEFINE_MENU_ENTRY("BUF Clear packet buffer", buffer_clear_data), + DEFINE_MENU_ENTRY("BUF Clear packet buffer", buffer_clear_data), // 45 NULL_ENTRY, - DEFINE_MENU_ENTRY("BUF MOV register/value to register", reg_mov), // 45 + DEFINE_MENU_ENTRY("BUF MOV register/value to register", reg_mov), DEFINE_MENU_ENTRY("BUF ADD register/value to register", reg_add), DEFINE_MENU_ENTRY("BUF SUB register/value to register", reg_sub), NULL_ENTRY, DEFINE_MENU_ENTRY("BUF AND register/value to register", reg_and), - DEFINE_MENU_ENTRY("BUF OR register/value to register", reg_or), - DEFINE_MENU_ENTRY("BUF XOR register/value to register", reg_xor), // 50 + DEFINE_MENU_ENTRY("BUF OR register/value to register", reg_or), // 50 + DEFINE_MENU_ENTRY("BUF XOR register/value to register", reg_xor), NULL_ENTRY, DEFINE_MENU_ENTRY("RAW Send raw data bytes (interactive)", raw_send_data), DEFINE_MENU_ENTRY("RAW Send raw data bytes from packet buffer", raw_send_data_from_buffer), DEFINE_MENU_ENTRY("RAW Recv raw data bytes", raw_recv_data), NULL_ENTRY, - DEFINE_MENU_ENTRY("DBUS Send packet", dbus_send_pkt), - DEFINE_MENU_ENTRY("DBUS Recv header", dbus_recv_header), // 55 + DEFINE_MENU_ENTRY("DBUS Send packet", dbus_send_pkt), // 55 + DEFINE_MENU_ENTRY("DBUS Recv header", dbus_recv_header), DEFINE_MENU_ENTRY("DBUS Recv data", dbus_recv_data), DEFINE_MENU_ENTRY("DBUS Recv header+data", dbus_recv), NULL_ENTRY, DEFINE_MENU_ENTRY("DUSB Send raw packet", dusb_send_rpkt), - DEFINE_MENU_ENTRY("DUSB Recv raw packet", dusb_recv_rpkt), + DEFINE_MENU_ENTRY("DUSB Recv raw packet", dusb_recv_rpkt), // 60 NULL_ENTRY, - DEFINE_MENU_ENTRY("NSP Send raw packet", nsp_send_rpkt), // 60 + DEFINE_MENU_ENTRY("NSP Send raw packet", nsp_send_rpkt), DEFINE_MENU_ENTRY("NSP Recv raw packet", nsp_recv_rpkt), NULL_ENTRY, DEFINE_MENU_ENTRY("RDMP Send ROM dumper", rdmp_send_dumper), DEFINE_MENU_ENTRY("RDMP Check whether ready", rdmp_is_ready), - DEFINE_MENU_ENTRY("RDMP Read ROM dump", rdmp_read_dump), + DEFINE_MENU_ENTRY("RDMP Read ROM dump", rdmp_read_dump), // 65 NULL_ENTRY, // Front-ends for dissection functions. - DEFINE_MENU_ENTRY("DIS Dissect DBUS raw packet", dbus_dissect_pkt), // 65 + DEFINE_MENU_ENTRY("DIS Dissect DBUS raw packet", dbus_dissect_pkt), DEFINE_MENU_ENTRY("DIS Dissect DUSB raw packet", dusb_dissect_rpkt), DEFINE_MENU_ENTRY("DIS Dissect NSP raw packet", nsp_dissect_rpkt), NULL_ENTRY, // Front-ends for protocol-specific capabilities. DEFINE_MENU_ENTRY("DBUS 83+ Memory dump", ti83p_dump), NULL_ENTRY, - DEFINE_MENU_ENTRY("DBUS 83+ Enable key echo", ti83p_eke), - DEFINE_MENU_ENTRY("DBUS 83+ Disable key echo", ti83p_dke), // 70 + DEFINE_MENU_ENTRY("DBUS 83+ Enable key echo", ti83p_eke), // 70 + DEFINE_MENU_ENTRY("DBUS 83+ Disable key echo", ti83p_dke), NULL_ENTRY, DEFINE_MENU_ENTRY("DBUS 83+ Enable lockdown", ti83p_eld), DEFINE_MENU_ENTRY("DBUS 83+ Disable lockdown", ti83p_dld), NULL_ENTRY, DEFINE_MENU_ENTRY("DBUS 83+ Get standard calculator ID", ti83p_gid), - DEFINE_MENU_ENTRY("DBUS 83+ Get some 32-byte memory area", ti83p_rid), - DEFINE_MENU_ENTRY("DBUS 83+ Set some 32-byte memory area", ti83p_sid), // 75 + DEFINE_MENU_ENTRY("DBUS 83+ Get some 32-byte memory area", ti83p_rid), // 75 + DEFINE_MENU_ENTRY("DBUS 83+ Set some 32-byte memory area", ti83p_sid), NULL_ENTRY, DEFINE_MENU_ENTRY("DUSB Get parameter IDs", dusb_get_param_ids), DEFINE_MENU_ENTRY("DUSB Set parameter ID", dusb_set_param_id), NULL_ENTRY, DEFINE_MENU_ENTRY("NSP Send key (specific and generic)", nsp_send_key), NULL_ENTRY, - DEFINE_MENU_ENTRY("NSP Test remote management stuff", nsp_remote_mgmt), + DEFINE_MENU_ENTRY("NSP Test remote management stuff", nsp_remote_mgmt), // 80 NULL_ENTRY, #undef NULL_ENTRY #undef DEFINE_MENU_ENTRY diff --git a/libticalcs/trunk/tests/torture_ticalcs.c b/libticalcs/trunk/tests/torture_ticalcs.c index 1e6d0add..8e97998c 100644 --- a/libticalcs/trunk/tests/torture_ticalcs.c +++ b/libticalcs/trunk/tests/torture_ticalcs.c @@ -138,13 +138,15 @@ static void torture_ticalcs(void) PRINTF(ticalcs_calc_recv_cert, INT, (void *)0x12345678, NULL); PRINTF(ticalcs_calc_send_all_vars_backup, INT, NULL, (void *)0x12345678); PRINTF(ticalcs_calc_send_all_vars_backup, INT, (void *)0x12345678, NULL); + PRINTF(ticalcs_calc_recv_all_vars_backup, INT, NULL, (void *)0x12345678); PRINTF(ticalcs_calc_recv_all_vars_backup, INT, (void *)0x12345678, NULL); PRINTF(ticalcs_calc_send_lab_equipment_data, INT, NULL, -1, (void *)0x12345678); PRINTF(ticalcs_calc_send_lab_equipment_data, INT, (void *)0x12345678, -1, NULL); - PRINTF(ticalcs_calc_get_lab_equipment_data, INT, NULL, -1, (void *)0x12345678); PRINTF(ticalcs_calc_get_lab_equipment_data, INT, (void *)0x12345678, -1, NULL); + PRINTF(ticalcs_calc_del_fld, INT, NULL, (void *)0x12345678); + PRINTF(ticalcs_calc_del_fld, INT, (void *)0x12345678, NULL); PRINTF(ticalcs_calc_send_tigroup, INT, NULL, (void *)0x12345678, -1); PRINTF(ticalcs_calc_send_tigroup, INT, (void *)0x12345678, NULL, -1); @@ -154,7 +156,6 @@ static void torture_ticalcs(void) PRINTF(ticalcs_calc_send_backup2, INT, (void *)0x12345678, NULL); PRINTF(ticalcs_calc_recv_backup2, INT, NULL, (void *)0x12345678); PRINTF(ticalcs_calc_recv_backup2, INT, (void *)0x12345678, NULL); - PRINTF(ticalcs_calc_send_var2, INT, NULL, -1, (void *)0x12345678); PRINTF(ticalcs_calc_send_var2, INT, (void *)0x12345678, -1, NULL); PRINTF(ticalcs_calc_recv_var2, INT, NULL, -1, (void *)0x12345678, (void *)0x12345678); @@ -166,7 +167,6 @@ static void torture_ticalcs(void) PRINTF(ticalcs_calc_recv_var_ns2, INT, NULL, -1, (void *)0x12345678, (void *)0x12345678); PRINTF(ticalcs_calc_recv_var_ns2, INT, (void *)0x12345678, -1, NULL, (void *)0x12345678); PRINTF(ticalcs_calc_recv_var_ns2, INT, (void *)0x12345678, -1, (void *)0x12345678, NULL); - PRINTF(ticalcs_calc_send_app2, INT, NULL, (void *)0x12345678); PRINTF(ticalcs_calc_send_app2, INT, (void *)0x12345678, NULL); PRINTF(ticalcs_calc_recv_app2, INT, NULL, (void *)0x12345678, (void *)0x12345678); @@ -178,41 +178,40 @@ static void torture_ticalcs(void) PRINTF(ticalcs_calc_recv_cert2, INT, NULL, (void *)0x12345678); PRINTF(ticalcs_calc_recv_cert2, INT, (void *)0x12345678, NULL); PRINTF(ticalcs_calc_send_os2, INT, NULL, (void *)0x12345678); - PRINTF(ticalcs_calc_send_os2, INT, (void *)0x12345678, NULL); PRINTF(ticalcs_calc_send_lab_equipment_data2, INT, NULL, -1, 0, (void *)0x12345678); PRINTF(ticalcs_calc_send_lab_equipment_data2, INT, (void *)0x12345678, -1, 0, NULL); PRINTF(ticalcs_calc_get_lab_equipment_data2, INT, NULL, -1, 0, (void *)0x12345678); + PRINTF(ticalcs_calc_get_lab_equipment_data2, INT, (void *)0x12345678, -1, 0, NULL); PRINTFVOID(ticalcs_free_lab_equipment_data2, NULL); PRINTF(ticalcs_calc_send_tigroup2, INT, NULL, (void *)0x12345678, -1); PRINTF(ticalcs_calc_send_tigroup2, INT, (void *)0x12345678, NULL, -1); PRINTF(ticalcs_calc_recv_tigroup2, INT, NULL, (void *)0x12345678, -1); - PRINTF(ticalcs_calc_recv_tigroup2, INT, (void *)0x12345678, NULL, -1); // dirlist.c PRINTFVOID(ticalcs_dirlist_destroy, NULL); PRINTFVOID(ticalcs_dirlist_display, NULL); PRINTF(ticalcs_dirlist_ram_used, INT, NULL); PRINTF(ticalcs_dirlist_flash_used, INT, NULL, (void *)0x12345678); + PRINTF(ticalcs_dirlist_flash_used, INT, (void *)0x12345678, NULL); PRINTF(ticalcs_dirlist_ve_count, INT, NULL); PRINTF(ticalcs_dirlist_ve_exist, PTR, NULL, (void *)0x12345678); PRINTF(ticalcs_dirlist_ve_exist, PTR, (void *)0x12345678, NULL); PRINTFVOID(ticalcs_dirlist_ve_add, NULL, (void *)0x12345678); - PRINTFVOID(ticalcs_dirlist_ve_add, (void *)0x12345678, NULL); PRINTFVOID(ticalcs_dirlist_ve_del, NULL, (void *)0x12345678); PRINTFVOID(ticalcs_dirlist_ve_del, (void *)0x12345678, NULL); // type2str.c PRINTF(ticalcs_model_to_string, STR, -1); PRINTF(ticalcs_string_to_model, INT, NULL); + PRINTF(ticalcs_scrfmt_to_string, STR, -1); PRINTF(ticalcs_string_to_scrfmt, INT, NULL); PRINTF(ticalcs_pathtype_to_string, STR, -1); PRINTF(ticalcs_string_to_pathtype, INT, NULL); PRINTF(ticalcs_memtype_to_string, STR, -1); - PRINTF(ticalcs_string_to_memtype, INT, NULL); PRINTF(ticalcs_infos_to_string, INT, NULL, (void *)0x12345678, 0x12345678); // clock.c @@ -225,19 +224,18 @@ static void torture_ticalcs(void) PRINTF(ticalcs_screen_convert_bw_to_blurry_rgb888, INT, NULL, 0x12345678, 0x12345678, (void *)0x12345678); PRINTF(ticalcs_screen_convert_bw_to_blurry_rgb888, INT, (void *)0x12345678, 0x12345678, 0x12345678, NULL); PRINTF(ticalcs_screen_convert_gs4_to_rgb888, INT, NULL, 0x12345678, 0x12345678, (void *)0x12345678); - PRINTF(ticalcs_screen_convert_gs4_to_rgb888, INT, (void *)0x12345678, 0x12345678, 0x12345678, NULL); PRINTF(ticalcs_screen_convert_rgb565le_to_rgb888, INT, NULL, 0x12345678, 0x12345678, (void *)0x12345678); PRINTF(ticalcs_screen_convert_rgb565le_to_rgb888, INT, (void *)0x12345678, 0x12345678, 0x12345678, NULL); PRINTF(ticalcs_screen_convert_native_to_rgb888, INT, 1, NULL, 0x12345678, 0x12345678, (void *)0x12345678); PRINTF(ticalcs_screen_convert_native_to_rgb888, INT, 1, (void *)0x12345678, 0x12345678, 0x12345678, NULL); + PRINTF(ticalcs_screen_nspire_rle_uncompress, INT, 1, (void *)0x12345678, 0x12345678, NULL, 0x12345678); PRINTF(ticalcs_screen_nspire_rle_uncompress, INT, 1, NULL, 0x12345678, (void *)0x12345678, 0x12345678); PRINTF(ticalcs_screen_84pcse_rle_uncompress, INT, (void *)0x12345678, 0x12345678, NULL, 0x12345678); PRINTF(ticalcs_screen_84pcse_rle_uncompress, INT, NULL, 0x12345678, (void *)0x12345678, 0x12345678); // tikeys.c PRINTF(ticalcs_keys_73, PTR, 0); - PRINTF(ticalcs_keys_83, PTR, 0); PRINTF(ticalcs_keys_83p, PTR, 0); PRINTF(ticalcs_keys_86, PTR, 0); @@ -249,19 +247,18 @@ static void torture_ticalcs(void) PRINTF(ticalcs_probe_usb_calc, INT, NULL, (void *)0x12345678); PRINTF(ticalcs_probe_usb_calc, INT, (void *)0x12345678, NULL); PRINTF(ticalcs_probe, INT, -1, -1, NULL, -1); - PRINTF(ticalcs_device_info_to_model, INT, NULL); PRINTF(ticalcs_remap_model_from_usb, INT, 0, 0); PRINTF(ticalcs_remap_model_to_usb, INT, 0, 0); // dbus_pkt.c PRINTF(dbus_send, INT, NULL, 0, 0, 0, (void *)0x12345678); PRINTF(dbus_recv, INT, NULL, (void *)0x12345678, (void *)0x12345678, (void *)0x12345678, (void *)0x12345678); + PRINTF(dbus_recv, INT, (void *)0x12345678, NULL, (void *)0x12345678, (void *)0x12345678, (void *)0x12345678); PRINTF(dbus_recv, INT, (void *)0x12345678, (void *)0x12345678, NULL, (void *)0x12345678, (void *)0x12345678); PRINTF(dbus_recv, INT, (void *)0x12345678, (void *)0x12345678, (void *)0x12345678, NULL, (void *)0x12345678); PRINTF(dbus_recv_header, INT, NULL, (void *)0x12345678, (void *)0x12345678, (void *)0x12345678); PRINTF(dbus_recv_header, INT, (void *)0x12345678, NULL, (void *)0x12345678, (void *)0x12345678); - PRINTF(dbus_recv_header, INT, (void *)0x12345678, (void *)0x12345678, NULL, (void *)0x12345678); PRINTF(dbus_recv_header, INT, (void *)0x12345678, (void *)0x12345678, (void *)0x12345678, NULL); PRINTF(dbus_recv_data, INT, NULL, (void *)0x12345678, (void *)0x12345678); @@ -274,7 +271,6 @@ static void torture_ticalcs(void) PRINTF(dusb_recv, INT, (void *)0x12345678, NULL); // nsp_rpkt.c PRINTF(nsp_send, INT, NULL, (void *)0x12345678); - PRINTF(nsp_send, INT, (void *)0x12345678, NULL); PRINTF(nsp_recv, INT, NULL, (void *)0x12345678); PRINTF(nsp_recv, INT, (void *)0x12345678, NULL);