From 8101f9f267c0cb8943a492143f66bd4d2613e0d1fa3b2f188a03ed3960588921 Mon Sep 17 00:00:00 2001 From: ADAM David Alan Martin Date: Fri, 28 Feb 2025 13:53:05 -0500 Subject: [PATCH] This marks the "start" of Flenser. --- ChangeLog | 13 +++++++++++++ Doxyfile | 2 +- dillo.desktop | 2 +- dpi/downloads.cc | 6 +++--- dpi/hello.c | 2 +- src/IO/about.c | 6 +----- src/IO/tls_mbedtls.c | 2 +- src/IO/tls_openssl.c | 10 +++++----- src/auth.c | 2 +- src/cache.c | 2 +- src/dialog.cc | 12 ++++++------ src/dillo.cc | 2 +- src/form.cc | 2 +- src/paths.cc | 2 +- src/uicmd.cc | 22 +++++++++++----------- src/version.cc | 2 +- test/html/driver.sh | 4 ++-- 17 files changed, 51 insertions(+), 42 deletions(-) diff --git a/ChangeLog b/ChangeLog index 44d6664..362d9b5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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 ============================================================================= diff --git a/Doxyfile b/Doxyfile index 7f4ed55..074ce1d 100644 --- a/Doxyfile +++ b/Doxyfile @@ -32,7 +32,7 @@ DOXYFILE_ENCODING = UTF-8 # title of most generated pages and in a few other places. # 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 # could be handy for archiving the generated documentation or if some version diff --git a/dillo.desktop b/dillo.desktop index 57cdfe7..0341c58 100644 --- a/dillo.desktop +++ b/dillo.desktop @@ -1,6 +1,6 @@ [Desktop Entry] GenericName=Web Browser -Name=Dillo +Name=Flenser Comment=Fast and small graphical web browser MimeType=text/html;text/xml;application/xhtml+xml;x-scheme-handler/http;x-scheme-handler/https; Exec=dillo %U diff --git a/dpi/downloads.cc b/dpi/downloads.cc index cc6f445..0b8c23b 100644 --- a/dpi/downloads.cc +++ b/dpi/downloads.cc @@ -920,7 +920,7 @@ static void dlwin_esc_cb(Fl_Widget *, void *) "ABORT them and EXIT anyway?"; 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); if (ch == 0 || ch == 1) return; @@ -1048,7 +1048,7 @@ DLWin::DLWin(int ww, int wh) { mDList = new DLItemList(); // Create the empty main window - mWin = new Fl_Window(ww, wh, "Dillo Downloads"); + mWin = new Fl_Window(ww, wh, "Flenser Downloads"); mWin->begin(); mScroll = new DlScroll(0,0,ww,wh); mScroll->begin(); @@ -1067,7 +1067,7 @@ DLWin::DLWin(int ww, int wh) { sigaddset(&mask_sigchld, SIGCHLD); est_sigchld(); - fl_message_title_default("Dillo Downloads: Message"); + fl_message_title_default("Flenser Downloads: Message"); // Set the cleanup timeout Fl::add_timeout(1.0, cleanup_cb, mDList); diff --git a/dpi/hello.c b/dpi/hello.c index c8ea487..3d480d8 100644 --- a/dpi/hello.c +++ b/dpi/hello.c @@ -92,7 +92,7 @@ int main(void) /* NOTE: you can send less alternatives (e.g. only alt1 and alt2) */ d_cmd = a_Dpip_build_cmd( "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]); a_Dpip_dsh_write_str(sh, 1, d_cmd); dFree(d_cmd); diff --git a/src/IO/about.c b/src/IO/about.c index 6fda2f8..f22d992 100644 --- a/src/IO/about.c +++ b/src/IO/about.c @@ -39,7 +39,7 @@ const char *const AboutSplash= "\n" "

Quickstart

\n" "\n" -"

Welcome to Dillo " VERSION ", a small and fast graphical web browser. To\n" +"

Welcome to Flenser " VERSION ", a small and fast graphical web browser. To\n" "access the help click the question mark button ? in the top\n" "right corner at any time. Here are some tips to get you started:

