On Tue, May 12, 2015 at 05:15:32AM -0400, Karl Dahlke wrote: > > Writing the jseng-duk.c process ... > > And the cool part is, such work can take place independently > of other work on edbrowse. > To use the new process, if we decide to do so, is just a change of makefile. Indeed. > This is a switch back from c++ to c, but I (wisely) used almost none > of the c++ features, save those needed for the mozilla api, > and yes a few strings, cause I was being lazy. > String effects; for example, > to gather side effects of running js and pass them back to edbrowse. > I think the easiest path is to copy the stringAndString etc routines over, > for growing strings dynamically. > They're not perfect but we're all use to them. > stringfile.c lines 150 to 227 would probably suffice. > > If we continue down this path we might want a string + url sourcefile to be > shared between the two processes. > Nobody likes duplicated code. > Common is currently jseng-moz.cpp lines 54 through 548, > plus the aforementioned string management routines, so over 600 lines, > and that's just too much code to leave duplicated in the long run. Tbh, since this is in C, I was just going to use the already built edbrowse modules. There's no real reason not to in this code. The reason before was because the jseng-moz.cpp engine is in c++, but this is in C like the rest of the project so I see no reason to duplicate any of this stuff. Cheers, Adam.