> On Sun, 17 Aug 2014 22:35:27 +0200 "Roberto E. Vargas Caballero" > <k...@shike2.com> wrote: >> > I think it would also be beneficial because it is difficult (at least >> > for me) to keep track of a single ~4k line c file. >> >> I usually work in the terminal emulation part, and sometimes it is a >> bit confusing mix the code of this part with the graphical part. >> What do you think about this topic guys? > > The emulation in a terminal emulator is pure graphics. That’s why it is > a terminal emulator for a graphical environment. The logic behind it are > just flags to serve xdraws(). You will have to rewrite everything in a > new environment, especially because of the event infrastructure in X11. > There is not much to modularize here. > > Having one server for many windows is what was first planned as an > urxvt‐like daemon feature. The complexity in code for this does not re‐ > ally give much gain. So it was dropped.
After carefully teasing the X parts away from the terminal emulation parts of st.c, I now have a term.c[1] file with only 1740 lines and term.h[2] with 238 lines. So terminal emulation, without regard to any GUI, only accounts for roughly half of the lines of st.c. [1] https://github.com/sdegutis/hammerterm/blob/master/Hammerterm/term.c [2] https://github.com/sdegutis/hammerterm/blob/master/Hammerterm/term.h -Steven