static void search_reset_cb (GtkWidget * button, session * sess) { search_search (sess, ""); if (searchwin) { search_close_cb (button, searchwin); } }
static void search_find_cb (GtkWidget * button, session * sess) { GtkEntry *entry; const gchar *text; entry = g_object_get_data (G_OBJECT (button), "e"); text = gtk_entry_get_text (entry); search_search (sess, text); }
void test_onions(const void *s, const bool full) { char o[17]; RSA *r = NULL; FILE *out = NULL; while (true) { r = gen_rsa(); if (!r) goto end_loop; pthread_mutex_lock(&stats_lock); num_keys++; pthread_mutex_unlock(&stats_lock); if (!rsa_to_onion(r, o)) goto end_loop; if (search_search(s, o, full) || search_pronounce(o)) { warnx("found '%s'", o); pthread_mutex_lock(&stats_lock); num_matches++; pthread_mutex_unlock(&stats_lock); out = fopen(o, "w"); if (!out) { warn("fopen"); goto end_loop; } PEM_write_RSAPrivateKey(out, r, NULL, NULL, 0, NULL, NULL); } end_loop: if (r) { RSA_free(r); r = NULL; } if (out) { fclose(out); out = NULL; } } }
static void search_entry_cb (GtkWidget * entry, session * sess) { search_search (sess, gtk_entry_get_text (GTK_ENTRY (entry))); }
static void search_highlight_cb (GtkToggleButton * but, session * sess) { prefs.text_search_highlight_all = (but->active)? 1: 0; search_search (sess, NULL); }