Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libtiopers: new library to share some code across libti* clients #42

Open
14 tasks
debrouxl opened this issue Jun 9, 2019 · 0 comments
Open
14 tasks
Milestone

Comments

@debrouxl
Copy link
Owner

debrouxl commented Jun 9, 2019

The wish of creating a fifth library containing high-level operations (name suggestion: "tiopers"), in order to factor out code potentially/definitely duplicated across tilp, gfm, titools, tiutils, etc. has been floating for years (Romain, Jonimus, Benjamin, Thibault, myself), because the modularity of TILP still needs to be improved, despite the existence of 4 libraries already.

The innermost chunks (or simplified versions) of a number of functions from tilp/src/tilp_calcs.c and tilp/src/tilp_device.c, gfm/trunk/src/ungroup.c, tidump and others could go there.

Implementation notes:

  • create tiopers, make gfm and tilp depend on it.
  • move code from gfm, tilp and titools to libtiopers, at least:
    • P1 tilp_calc_isready and its dependencies: there's no point in starting the work if not for moving this one, all the more it blocks moving multiple other routines...
    • P2 tilp_calc_dirlist -> tilp_dirlist_remote (tilp_vars.c)
    • P1 tilp_calc_idlist
    • P1 tilp_calc_rom_dump
    • P2 tilp_calc_send_os
    • P1 tilp_calc_get_infos
    • P2 tilp_calc_recv_cert
    • P2 tilp_calc_send_cert
    • P2 tilp_calc_send_tigroup
    • P2 tilp_calc_recv_tigroup
    • P2 the core of tidump
    • P2 a shortcut for exiting PTT mode on the Nspire (send an empty file with the appropriate name) and the TI-eZ80 series (s_param_request DUSB_PID_PTT_MODE_STATE + r_param_data, if PTT mode state == 1 then dirlist + recv_var RclWindow + send_var RclWindow)

The benefit is less clear for the other routines from tilp_calcs.c: the GUI code (progress bars, dialogs) is more intermingled with ticalcs calls.

I worked a bit on libtiopers in 2013, but postponed it to the next development cycle twice :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant