This marks the "start" of Flenser.

This commit is contained in:
2025-02-28 13:53:05 -05:00
parent 20fea64cb5
commit 8101f9f267
17 changed files with 51 additions and 42 deletions

View File

@ -1,3 +1,16 @@
=============================================================================
Flenser project
=============================================================================
flenser-3.2.0 [Feb 28, 2025]
+- Forked from dillo.
- Most dillo docs are (and will) remain unchanged.
- This means that it's called "dillo" in the code and other places.
- The coding style and related guides are hereby "abolished".
- The general architecture of modules and such will remain unchanged for now.
- I'll start by moving to smart pointers and RAII anywhere I can.
============================================================================= =============================================================================
Dillo project Dillo project
============================================================================= =============================================================================

View File

@ -32,7 +32,7 @@ DOXYFILE_ENCODING = UTF-8
# title of most generated pages and in a few other places. # title of most generated pages and in a few other places.
# The default value is: My Project. # The default value is: My Project.
PROJECT_NAME = Dillo PROJECT_NAME = Flenser
# The PROJECT_NUMBER tag can be used to enter a project or revision number. This # The PROJECT_NUMBER tag can be used to enter a project or revision number. This
# could be handy for archiving the generated documentation or if some version # could be handy for archiving the generated documentation or if some version

View File

@ -1,6 +1,6 @@
[Desktop Entry] [Desktop Entry]
GenericName=Web Browser GenericName=Web Browser
Name=Dillo Name=Flenser
Comment=Fast and small graphical web browser Comment=Fast and small graphical web browser
MimeType=text/html;text/xml;application/xhtml+xml;x-scheme-handler/http;x-scheme-handler/https; MimeType=text/html;text/xml;application/xhtml+xml;x-scheme-handler/http;x-scheme-handler/https;
Exec=dillo %U Exec=dillo %U

View File

@ -920,7 +920,7 @@ static void dlwin_esc_cb(Fl_Widget *, void *)
"ABORT them and EXIT anyway?"; "ABORT them and EXIT anyway?";
if (dl_win && dl_win->num_running() > 0) { if (dl_win && dl_win->num_running() > 0) {
fl_message_title("Dillo Downloads: Abort downloads?"); fl_message_title("Flenser Downloads: Abort downloads?");
int ch = fl_choice("%s", "Cancel", "*No", "Yes", msg); int ch = fl_choice("%s", "Cancel", "*No", "Yes", msg);
if (ch == 0 || ch == 1) if (ch == 0 || ch == 1)
return; return;
@ -1048,7 +1048,7 @@ DLWin::DLWin(int ww, int wh) {
mDList = new DLItemList(); mDList = new DLItemList();
// Create the empty main window // Create the empty main window
mWin = new Fl_Window(ww, wh, "Dillo Downloads"); mWin = new Fl_Window(ww, wh, "Flenser Downloads");
mWin->begin(); mWin->begin();
mScroll = new DlScroll(0,0,ww,wh); mScroll = new DlScroll(0,0,ww,wh);
mScroll->begin(); mScroll->begin();
@ -1067,7 +1067,7 @@ DLWin::DLWin(int ww, int wh) {
sigaddset(&mask_sigchld, SIGCHLD); sigaddset(&mask_sigchld, SIGCHLD);
est_sigchld(); est_sigchld();
fl_message_title_default("Dillo Downloads: Message"); fl_message_title_default("Flenser Downloads: Message");
// Set the cleanup timeout // Set the cleanup timeout
Fl::add_timeout(1.0, cleanup_cb, mDList); Fl::add_timeout(1.0, cleanup_cb, mDList);

View File

@ -92,7 +92,7 @@ int main(void)
/* NOTE: you can send less alternatives (e.g. only alt1 and alt2) */ /* NOTE: you can send less alternatives (e.g. only alt1 and alt2) */
d_cmd = a_Dpip_build_cmd( d_cmd = a_Dpip_build_cmd(
"cmd=%s title=%s msg=%s alt1=%s alt2=%s alt3=%s alt4=%s alt5=%s", "cmd=%s title=%s msg=%s alt1=%s alt2=%s alt3=%s alt4=%s alt5=%s",
"dialog", "Dillo: Hello", "Do you want to see the hello page?", "dialog", "Flenser: Hello", "Do you want to see the hello page?",
choice[1], choice[2], choice[3], choice[4], choice[5]); choice[1], choice[2], choice[3], choice[4], choice[5]);
a_Dpip_dsh_write_str(sh, 1, d_cmd); a_Dpip_dsh_write_str(sh, 1, d_cmd);
dFree(d_cmd); dFree(d_cmd);

View File

@ -39,7 +39,7 @@ const char *const AboutSplash=
"\n" "\n"
"<h1>Quickstart</h1>\n" "<h1>Quickstart</h1>\n"
"\n" "\n"
"<p>Welcome to Dillo " VERSION ", a small and fast graphical web browser. To\n" "<p>Welcome to Flenser " VERSION ", a small and fast graphical web browser. To\n"
"access the help click the question mark button <code>?</code> in the top\n" "access the help click the question mark button <code>?</code> in the top\n"
"right corner at any time. Here are some tips to get you started:</p>\n" "right corner at any time. Here are some tips to get you started:</p>\n"
"\n" "\n"
@ -47,12 +47,8 @@ const char *const AboutSplash=
" <li>The main configuration file is at <code>~/.dillo/dillorc</code>.</li>\n" " <li>The main configuration file is at <code>~/.dillo/dillorc</code>.</li>\n"
" <li>Most actions can also be done by using the <em>keyboard</em>.</li>\n" " <li>Most actions can also be done by using the <em>keyboard</em>.</li>\n"
" <li>Cookies are <em>disabled by default</em>.</li>\n" " <li>Cookies are <em>disabled by default</em>.</li>\n"
" <li>Several Dillo plugins are available.</li>\n"
"</ul>\n" "</ul>\n"
"\n" "\n"
"<p>See more details in the\n"
"<a href=\"https://dillo-browser.github.io/\">Dillo website</a>.</p>\n"
"\n"
"</div>\n" "</div>\n"
"</body>\n" "</body>\n"
"</html>\n"; "</html>\n";

View File

@ -780,7 +780,7 @@ static int Tls_examine_certificate(mbedtls_ssl_context *ssl, Server_t *srv)
const mbedtls_x509_crt *cert; const mbedtls_x509_crt *cert;
uint32_t st; uint32_t st;
int choice = -1, ret = -1; int choice = -1, ret = -1;
char *title = dStrconcat("Dillo TLS security warning: ",srv->hostname,NULL); char *title = dStrconcat("Flenser TLS security warning: ",srv->hostname,NULL);
cert = mbedtls_ssl_get_peer_cert(ssl); cert = mbedtls_ssl_get_peer_cert(ssl);
if (cert == NULL){ if (cert == NULL){

View File

@ -508,7 +508,7 @@ static bool_t Tls_check_cert_strength(SSL *ssl, Server_t *srv, int *choice)
const char *msg = "A certificate in the chain uses the MD5 " const char *msg = "A certificate in the chain uses the MD5 "
"signature algorithm, which is too weak " "signature algorithm, which is too weak "
"to trust."; "to trust.";
*choice = a_Dialog_choice("Dillo TLS security warning", msg, *choice = a_Dialog_choice("Flenser TLS security warning", msg,
"Continue", "Cancel", NULL); "Continue", "Cancel", NULL);
if (*choice != 1) if (*choice != 1)
success = FALSE; success = FALSE;
@ -693,7 +693,7 @@ static bool_t Tls_check_cert_hostname(X509 *cert, const char *host,
if (alt_name_checked == TRUE && i >= numaltnames) if (alt_name_checked == TRUE && i >= numaltnames)
{ {
success = FALSE; success = FALSE;
*choice = a_Dialog_choice("Dillo TLS security warning", *choice = a_Dialog_choice("Flenser TLS security warning",
err->str, "Continue", "Cancel", NULL); err->str, "Continue", "Cancel", NULL);
switch (*choice){ switch (*choice){
@ -722,7 +722,7 @@ static bool_t Tls_check_cert_hostname(X509 *cert, const char *host,
success = FALSE; success = FALSE;
msg = dStrconcat("Certificate common name ", common_name, msg = dStrconcat("Certificate common name ", common_name,
" doesn't match requested host name ", host, NULL); " doesn't match requested host name ", host, NULL);
*choice = a_Dialog_choice("Dillo TLS security warning", *choice = a_Dialog_choice("Flenser TLS security warning",
msg, "Continue", "Cancel", NULL); msg, "Continue", "Cancel", NULL);
dFree(msg); dFree(msg);
@ -768,7 +768,7 @@ static bool_t Tls_check_cert_hostname(X509 *cert, const char *host,
"character). This may be an indication that the " "character). This may be an indication that the "
"host is not who it claims to be -- that is, not " "host is not who it claims to be -- that is, not "
"the real ", host, NULL); "the real ", host, NULL);
*choice = a_Dialog_choice("Dillo TLS security warning", *choice = a_Dialog_choice("Flenser TLS security warning",
msg, "Continue", "Cancel", NULL); msg, "Continue", "Cancel", NULL);
dFree(msg); dFree(msg);
@ -841,7 +841,7 @@ static int Tls_examine_certificate(SSL *ssl, Server_t *srv)
const uint_t buflen = 4096; const uint_t buflen = 4096;
char buf[buflen], *cn, *msg; char buf[buflen], *cn, *msg;
int choice = -1, ret = -1; int choice = -1, ret = -1;
char *title = dStrconcat("Dillo TLS security warning: ",srv->hostname,NULL); char *title = dStrconcat("Flenser TLS security warning: ",srv->hostname,NULL);
#if OPENSSL_VERSION_NUMBER < 0x30000000L #if OPENSSL_VERSION_NUMBER < 0x30000000L
remote_cert = SSL_get_peer_certificate(ssl); remote_cert = SSL_get_peer_certificate(ssl);

View File

@ -626,7 +626,7 @@ static int Auth_do_auth_dialog(const AuthParse_t *auth_parse,
_MSG("auth.c: Auth_do_auth_dialog: realm = '%s'\n", auth_parse->realm); _MSG("auth.c: Auth_do_auth_dialog: realm = '%s'\n", auth_parse->realm);
title = dStrconcat("Dillo: Password for ", auth_parse->realm, NULL); title = dStrconcat("Flenser: Password for ", auth_parse->realm, NULL);
msg = dStrconcat("The server at ", URL_HOST(url), " requires a username" msg = dStrconcat("The server at ", URL_HOST(url), " requires a username"
" and password for \"", auth_parse->realm, "\".\n\n" " and password for \"", auth_parse->realm, "\".\n\n"
"Authentication scheme: ", typestr, NULL); "Authentication scheme: ", typestr, NULL);

View File

@ -1150,7 +1150,7 @@ static void Cache_provide_redirection_blocked_page(CacheEntry_t *entry,
a_Web_dispatch_by_type("text/html", clientWeb, &client->Callback, a_Web_dispatch_by_type("text/html", clientWeb, &client->Callback,
&client->CbData); &client->CbData);
client->Buf = dStrconcat("<!doctype html><html><body>" client->Buf = dStrconcat("<!doctype html><html><body>"
"Dillo blocked a redirection from <a href=\"", "Flenser blocked a redirection from <a href=\"",
URL_STR(entry->Url), "\">", URL_STR(entry->Url), URL_STR(entry->Url), "\">", URL_STR(entry->Url),
"</a> to <a href=\"", URL_STR(entry->Location), "\">", "</a> to <a href=\"", URL_STR(entry->Location), "\">",
URL_STR(entry->Location), "</a> based on your domainrc " URL_STR(entry->Location), "</a> based on your domainrc "

View File

@ -127,7 +127,7 @@ int EnterButton::handle(int e)
void a_Dialog_msg(const char *title, const char *msg) void a_Dialog_msg(const char *title, const char *msg)
{ {
if (!(title && *title)) if (!(title && *title))
title = "Dillo: Message"; title = "Flenser: Message";
fl_message_title(title); fl_message_title(title);
fl_message("%s", msg); fl_message("%s", msg);
} }
@ -156,7 +156,7 @@ const char *a_Dialog_input(const char *title, const char *msg)
input_answer = 0; input_answer = 0;
if (!(title && *title)) if (!(title && *title))
title = "Dillo: Input"; title = "Flenser: Input";
Fl_Window *window = new Fl_Window(ww,wh,title); Fl_Window *window = new Fl_Window(ww,wh,title);
window->set_modal(); window->set_modal();
@ -233,7 +233,7 @@ const char *a_Dialog_input(const char *title, const char *msg)
const char *a_Dialog_passwd(const char *title, const char *msg) const char *a_Dialog_passwd(const char *title, const char *msg)
{ {
if (!(title && *title)) if (!(title && *title))
title = "Dillo: Password"; title = "Flenser: Password";
fl_message_title(title); fl_message_title(title);
return fl_password("%s", "", msg); return fl_password("%s", "", msg);
} }
@ -298,7 +298,7 @@ void a_Dialog_text_window(const char *title, const char *txt)
int wh = prefs.height, ww = prefs.width, bh = 30; int wh = prefs.height, ww = prefs.width, bh = 30;
if (!(title && *title)) if (!(title && *title))
title = "Dillo: Text"; title = "Flenser: Text";
Fl_Window *window = new Fl_Window(ww, wh, title); Fl_Window *window = new Fl_Window(ww, wh, title);
Fl_Group::current(0); Fl_Group::current(0);
@ -345,7 +345,7 @@ int a_Dialog_choice(const char *title, const char *msg, ...)
int i, n; int i, n;
if (title == NULL || *title == '\0') if (title == NULL || *title == '\0')
title = "Dillo: Choice"; title = "Flenser: Choice";
va_start(ap, msg); va_start(ap, msg);
for (n = 0; va_arg(ap, char *) != NULL; n++); for (n = 0; va_arg(ap, char *) != NULL; n++);
@ -420,7 +420,7 @@ int a_Dialog_user_password(const char *title, const char *msg,
/* window is resized below */ /* window is resized below */
if (!(title && *title)) if (!(title && *title))
title = "Dillo: User/Password"; title = "Flenser: User/Password";
Fl_Window *window = new Fl_Window(window_w,window_h,title); Fl_Window *window = new Fl_Window(window_w,window_h,title);
Fl_Group::current(0); Fl_Group::current(0);
window->user_data(NULL); window->user_data(NULL);

View File

@ -628,6 +628,6 @@ int main(int argc, char **argv)
/* TODO: auth, css */ /* TODO: auth, css */
//a_Dpi_dillo_exit(); //a_Dpi_dillo_exit();
MSG("Dillo: normal exit!\n"); MSG("Flenser: normal exit!\n");
return 0; return 0;
} }

View File

@ -1042,7 +1042,7 @@ void DilloHtmlForm::submit(DilloHtmlInput *active_input, EventButton *event)
{ {
if (!dStrAsciiCasecmp(URL_SCHEME(html->page_url), "https") && if (!dStrAsciiCasecmp(URL_SCHEME(html->page_url), "https") &&
dStrAsciiCasecmp(URL_SCHEME(action), "https")) { dStrAsciiCasecmp(URL_SCHEME(action), "https")) {
int choice = a_Dialog_choice("Dillo: Insecure form submission", int choice = a_Dialog_choice("Flenser: Insecure form submission",
"A form on a SECURE page wants to use an " "A form on a SECURE page wants to use an "
"INSECURE protocol to submit data.", "INSECURE protocol to submit data.",
"Continue", "Cancel", NULL); "Continue", "Cancel", NULL);

View File

@ -51,7 +51,7 @@ void Paths::init(void)
path, dStrerror(errno)); path, dStrerror(errno));
} }
} else { } else {
MSG("Dillo: error reading %s: %s\n", path, dStrerror(errno)); MSG("Flenser: error reading %s: %s\n", path, dStrerror(errno));
} }
} }

View File

@ -529,7 +529,7 @@ static void win_cb (Fl_Widget *w, void *cb_data) {
} }
if (prefs.show_quit_dialog && ntabs > 1) if (prefs.show_quit_dialog && ntabs > 1)
choice = a_Dialog_choice("Dillo: Close window?", choice = a_Dialog_choice("Flenser: Close window?",
"Window contains more than one tab.", "Window contains more than one tab.",
"Close", "Cancel", NULL); "Close", "Cancel", NULL);
if (choice == 1) if (choice == 1)
@ -717,7 +717,7 @@ void a_UIcmd_close_all_bw(void *)
int choice = 1; int choice = 1;
if (prefs.show_quit_dialog && a_Bw_num() > 1) if (prefs.show_quit_dialog && a_Bw_num() > 1)
choice = a_Dialog_choice("Dillo: Quit?", choice = a_Dialog_choice("Flenser: Quit?",
"More than one open tab or window.", "More than one open tab or window.",
"Quit", "Cancel", NULL); "Quit", "Cancel", NULL);
if (choice == 1) if (choice == 1)
@ -1060,7 +1060,7 @@ static int UIcmd_save_file_check(const char *name)
dStr_sprintf(ds, dStr_sprintf(ds,
"The file: %s (%d Bytes) already exists. What do we do?", "The file: %s (%d Bytes) already exists. What do we do?",
name, (int)ss.st_size); name, (int)ss.st_size);
ch = a_Dialog_choice("Dillo Save: File exists!", ds->str, ch = a_Dialog_choice("Flenser Save: File exists!", ds->str,
"Abort", "Continue", "Rename", NULL); "Abort", "Continue", "Rename", NULL);
dStr_free(ds, 1); dStr_free(ds, 1);
return ch; return ch;
@ -1122,7 +1122,7 @@ void a_UIcmd_save(void *vbw)
*/ */
const char *a_UIcmd_select_file() const char *a_UIcmd_select_file()
{ {
return a_Dialog_select_file("Dillo: Select a File", NULL, NULL); return a_Dialog_select_file("Flenser: Select a File", NULL, NULL);
} }
/* /*
@ -1155,7 +1155,7 @@ void a_UIcmd_open_file(void *vbw)
char *name; char *name;
DilloUrl *url; DilloUrl *url;
name = a_Dialog_open_file("Dillo: Open File", NULL, ""); name = a_Dialog_open_file("Flenser: Open File", NULL, "");
if (name) { if (name) {
url = a_Url_new(name, "file:"); url = a_Url_new(name, "file:");
@ -1209,7 +1209,7 @@ void a_UIcmd_search_dialog(void *vbw)
{ {
const char *query; const char *query;
if ((query = a_Dialog_input("Dillo: Search", "Search the Web:"))) { if ((query = a_Dialog_input("Flenser: Search", "Search the Web:"))) {
char *url_str = UIcmd_make_search_str(query); char *url_str = UIcmd_make_search_str(query);
a_UIcmd_open_urlstr(vbw, url_str); a_UIcmd_open_urlstr(vbw, url_str);
dFree(url_str); dFree(url_str);
@ -1222,7 +1222,7 @@ void a_UIcmd_search_dialog(void *vbw)
const char *a_UIcmd_get_passwd(const char *user) const char *a_UIcmd_get_passwd(const char *user)
{ {
const char *passwd; const char *passwd;
const char *title = "Dillo: Password"; const char *title = "Flenser: Password";
char *msg = dStrconcat("Password for user \"", user, "\"", NULL); char *msg = dStrconcat("Password for user \"", user, "\"", NULL);
passwd = a_Dialog_passwd(title, msg); passwd = a_Dialog_passwd(title, msg);
dFree(msg); dFree(msg);
@ -1234,7 +1234,7 @@ const char *a_UIcmd_get_passwd(const char *user)
*/ */
void a_UIcmd_save_link(BrowserWindow *bw, const DilloUrl *url) void a_UIcmd_save_link(BrowserWindow *bw, const DilloUrl *url)
{ {
UIcmd_save(bw, url, "Dillo: Save Link as File"); UIcmd_save(bw, url, "Flenser: Save Link as File");
} }
/* /*
@ -1352,9 +1352,9 @@ void a_UIcmd_view_page_bugs(void *vbw)
BrowserWindow *bw = (BrowserWindow*)vbw; BrowserWindow *bw = (BrowserWindow*)vbw;
if (bw->num_page_bugs > 0) { if (bw->num_page_bugs > 0) {
a_Dialog_text_window("Dillo: Detected HTML errors", bw->page_bugs->str); a_Dialog_text_window("Flenser: Detected HTML errors", bw->page_bugs->str);
} else { } else {
a_Dialog_msg("Dillo: Good HTML!", "No HTML errors found while parsing!"); a_Dialog_msg("Flenser: Good HTML!", "No HTML errors found while parsing!");
} }
} }
@ -1542,7 +1542,7 @@ void a_UIcmd_set_page_title(BrowserWindow *bw, const char *label)
const int size = 128; const int size = 128;
char title[size]; char title[size];
if (snprintf(title, size, "Dillo: %s", label ? label : "") >= size) { if (snprintf(title, size, "Flenser: %s", label ? label : "") >= size) {
uint_t i = MIN(size - 4, 1 + a_Utf8_end_of_char(title, size - 8)); uint_t i = MIN(size - 4, 1 + a_Utf8_end_of_char(title, size - 8));
snprintf(title + i, 4, "..."); snprintf(title + i, 4, "...");
} }

View File

@ -123,7 +123,7 @@ void a_Version_print_info(void)
version = GIT_COMMIT; version = GIT_COMMIT;
#endif #endif
printf("Dillo %s\n", version); printf("Flenser %s\n", version);
print_libs(); print_libs();
print_features(); print_features();
} }

View File

@ -35,9 +35,9 @@ function render_page() {
sleep 1 sleep 1
# Capture only Dillo window # Capture only Dillo window
winid=$(xwininfo -all -root | awk '/Dillo:/ {print $1}') winid=$(xwininfo -all -root | awk '/Flenser:/ {print $1}')
if [ -z "$winid" ]; then if [ -z "$winid" ]; then
echo "cannot find Dillo window" >&2 echo "cannot find Flenser window" >&2
exit 1 exit 1
fi fi
xwd -id "$winid" -silent | ${magick_bin} xwd:- png:${outpic} xwd -id "$winid" -silent | ${magick_bin} xwd:- png:${outpic}