As we take some steps towards c++,
you notice I use the type pst,
which is a typedef in eb.h,
which is suppose to remind you of a perl string.
This is evolution.
Remember that edbrowse version 1 was written in perl,
and is still available.
A perl string is nice for many reasons but one is that it can hold \0.
Null does not end the string.
So each line of a file is held in a perl string, and if the line has nulls in 
it,
like when you download a binary file, that's ok.
When I moved from perl to C I had to reconstruct all this,
and have my own "strings",
like perl strings, that would work for me.
In this case I use newline as the end character, not \0.
So that's what pst is all about.

Well I just did a check with strings in c++ and they are perl style strings,
so that's good, and will make things easy.
This snippit of code shows, keeping both hello and world in s.

string s;
s = "hello";
s += '\0';
s += "world";
cout << s.size();
cout << s << endl;

You probably knew all this anyways but I like to figure things
out by playing with it.

Karl Dahlke
_______________________________________________
Edbrowse-dev mailing list
[email protected]
http://lists.the-brannons.com/mailman/listinfo/edbrowse-dev

Reply via email to