\n" "\n" @@ -47,12 +47,8 @@ const char *const AboutSplash= "
  • The main configuration file is at ~/.dillo/dillorc.
  • \n" "
  • Most actions can also be done by using the keyboard.
  • \n" "
  • Cookies are disabled by default.
  • \n" -"
  • Several Dillo plugins are available.
  • \n" "\n" "\n" -"

    See more details in the\n" -"Dillo website.

    \n" -"\n" "\n" "\n" "\n"; diff --git a/src/IO/tls_mbedtls.c b/src/IO/tls_mbedtls.c index 5cd3684..333104f 100644 --- a/src/IO/tls_mbedtls.c +++ b/src/IO/tls_mbedtls.c @@ -780,7 +780,7 @@ static int Tls_examine_certificate(mbedtls_ssl_context *ssl, Server_t *srv) const mbedtls_x509_crt *cert; uint32_t st; 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); if (cert == NULL){ diff --git a/src/IO/tls_openssl.c b/src/IO/tls_openssl.c index e127fbf..f3d97bd 100644 --- a/src/IO/tls_openssl.c +++ b/src/IO/tls_openssl.c @@ -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 " "signature algorithm, which is too weak " "to trust."; - *choice = a_Dialog_choice("Dillo TLS security warning", msg, + *choice = a_Dialog_choice("Flenser TLS security warning", msg, "Continue", "Cancel", NULL); if (*choice != 1) 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) { success = FALSE; - *choice = a_Dialog_choice("Dillo TLS security warning", + *choice = a_Dialog_choice("Flenser TLS security warning", err->str, "Continue", "Cancel", NULL); switch (*choice){ @@ -722,7 +722,7 @@ static bool_t Tls_check_cert_hostname(X509 *cert, const char *host, success = FALSE; msg = dStrconcat("Certificate common name ", common_name, " 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); 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 " "host is not who it claims to be -- that is, not " "the real ", host, NULL); - *choice = a_Dialog_choice("Dillo TLS security warning", + *choice = a_Dialog_choice("Flenser TLS security warning", msg, "Continue", "Cancel", NULL); dFree(msg); @@ -841,7 +841,7 @@ static int Tls_examine_certificate(SSL *ssl, Server_t *srv) const uint_t buflen = 4096; char buf[buflen], *cn, *msg; 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 remote_cert = SSL_get_peer_certificate(ssl); diff --git a/src/auth.c b/src/auth.c index 7a69fa3..3b4ae66 100644 --- a/src/auth.c +++ b/src/auth.c @@ -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); - 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" " and password for \"", auth_parse->realm, "\".\n\n" "Authentication scheme: ", typestr, NULL); diff --git a/src/cache.c b/src/cache.c index 9ed25b2..fd3a683 100644 --- a/src/cache.c +++ b/src/cache.c @@ -1150,7 +1150,7 @@ static void Cache_provide_redirection_blocked_page(CacheEntry_t *entry, a_Web_dispatch_by_type("text/html", clientWeb, &client->Callback, &client->CbData); client->Buf = dStrconcat("" - "Dillo blocked a redirection from Url), "\">", URL_STR(entry->Url), " to Location), "\">", URL_STR(entry->Location), " based on your domainrc " diff --git a/src/dialog.cc b/src/dialog.cc index af71b93..a523e8c 100644 --- a/src/dialog.cc +++ b/src/dialog.cc @@ -127,7 +127,7 @@ int EnterButton::handle(int e) void a_Dialog_msg(const char *title, const char *msg) { if (!(title && *title)) - title = "Dillo: Message"; + title = "Flenser: Message"; fl_message_title(title); fl_message("%s", msg); } @@ -156,7 +156,7 @@ const char *a_Dialog_input(const char *title, const char *msg) input_answer = 0; if (!(title && *title)) - title = "Dillo: Input"; + title = "Flenser: Input"; Fl_Window *window = new Fl_Window(ww,wh,title); 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) { if (!(title && *title)) - title = "Dillo: Password"; + title = "Flenser: Password"; fl_message_title(title); 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; if (!(title && *title)) - title = "Dillo: Text"; + title = "Flenser: Text"; Fl_Window *window = new Fl_Window(ww, wh, title); Fl_Group::current(0); @@ -345,7 +345,7 @@ int a_Dialog_choice(const char *title, const char *msg, ...) int i, n; if (title == NULL || *title == '\0') - title = "Dillo: Choice"; + title = "Flenser: Choice"; va_start(ap, msg); 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 */ if (!(title && *title)) - title = "Dillo: User/Password"; + title = "Flenser: User/Password"; Fl_Window *window = new Fl_Window(window_w,window_h,title); Fl_Group::current(0); window->user_data(NULL); diff --git a/src/dillo.cc b/src/dillo.cc index ad923e7..14117bf 100644 --- a/src/dillo.cc +++ b/src/dillo.cc @@ -628,6 +628,6 @@ int main(int argc, char **argv) /* TODO: auth, css */ //a_Dpi_dillo_exit(); - MSG("Dillo: normal exit!\n"); + MSG("Flenser: normal exit!\n"); return 0; } diff --git a/src/form.cc b/src/form.cc index b0da070..185def9 100644 --- a/src/form.cc +++ b/src/form.cc @@ -1042,7 +1042,7 @@ void DilloHtmlForm::submit(DilloHtmlInput *active_input, EventButton *event) { if (!dStrAsciiCasecmp(URL_SCHEME(html->page_url), "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 " "INSECURE protocol to submit data.", "Continue", "Cancel", NULL); diff --git a/src/paths.cc b/src/paths.cc index 9ce8414..3f71ab1 100644 --- a/src/paths.cc +++ b/src/paths.cc @@ -51,7 +51,7 @@ void Paths::init(void) path, dStrerror(errno)); } } else { - MSG("Dillo: error reading %s: %s\n", path, dStrerror(errno)); + MSG("Flenser: error reading %s: %s\n", path, dStrerror(errno)); } } diff --git a/src/uicmd.cc b/src/uicmd.cc index f3de030..533de28 100644 --- a/src/uicmd.cc +++ b/src/uicmd.cc @@ -529,7 +529,7 @@ static void win_cb (Fl_Widget *w, void *cb_data) { } 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.", "Close", "Cancel", NULL); if (choice == 1) @@ -717,7 +717,7 @@ void a_UIcmd_close_all_bw(void *) int choice = 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.", "Quit", "Cancel", NULL); if (choice == 1) @@ -1060,7 +1060,7 @@ static int UIcmd_save_file_check(const char *name) dStr_sprintf(ds, "The file: %s (%d Bytes) already exists. What do we do?", 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); dStr_free(ds, 1); return ch; @@ -1122,7 +1122,7 @@ void a_UIcmd_save(void *vbw) */ 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; DilloUrl *url; - name = a_Dialog_open_file("Dillo: Open File", NULL, ""); + name = a_Dialog_open_file("Flenser: Open File", NULL, ""); if (name) { url = a_Url_new(name, "file:"); @@ -1209,7 +1209,7 @@ void a_UIcmd_search_dialog(void *vbw) { 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); a_UIcmd_open_urlstr(vbw, 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 *passwd; - const char *title = "Dillo: Password"; + const char *title = "Flenser: Password"; char *msg = dStrconcat("Password for user \"", user, "\"", NULL); passwd = a_Dialog_passwd(title, 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) { - 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; 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 { - 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; 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)); snprintf(title + i, 4, "..."); } diff --git a/src/version.cc b/src/version.cc index ff387d5..bd18f15 100644 --- a/src/version.cc +++ b/src/version.cc @@ -123,7 +123,7 @@ void a_Version_print_info(void) version = GIT_COMMIT; #endif - printf("Dillo %s\n", version); + printf("Flenser %s\n", version); print_libs(); print_features(); } diff --git a/test/html/driver.sh b/test/html/driver.sh index c8347e9..1f0d2d2 100755 --- a/test/html/driver.sh +++ b/test/html/driver.sh @@ -35,9 +35,9 @@ function render_page() { sleep 1 # Capture only Dillo window - winid=$(xwininfo -all -root | awk '/Dillo:/ {print $1}') + winid=$(xwininfo -all -root | awk '/Flenser:/ {print $1}') if [ -z "$winid" ]; then - echo "cannot find Dillo window" >&2 + echo "cannot find Flenser window" >&2 exit 1 fi xwd -id "$winid" -silent | ${magick_bin} xwd:- png:${outpic}