[neomutt-devel] Tangled up

Richard Russon rich at flatcap.org
Wed Aug 15 10:42:47 CEST 2018

I'm not getting far with my Account code.  I need to rearrange some of
the major structs in NeoMutt, but I can't find a way to do it in stages.

So, I decided to tackle a parallel problem - deglobalise the use of Context.
Context is the 'current' mailbox, it's global and it's used in hundreds
of functions.

After many hours of tedious work, I'd added "struct Context *ctx" to
about 100 functions.  This is starting to show up where the bigger
problems are.

For example: imap_account_match() - Compare two Accounts

It needs the Context to pass to imap_conn_find() which calls...

- imap_conn_find()
- imap_open_connection()
- mutt_socket_open()
- tls_socket_open()
- tls_negotiate()
- tls_check_certificate()
- tls_check_one_certificate()
- mutt_menu_loop()
- menu_redraw()
- menu_redraw_sidebar()
- mutt_sb_draw()
- mutt_sb_notify_mailbox()
  Which uses: ctx->realpath

Deep parts of the IMAP code which have a dependency on the display layer!
Time for some more thinking...

    Rich / FlatCap
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://mailman.neomutt.org/pipermail/neomutt-devel-neomutt.org/attachments/20180815/cf8775a3/attachment.sig>

More information about the neomutt-devel mailing list