edbrowse-dev - development list for edbrowse
 help / color / mirror / Atom feed
* [Edbrowse-dev] Back to C
@ 2014-12-27 11:43 Karl Dahlke
  2014-12-27 19:31 ` Adam Thompson
  0 siblings, 1 reply; 3+ messages in thread
From: Karl Dahlke @ 2014-12-27 11:43 UTC (permalink / raw)
  To: Edbrowse-dev

With some help from Adam, edbrowse is entirely back to C.
I even changed the bool true false stuff back.
This was easy for me because of a program I wrote many years ago
called sedunit, like sed but it only replaces logical units.
If you ask to change foo it won't change foobar.
So I just type

sedunit *.[chp] <<!
eb_bool/bool
eb_true/true
eb_false/false
!

and it's done.

Also got rid of the extern "C" {} in eb.p, don't need that any more.
That means eb.p can be indented, if you wish,
and it will come out properly.

Well I didn't mention in my list of tasks to track down the seg fault in js.
Sorry to hear you are plagued by that again Adam.
Does the hello world program run?
That would be a good test.

If nobody else is jumping on it, I may look into the download
in background task, cause I think it should be straightforward.
We don't need a lot of ipc communications, just fork and run in background
and tell user when done.
I'd go along with Adam on having some kind of download directory,
cause as he says, you can always type ./foo, and even more than that,
you can omit the download directory from the config file,
and then you just don't have one, if that's your preference.
I thought about spawning a curl command to do the download,
that's easy programming,
but someone on this llist pointed out that some sites
require you to step through some javascript to actually make the download work,
which curl is never going to understand,
so the only way to cover this case is to start the download as usual,
then switch to another curl callback function that writes
the chunks of data to a file,
instead of adding them to a growing buffer in memory.

Karl Dahlke

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

* Re: [Edbrowse-dev] Back to C
  2014-12-27 11:43 [Edbrowse-dev] Back to C Karl Dahlke
@ 2014-12-27 19:31 ` Adam Thompson
  2014-12-28 11:50   ` Adam Thompson
  0 siblings, 1 reply; 3+ messages in thread
From: Adam Thompson @ 2014-12-27 19:31 UTC (permalink / raw)
  To: Karl Dahlke; +Cc: Edbrowse-dev

[-- Attachment #1: Type: text/plain, Size: 2293 bytes --]

On Sat, Dec 27, 2014 at 06:43:28AM -0500, Karl Dahlke wrote:
> With some help from Adam, edbrowse is entirely back to C.
> I even changed the bool true false stuff back.
> This was easy for me because of a program I wrote many years ago
> called sedunit, like sed but it only replaces logical units.
> If you ask to change foo it won't change foobar.
> So I just type
> 
> sedunit *.[chp] <<!
> eb_bool/bool
> eb_true/true
> eb_false/false
> !
> 
> and it's done.

That's cool.
Is the code anywhere?

> Also got rid of the extern "C" {} in eb.p, don't need that any more.
> That means eb.p can be indented, if you wish,
> and it will come out properly.

Yeah, I'm not sure if you've done it yet,
but once things have stabilised a bit we need to re-indent things.
> Well I didn't mention in my list of tasks to track down the seg fault in js.
> Sorry to hear you are plagued by that again Adam.
> Does the hello world program run?
> That would be a good test.

I've not tried that yet, but I suspect not.
I've simply switched back to the hand-compiled mozjs and things work again.

> If nobody else is jumping on it, I may look into the download
> in background task, cause I think it should be straightforward.
> We don't need a lot of ipc communications, just fork and run in background
> and tell user when done.
> I'd go along with Adam on having some kind of download directory,
> cause as he says, you can always type ./foo, and even more than that,
> you can omit the download directory from the config file,
> and then you just don't have one, if that's your preference.
> I thought about spawning a curl command to do the download,
> that's easy programming,
> but someone on this llist pointed out that some sites
> require you to step through some javascript to actually make the download work,
> which curl is never going to understand,
> so the only way to cover this case is to start the download as usual,
> then switch to another curl callback function that writes
> the chunks of data to a file,
> instead of adding them to a growing buffer in memory.

Yeah, I've ran into such sites on multiple occasions.
I like the idea of switching callbacks,
that should allow us to avoid code duplication hopefully.

Cheers,
Adam.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

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

* Re: [Edbrowse-dev] Back to C
  2014-12-27 19:31 ` Adam Thompson
@ 2014-12-28 11:50   ` Adam Thompson
  0 siblings, 0 replies; 3+ messages in thread
From: Adam Thompson @ 2014-12-28 11:50 UTC (permalink / raw)
  To: Karl Dahlke; +Cc: Edbrowse-dev

[-- Attachment #1: Type: text/plain, Size: 526 bytes --]

On Sat, Dec 27, 2014 at 07:31:00PM +0000, Adam Thompson wrote:
> On Sat, Dec 27, 2014 at 06:43:28AM -0500, Karl Dahlke wrote:
> > With some help from Adam, edbrowse is entirely back to C.
> > I even changed the bool true false stuff back.

Ok, pulled and tested.

As part of this I pushed a change to make stringEqual,
stringEqualCI and memEqualCI handle NULL pointers,
since currently that causes a segfault in at least one case (and possibly more).
This makes stringEqual into a function rather than a macro.

Cheers,
Adam.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

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

end of thread, other threads:[~2014-12-28 11:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-27 11:43 [Edbrowse-dev] Back to C Karl Dahlke
2014-12-27 19:31 ` Adam Thompson
2014-12-28 11:50   ` 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).