edbrowse-dev - development list for edbrowse
 help / color / mirror / Atom feed
* [Edbrowse-dev] interprocess shared files
@ 2015-05-14 19:55 Karl Dahlke
  2015-05-14 22:00 ` Adam Thompson
  0 siblings, 1 reply; 4+ messages in thread
From: Karl Dahlke @ 2015-05-14 19:55 UTC (permalink / raw)
  To: Edbrowse-dev

Ok, that wasn't hard.
stringfile.c url.c messages.c is now a group of code that is
shared between any and all of the edbrowse processes,
even those that are c++.
The tweak that makes the latter possible is this in eb.h.

#ifndef __cplusplus
typedef uchar bool;
#define false 0
#define true 1
#endif

No other plusplus conditional compilation is necessary, anywhere.
That's good cause I dislike conditional compilation.

I did have to make some other changes in the c files but those are minor
and work fine in either language.
One silly example was the use of new as a variable,
which obviously blows up in c++ so I just rename the variable.
Anyways Adam you are good to go with

cp jseng-moz.cpp jseng-duk.c

and give it a whirl.
There are over 500 lines of code less than there use to be,
so you won't have to waste time on that,
and you have access to more functions,
including the string management functions that you will need
to replace the dynamic c++ strings,
which there are only a couple in the file anyways.

The only aesthetic downer is jseng use to include ebjs.h, small and contained,
but now it includes eb.h, which is everything.
It might be worth making a common.h intermediate to embrase the common files.
I'll hold that off for another day.

Karl Dahlke

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-05-14 22:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-14 19:55 [Edbrowse-dev] interprocess shared files Karl Dahlke
2015-05-14 22:00 ` Adam Thompson
2015-05-14 22:32   ` Karl Dahlke
2015-05-14 22:39     ` Adam Thompson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).