On Feb 19, 2008 12:57 PM, Marc Andre Tanner <[EMAIL PROTECTED]> wrote:
> On Tue, Feb 19, 2008 at 01:50:40PM +0100, Claudio M. Alessi wrote: > > Hi, > > i'm continuing to study the dvtm code in order to be able to make > some > > "real" improvement. I'm a (not so) beginner C programmer so all my > > experiments and your points of view about are useful to improve myself > (not > > only dvtm). It's free software, after all. > > > > As for the mouse support, i don't use the status bar at all (at least > not > > in box other than my laptop) so there is no reason to build such > feature. > > Even i think that such "modularization" help to make the code cleaner ( > e.g. > > i had to move the terminal size variables from the updatebaros() > function > > to the resize_screen() one, which seems to be a better place for them). > > > > This will give a bit of work to Leonardo Taccari which is working on the > > pkgsrc dvtm packages; a new option is needed, i guess. > > > > Hope this helps but, if not, feel free to insult me ;-) > > I don't want to clutter the code with all the #ifdefs plus some day we > might introduce tags/workspaces and then a statusbar will become more > important. > I can support not using #ifdefs unless absolutely necessary. I have large chunks of my own code (thankfully not for long term use) where I used a lot of #ifdefs... so I know the hard way :(. I guess the argument is that code should be modular for programmer's ease (may be secondarily for conserving memory or hard-drive space). I think it will be a welcome effort if somebody can separate the mouse handling and status bar routines cleanly from dvtm code and allow simple config.h lines to enable/disable them. The other thing is that compilers are *supposed* to "dead code eliminate" anything inside normal conditional statements if they know for sure... which makes a case for using const variables and normal if statements for doing #ifdef like stuff. Using const also helps with type checking and better error messages. Bad news is the *supposed* in the first statement ;). For workspaces, here's a crazy idea... why not just use dvtm inside screen (may be that's still not good enough for tags :/ )? If bloat is a factor, I have always been curious: besides terminal emulation, regions and fullscreen windows... what more is there in screen? _r
