bfm-0.6.4/0000755000175000017500000000000010100503032012167 5ustar josejose00000000000000bfm-0.6.4/debian/0000755000175000017500000000000010100350422013414 5ustar josejose00000000000000bfm-0.6.4/debian/compat0000644000175000017500000000000210100345425014621 0ustar josejose000000000000004 bfm-0.6.4/debian/dirs0000644000175000017500000000002110100345425014300 0ustar josejose00000000000000usr/bin usr/sbin bfm-0.6.4/debian/bubblefishymon.docs0000644000175000017500000000003010100345425017276 0ustar josejose00000000000000README README.bubblemon bfm-0.6.4/debian/gkrellm-bfm.dirs0000644000175000017500000000003110100345425016477 0ustar josejose00000000000000usr/lib/gkrellm2/plugins bfm-0.6.4/debian/control0000644000175000017500000000143110100347341015024 0ustar josejose00000000000000Source: bfm Section: x11 Priority: optional Maintainer: Jamie Wilkinson Build-Depends: debhelper (>> 4.0.0), gkrellm, libgtk2.0-dev Standards-Version: 3.6.1.0 Package: bubblefishymon Architecture: any Depends: ${shlibs:Depends} Description: system load dockapp with a duck A load monitor dockapp, descended from wmfishtime and bubblemon. Features include fish representing network traffic, bubbles representing CPU usage, and a duck representing a duck. Package: gkrellm-bfm Architecture: any Depends: ${shlibs:Depends} Description: system load plugin for gkrellm with a duck A load monitor plugin for gkrellm, descended from wmfishtime and bubblemon. Features include fish representing network traffic, bubbles representing CPU usage, and a duck representing a duck. bfm-0.6.4/debian/rules0000755000175000017500000000371610100347341014511 0ustar josejose00000000000000#!/usr/bin/make -f # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 # These are used for cross-compiling and for saving the configure script # from having to guess our platform (since we know it already) DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) CFLAGS = -Wall -g ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) CFLAGS += -O0 else CFLAGS += -O2 endif ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS))) CFLAGS += -g endif ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) INSTALL_PROGRAM += -s endif configure: configure-stamp configure-stamp: dh_testdir touch configure-stamp build: configure-stamp build-stamp build-stamp: dh_testdir $(MAKE) PREFIX=/usr bubblefishymon $(MAKE) PREFIX=/usr gkrellm touch build-stamp clean: dh_testdir dh_testroot rm -f build-stamp configure-stamp -$(MAKE) clean dh_clean install: DH_OPTIONS= install: build dh_testdir dh_testroot dh_clean -k dh_installdirs $(MAKE) PREFIX=/usr install DESTDIR=$(CURDIR)/debian/bubblefishymon cp gkrellm-bfm.so $(CURDIR)/debian/gkrellm-bfm/usr/lib/gkrellm2/plugins # Build architecture-independent files here. binary-indep: build install # nothing to do # Build architecture-dependent files here. binary-arch: build install dh_testdir -a dh_testroot -a # dh_installdebconf -a dh_installdocs -a dh_installexamples -a dh_installmenu -a # dh_installlogrotate -a # dh_installemacsen -a # dh_installpam -a # dh_installmime -a # dh_installinit -a # dh_installcron -a dh_installman -a doc/bubblefishymon.1 # dh_installinfo -a # dh_undocumented -a dh_installchangelogs -a ChangeLog dh_strip -a dh_link -a dh_compress -a dh_fixperms -a # dh_makeshlibs -a dh_installdeb -a # dh_perl -a dh_shlibdeps -a dh_gencontrol -a dh_md5sums -a dh_builddeb -a binary: binary-indep binary-arch .PHONY: build clean binary-indep binary-arch binary install configure bfm-0.6.4/debian/menu0000644000175000017500000000024210100345425014310 0ustar josejose00000000000000?package(bubblefishymon):\ needs=X11\ section=Apps/System\ hints="Dockapp,System,Monitor"\ title="bubblefishymon"\ command="/usr/bin/bubblefishymon -n" bfm-0.6.4/debian/docs0000644000175000017500000000005410100345426014276 0ustar josejose00000000000000README README.bubblemon TODO ChangeLog.orig bfm-0.6.4/debian/changelog0000644000175000017500000000461010100347765015307 0ustar josejose00000000000000bfm (0.6.3-1) unstable; urgency=low * New upstream release, new upstream maintainer. Thanks to James Rowe for taking on development. Thanks to Huw Giddens for his unofficial packages in the 0.6.x series. - Removed build-depends on libgtk1.2-dev. - Updated copyright. - Updated package descriptions. - Removed man page from debian/ directory as it's now in upstream. - Install new Xdefaults file into examples. * Updated rules file with some shiny new shines. -- Jamie Wilkinson Sat, 24 Jan 2004 12:40:18 +1100 bfm (0.5.1-7) unstable; urgency=low * Applied patch from Huw Giddens to finally fix the memory usage routines for 2.6 kernels that still works for 2.4 kernels. Thanks Huw. (Closes: #175140) -- Jamie Wilkinson Mon, 27 Oct 2003 19:07:11 +1100 bfm (0.5.1-6) unstable; urgency=low * The "stirring words from the DPL" release. * Added -fPIC to gkrellm2 target. Fixes FTBFS on hppa and others. -- Jamie Wilkinson Thu, 23 Jan 2003 17:33:56 +0800 bfm (0.5.1-5) unstable; urgency=low * The "promised I'd fix bugs while at LCA" release. * Recompiled against gkrellm 2 now that gkrellm 1 has been removed from the archive. (Closes: #159645) Patch thanks to Sjörd Simons. * Fixed installation path of gkrellm plugin. -- Jamie Wilkinson Thu, 23 Jan 2003 13:02:17 +0800 bfm (0.5.1-4) unstable; urgency=low * Bumped standards version to 3.5.8.0. * Set DH_COMPAT to 4. -- Jamie Wilkinson Sat, 30 Nov 2002 12:23:53 +1100 bfm (0.5.1-3) unstable; urgency=low * Applied gkrellm2 patch from Sjoerd Simons (Closes: #159645) * Moved example Xdefaults file from docs to examples. * Fixed manpage section. -- Jamie Wilkinson Fri, 6 Sep 2002 18:54:32 +1000 bfm (0.5.1-2) unstable; urgency=low * Added -fPIC to the gkrellm plugin CFLAGS. * Added to sys_linux.c. -- Jamie Wilkinson Mon, 26 Aug 2002 18:58:21 +1000 bfm (0.5.1-1) unstable; urgency=low * New upstream version. * Initial upload into Debian. (Closes: #157218) * Reworded manpage. * Fixed Build-Depends. -- Jamie Wilkinson Mon, 19 Aug 2002 10:50:39 +1000 bubblefishymon (0.3-1) unstable; urgency=low * Initial Release. -- Gurkan Sengun Sun, 30 Sep 2001 18:35:20 +0200 bfm-0.6.4/debian/README.Debian0000644000175000017500000000046710100347341015472 0ustar josejose00000000000000bfm for Debian -------------- Changed dockapp name from bfm to bubblefishymon. Gurkan recommends starting the docapp like so: bubblefishymon -n "aterm -tr -sh 69 +sb -rv -fn lime" "gmc --nodesktop" so clicking starts an aterm or a gmc. -- Jamie Wilkinson , Mon, 19 Aug 2002 10:50:39 +1000 bfm-0.6.4/debian/copyright0000644000175000017500000000201110100347341015347 0ustar josejose00000000000000This package was debianized by Jamie Wilkinson on Mon, 19 Aug 2002 10:50:39 +1000. It was downloaded from http://www.jnrowe.ukfsn.org/projects/bfm.html Upstream Author: James Rowe Copyright: This package is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 dated June, 1991. This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this package; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. On Debian GNU/Linux systems, the complete text of the GNU General Public License can be found in `/usr/share/common-licenses/GPL'. bfm-0.6.4/debian/bubblefishymon.examples0000644000175000017500000000002510100347341020167 0ustar josejose00000000000000doc/Xdefaults.sample bfm-0.6.4/debian/bubblefishymon.dirs0000644000175000017500000000003310100345426017313 0ustar josejose00000000000000usr/bin usr/share/man/man1 bfm-0.6.4/debian/gkrellm-bfm.docs0000644000175000017500000000003010100347341016464 0ustar josejose00000000000000README README.bubblemon bfm-0.6.4/debian/gkrellm-bfm.examples0000644000175000017500000000002510100347341017356 0ustar josejose00000000000000doc/Xdefaults.sample bfm-0.6.4/TODO0000644000175000017500000000002010100345430012655 0ustar josejose00000000000000Read README :) bfm-0.6.4/gkrellm-bfm.c0000644000175000017500000004475610100503032014552 0ustar josejose00000000000000/* * * gkrellm-bfm.c * Pigeon(pigeon@pigeond.net) * * http://pigeond.net/bfm/ * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA * 02111-1307, USA. * */ #ifdef GKRELLM2 #include #else #include #endif #include #include #include #include #include #define PLUGIN_VERSION "0.6.4" #define PLUGIN_NAME "gkrellm-bfm" #define PLUGIN_DESC "bubblefishymon gkrellm port" #define PLUGIN_URL "http://www.jnrowe.ukfsn.org/projects/bfm/" #define PLUGIN_STYLE PLUGIN_NAME #define PLUGIN_KEYWORD PLUGIN_NAME #define DEBUG 0 #define CHART_W 56 #define CHART_H 56 #ifdef GKRELLM2 # define Monitor GkrellmMonitor # define Chart GkrellmChart # define ChartConfig GkrellmChartconfig # define gkrellm_create_tab gkrellm_gtk_notebook_page # define gkrellm_create_framed_tab gkrellm_gtk_framed_notebook_page # define gkrellm_scrolled_text gkrellm_gtk_scrolled_text_view # define gkrellm_add_info_text gkrellm_gtk_text_view_append_strings # define init_plugin gkrellm_init_plugin #endif static gint style_id; static char *prog = NULL; static Monitor *mon = NULL; static Chart *chart = NULL; static ChartConfig *chart_config = NULL; static gint timeout_id, update_interval; /* From the actual bfm */ int bfm_main(); void gkrellm_update(GtkWidget *widget, GdkDrawable *drawable, int start_x, int proximity); void prepare_sprites(void); extern int cpu_enabled; extern int duck_enabled; extern int fish_enabled; extern int fish_traffic; extern int time_enabled; extern int memscreen_enabled; int proximity = 0; /* Options stuffs */ GtkWidget *prog_entry = NULL; GtkWidget *cpu_check = NULL; GtkWidget *mem_check = NULL; GtkWidget *duck_check = NULL; GtkWidget *fish_check = NULL; GtkWidget *clock_check = NULL; GtkWidget *fish_traffic_check = NULL; static gboolean update_plugin(void) { GdkEventExpose event; gint ret_val; gtk_signal_emit_by_name(GTK_OBJECT(chart->drawing_area), "expose_event", &event, &ret_val); return TRUE; /* restart timer */ } static gint chart_expose_event(GtkWidget *widget, GdkEventExpose *ev) { int x; x = (gkrellm_chart_width() - CHART_W) / 2; gkrellm_update(widget, chart->pixmap, x, proximity); gkrellm_draw_chart_to_screen(chart); return TRUE; } static gint button_release_event(GtkWidget *widget, GdkEventButton *ev, gpointer data) { switch(ev->button) { case 1: case 2: if(prog) { gchar *cmd; cmd = g_strdup_printf("%s &", prog); system(cmd); g_free(cmd); } break; case 3: gkrellm_open_config_window(mon); break; default: break; } return TRUE; } static gint enter_notify_event(GtkWidget *widget, GdkEventMotion *ev, gpointer data) { proximity = 1; return TRUE; } static gint leave_notify_event(GtkWidget *widget, GdkEventMotion *ev, gpointer data) { proximity = 0; return TRUE; } static void disable_plugin(void) { if (timeout_id) gtk_timeout_remove(timeout_id); timeout_id = 0; } static void create_plugin(GtkWidget *vbox, gint first_create) { if(first_create) { chart = gkrellm_chart_new0(); } gkrellm_set_chart_height_default(chart, CHART_H); gkrellm_chart_create(vbox, mon, chart, &chart_config); if(first_create) { bfm_main(); gtk_signal_connect(GTK_OBJECT(chart->drawing_area), "expose_event", (GtkSignalFunc) chart_expose_event, NULL); gtk_signal_connect(GTK_OBJECT(chart->drawing_area), "button_release_event", GTK_SIGNAL_FUNC(button_release_event), NULL); gtk_signal_connect(GTK_OBJECT(chart->drawing_area), "enter_notify_event", GTK_SIGNAL_FUNC(enter_notify_event), NULL); gtk_signal_connect(GTK_OBJECT(chart->drawing_area), "leave_notify_event", GTK_SIGNAL_FUNC(leave_notify_event), NULL); } if (!timeout_id) timeout_id = gtk_timeout_add(1000 / update_interval, (GtkFunction) update_plugin, NULL); gkrellm_disable_plugin_connect(mon, disable_plugin); } static void option_toggled_cb(GtkToggleButton *button, gpointer user_data) { gboolean active = gtk_toggle_button_get_active(button); GtkWidget *togglebutton = GTK_WIDGET(button); if(togglebutton == cpu_check) { cpu_enabled = active; } else if(togglebutton == mem_check) { memscreen_enabled = active; } else if(togglebutton == duck_check) { duck_enabled = active; } else if(togglebutton == fish_check) { fish_enabled = active; if(fish_enabled) { gtk_widget_set_sensitive(fish_traffic_check, TRUE); } else { gtk_widget_set_sensitive(fish_traffic_check, FALSE); } } else if(togglebutton == clock_check) { time_enabled = active; } else if(togglebutton == fish_traffic_check) { fish_traffic = active; /* Call this to reinitialize the fishes */ prepare_sprites(); } } void setup_toggle_buttons(void) { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(cpu_check), cpu_enabled); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(mem_check), memscreen_enabled); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(duck_check), duck_enabled); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(fish_check), fish_enabled); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(clock_check), time_enabled); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(fish_traffic_check), fish_traffic); } static void cb_interval_modified(GtkWidget *widget, GtkSpinButton *spin) { update_interval = gtk_spin_button_get_value_as_int(spin); if (timeout_id) gtk_timeout_remove(timeout_id); timeout_id = gtk_timeout_add(1000 / update_interval, (GtkFunction) update_plugin, NULL); } static gchar *pending_prog; static void cb_prog_entry(GtkWidget *widget, gpointer data) { gboolean activate_sig = GPOINTER_TO_INT(data); gchar *s = gkrellm_gtk_entry_get_text(&prog_entry); if (activate_sig) { gkrellm_dup_string(&prog, s); g_free(pending_prog); pending_prog = NULL; } else /* "changed" sig, entry is pending on "activate" or config close */ gkrellm_dup_string(&pending_prog, s); } static void config_destroyed(void) { if (pending_prog) gkrellm_dup_string(&prog, pending_prog); g_free(pending_prog); pending_prog = NULL; } static void create_plugin_tab(GtkWidget *tab_vbox) { GtkWidget *tabs = NULL; GtkWidget *options_tab = NULL; GtkWidget *info_tab = NULL; GtkWidget *info = NULL; GtkWidget *about_tab = NULL; GtkWidget *about = NULL; GtkWidget *main_box; GtkWidget *prog_box; GtkWidget *prog_label; GtkWidget *row1; GtkWidget *cpu_box; GtkWidget *mem_box; GtkWidget *row2; GtkWidget *duck_box; GtkWidget *fish_box; GtkWidget *row3; GtkWidget *clock_box; GtkWidget *fish_traffic_box; static gchar *info_text[] = { "" PLUGIN_NAME " " PLUGIN_VERSION "\n\n", "bubblefishymon gkrellm port\n", "Pigeon(pigeon@pigeond.net)\n", PLUGIN_URL "\n\n", "Original bubblemon by Johan\n", "http://www.student.nada.kth.se/~d92-jwa/code/\n\n", "More hacks by Timecop\n", "http://www.ne.jp/asahi/linux/timecop/\n\n", "And more hacks by James Rowe\n\n", "Usage\n\n", "Nice monitor with:\n", "- Water level representing the memory usage...\n", "- Water color representing swap status...\n", "- Bubbles representing CPU usage...\n", "- Fish representing network traffic...\n", " (Fish swiming from left to right represents outgoing traffic,\n", " fish swiming from right to left represents incoming traffic)\n", "- Cute little duck swimming...\n", "- Clock hands representing time (obviously)...\n", "- Click and it will run a command for you (requested by Nick =)\n", "\n\n", }; static gchar *about_text = _( "BubbleFishyMon " PLUGIN_VERSION "\n" PLUGIN_NAME " - " PLUGIN_DESC "\n\n" "Copyright (C) 2001 Pigeon\n" "pigeon@pigeond.net\n" PLUGIN_URL "\n\n" "Released under the GNU Public Licence" ); tabs = gtk_notebook_new(); gtk_notebook_set_tab_pos(GTK_NOTEBOOK(tabs), GTK_POS_TOP); gtk_box_pack_start(GTK_BOX(tab_vbox), tabs, TRUE, TRUE, 0); g_signal_connect(G_OBJECT(tabs),"destroy", G_CALLBACK(config_destroyed), NULL); /* Options tab */ options_tab = gkrellm_create_tab(tabs, _("Options")); main_box = gtk_vbox_new (FALSE, 0); gtk_widget_set_name (main_box, "main_box"); gtk_widget_ref (main_box); gtk_object_set_data_full (GTK_OBJECT (options_tab), "main_box", main_box, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (main_box); gtk_container_add (GTK_CONTAINER (options_tab), main_box); prog_box = gtk_hbox_new (FALSE, 0); gtk_widget_set_name (prog_box, "prog_box"); gtk_widget_ref (prog_box); gtk_object_set_data_full (GTK_OBJECT (options_tab), "prog_box", prog_box, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (prog_box); gtk_box_pack_start (GTK_BOX (main_box), prog_box, TRUE, TRUE, 0); prog_label = gtk_label_new (_("Program to execute when clicked: ")); gtk_widget_set_name (prog_label, "prog_label"); gtk_widget_ref (prog_label); gtk_object_set_data_full (GTK_OBJECT (options_tab), "prog_label", prog_label, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (prog_label); gtk_box_pack_start (GTK_BOX (prog_box), prog_label, FALSE, FALSE, 0); prog_entry = gtk_entry_new (); if(prog) { gtk_entry_set_text(GTK_ENTRY(prog_entry), prog); } gtk_widget_set_name (prog_entry, "prog_entry"); gtk_widget_ref (prog_entry); gtk_object_set_data_full (GTK_OBJECT (options_tab), "prog_entry", prog_entry, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (prog_entry); gtk_box_pack_start (GTK_BOX (prog_box), prog_entry, TRUE, TRUE, 0); g_signal_connect(G_OBJECT(prog_entry), "activate", G_CALLBACK(cb_prog_entry), GINT_TO_POINTER(1)); g_signal_connect(G_OBJECT(prog_entry), "changed", G_CALLBACK(cb_prog_entry), GINT_TO_POINTER(0)); row1 = gtk_hbox_new (FALSE, 0); gtk_widget_set_name (row1, "row1"); gtk_widget_ref (row1); gtk_object_set_data_full (GTK_OBJECT (options_tab), "row1", row1, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (row1); gtk_box_pack_start (GTK_BOX (main_box), row1, TRUE, TRUE, 0); cpu_box = gtk_hbox_new (FALSE, 0); gtk_widget_set_name (cpu_box, "cpu_box"); gtk_widget_ref (cpu_box); gtk_object_set_data_full (GTK_OBJECT (options_tab), "cpu_box", cpu_box, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (cpu_box); gtk_box_pack_start (GTK_BOX (row1), cpu_box, FALSE, TRUE, 0); cpu_check = gtk_check_button_new_with_label (_("CPU")); gtk_widget_set_name (cpu_check, "cpu_check"); gtk_widget_ref (cpu_check); gtk_object_set_data_full (GTK_OBJECT (options_tab), "cpu_check", cpu_check, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (cpu_check); gtk_box_pack_start (GTK_BOX (cpu_box), cpu_check, FALSE, TRUE, 0); gtk_widget_set_usize (cpu_check, 220, -2); mem_box = gtk_hbox_new (FALSE, 0); gtk_widget_set_name (mem_box, "mem_box"); gtk_widget_ref (mem_box); gtk_object_set_data_full (GTK_OBJECT (options_tab), "mem_box", mem_box, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (mem_box); gtk_box_pack_start (GTK_BOX (row1), mem_box, TRUE, TRUE, 0); mem_check = gtk_check_button_new_with_label (_("Memory")); gtk_widget_set_name (mem_check, "mem_check"); gtk_widget_ref (mem_check); gtk_object_set_data_full (GTK_OBJECT (options_tab), "mem_check", mem_check, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (mem_check); gtk_box_pack_start (GTK_BOX (mem_box), mem_check, TRUE, TRUE, 0); row2 = gtk_hbox_new (FALSE, 0); gtk_widget_set_name (row2, "row2"); gtk_widget_ref (row2); gtk_object_set_data_full (GTK_OBJECT (options_tab), "row2", row2, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (row2); gtk_box_pack_start (GTK_BOX (main_box), row2, TRUE, TRUE, 0); duck_box = gtk_hbox_new (FALSE, 0); gtk_widget_set_name (duck_box, "duck_box"); gtk_widget_ref (duck_box); gtk_object_set_data_full (GTK_OBJECT (options_tab), "duck_box", duck_box, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (duck_box); gtk_box_pack_start (GTK_BOX (row2), duck_box, FALSE, TRUE, 0); duck_check = gtk_check_button_new_with_label (_("Duck")); gtk_widget_set_name (duck_check, "duck_check"); gtk_widget_ref (duck_check); gtk_object_set_data_full (GTK_OBJECT (options_tab), "duck_check", duck_check, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (duck_check); gtk_box_pack_start (GTK_BOX (duck_box), duck_check, FALSE, TRUE, 0); gtk_widget_set_usize (duck_check, 220, -2); fish_box = gtk_hbox_new (FALSE, 0); gtk_widget_set_name (fish_box, "fish_box"); gtk_widget_ref (fish_box); gtk_object_set_data_full (GTK_OBJECT (options_tab), "fish_box", fish_box, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (fish_box); gtk_box_pack_start (GTK_BOX (row2), fish_box, TRUE, TRUE, 0); fish_check = gtk_check_button_new_with_label (_("Fish")); gtk_widget_set_name (fish_check, "fish_check"); gtk_widget_ref (fish_check); gtk_object_set_data_full (GTK_OBJECT (options_tab), "fish_check", fish_check, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (fish_check); gtk_box_pack_start (GTK_BOX (fish_box), fish_check, TRUE, TRUE, 0); row3 = gtk_hbox_new (FALSE, 0); gtk_widget_set_name (row3, "row3"); gtk_widget_ref (row3); gtk_object_set_data_full (GTK_OBJECT (options_tab), "row3", row3, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (row3); gtk_box_pack_start (GTK_BOX (main_box), row3, TRUE, TRUE, 0); clock_box = gtk_hbox_new (FALSE, 0); gtk_widget_set_name (clock_box, "clock_box"); gtk_widget_ref (clock_box); gtk_object_set_data_full (GTK_OBJECT (options_tab), "clock_box", clock_box, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (clock_box); gtk_box_pack_start (GTK_BOX (row3), clock_box, FALSE, TRUE, 0); clock_check = gtk_check_button_new_with_label (_("Show clock")); gtk_widget_set_name (clock_check, "clock_check"); gtk_widget_ref (clock_check); gtk_object_set_data_full (GTK_OBJECT (options_tab), "clock_check", clock_check, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (clock_check); gtk_box_pack_start (GTK_BOX (clock_box), clock_check, FALSE, TRUE, 0); gtk_widget_set_usize (clock_check, 220, -2); fish_traffic_box = gtk_hbox_new (FALSE, 0); gtk_widget_set_name (fish_traffic_box, "fish_traffic_box"); gtk_widget_ref (fish_traffic_box); gtk_object_set_data_full (GTK_OBJECT (options_tab), "fish_traffic_box", fish_traffic_box, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (fish_traffic_box); gtk_box_pack_start (GTK_BOX (row3), fish_traffic_box, TRUE, TRUE, 0); fish_traffic_check = gtk_check_button_new_with_label (_("Fish represents network traffic")); gtk_widget_set_name (fish_traffic_check, "fish_traffic_check"); gtk_widget_ref (fish_traffic_check); gtk_object_set_data_full (GTK_OBJECT (options_tab), "fish_traffic_check", fish_traffic_check, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (fish_traffic_check); gtk_box_pack_start (GTK_BOX (fish_traffic_box), fish_traffic_check, TRUE, TRUE, 0); gkrellm_gtk_spin_button(main_box, NULL, update_interval, 10.0, 50.0, 1.0, 5.0, 0, 60, cb_interval_modified, NULL, FALSE, _("Updates per second")); setup_toggle_buttons(); gtk_signal_connect(GTK_OBJECT(cpu_check), "toggled", GTK_SIGNAL_FUNC(option_toggled_cb), NULL); gtk_signal_connect(GTK_OBJECT(mem_check), "toggled", GTK_SIGNAL_FUNC(option_toggled_cb), NULL); gtk_signal_connect(GTK_OBJECT(duck_check), "toggled", GTK_SIGNAL_FUNC(option_toggled_cb), NULL); gtk_signal_connect(GTK_OBJECT(fish_check), "toggled", GTK_SIGNAL_FUNC(option_toggled_cb), NULL); gtk_signal_connect(GTK_OBJECT(clock_check), "toggled", GTK_SIGNAL_FUNC(option_toggled_cb), NULL); gtk_signal_connect(GTK_OBJECT(fish_traffic_check), "toggled", GTK_SIGNAL_FUNC(option_toggled_cb), NULL); /* Info tab */ info_tab = gkrellm_create_framed_tab(tabs, _("Info")); info = gkrellm_scrolled_text(info_tab, NULL, GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gkrellm_add_info_text(info, info_text, sizeof(info_text) / sizeof(gchar *)); /* About tab */ about_tab = gkrellm_create_tab(tabs, _("About")); about = gtk_label_new(about_text); gtk_box_pack_start(GTK_BOX(about_tab), about, TRUE, TRUE, 0); } static void save_plugin_config(FILE *f) { if(prog) { fprintf(f, "%s prog %s\n", PLUGIN_KEYWORD, prog); } fprintf(f, "%s options %d.%d.%d.%d.%d.%d.%d\n", PLUGIN_KEYWORD, cpu_enabled, duck_enabled, memscreen_enabled, fish_enabled, fish_traffic, time_enabled, update_interval); } static void load_plugin_config(gchar *config_line) { gchar *config_item, *value; config_item = strtok(config_line, " \n"); if(!config_item) return; value = strtok(NULL, "\n"); if(!strcmp(config_item, "prog")) { g_free(prog); prog = g_strdup(value); } else if(!strcmp(config_item, "options")) { sscanf(value, "%d.%d.%d.%d.%d.%d.%d", &cpu_enabled, &duck_enabled, &memscreen_enabled, &fish_enabled, &fish_traffic, &time_enabled, &update_interval); } } static Monitor bfm_mon = { PLUGIN_NAME, /* Name, for config tab. */ 0, /* Id, 0 if a plugin */ create_plugin, /* The create_plugin() function */ NULL, /* The update_plugin() function */ create_plugin_tab, /* The create_plugin_tab() config function */ NULL, /* The apply_plugin_config() function */ save_plugin_config, /* The save_plugin_config() function */ load_plugin_config, /* The load_plugin_config() function */ PLUGIN_KEYWORD, /* config keyword */ NULL, /* Undefined 2 */ NULL, /* Undefined 1 */ NULL, /* private */ MON_CPU, /* Insert plugin before this monitor. */ NULL, /* Handle if a plugin, filled in by GKrellM */ NULL /* path if a plugin, filled in by GKrellM */ }; Monitor * init_plugin(void) { update_interval = 20; style_id = gkrellm_add_meter_style(&bfm_mon, PLUGIN_STYLE); return (mon = &bfm_mon); } bfm-0.6.4/include/0000755000175000017500000000000010100350425013620 5ustar josejose00000000000000bfm-0.6.4/include/sprites.h0000644000175000017500000005014210100345426015471 0ustar josejose00000000000000/* GIMP header image file format (INDEXED): /tmp/fishmon-work/sprites.h */ static unsigned int width = 35; static unsigned int height = 208; /* Call this macro repeatedly. After each use, the pixel data can be extracted */ #define HEADER_PIXEL(data,pixel) {\ pixel[0] = header_data_cmap[(unsigned char)data[0]][0]; \ pixel[1] = header_data_cmap[(unsigned char)data[0]][1]; \ pixel[2] = header_data_cmap[(unsigned char)data[0]][2]; \ data ++; } static unsigned char header_data_cmap[256][3] = { { 55, 95,135}, { 0, 0, 0}, {255,255,255}, {199,119, 43}, {199,159, 43}, { 0,170, 0}, { 7,115, 0}, {171,186,198}, {255, 0, 0}, {191, 0, 0}, {119,199, 43}, {159,199, 43}, { 47,107,135}, { 75,131,159}, { 23, 83,111}, {111,159,183}, {199,199, 43}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255}, {255,255,255} }; static char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2,2,2,2,2,2, 2,2,0,0,12,13,13,0,0,2,0,14,12,13,0,2, 0,14,0, 0,0,1,1,1,0,0,0,0,2,0,1,1,1,0,1, 0,2,0,12,13,13,15,13,0,2,0,14,12,12,0,2, 0,0,0, 0,1,16,16,16,1,0,1,0,2,1,4,1,4,1,4, 1,2,0,12,12,12,13,13,0,2,0,14,14,14,0,2, 2,2,2, 1,16,1,16,16,16,1,16,1,2,1,4,4,4,1,4, 1,2,0,14,12,12,12,14,0,2,0,0,0,0,0,2, 0,0,0, 1,16,16,16,16,16,1,16,1,2,0,1,1,1,0,1, 0,2,0,0,14,14,14,0,0,2,2,2,2,2,2,2, 0,0,0, 0,1,16,16,16,1,0,1,0,2,2,2,2,2,2,2, 2,2,0,0,0,0,0,0,0,2,0,0,0,0,2,0, 0,0,0, 0,0,1,1,1,0,0,0,0,2,0,1,1,1,0,1, 0,2,2,2,2,2,2,2,2,2,0,14,12,0,2,0, 0,0,0, 2,2,2,2,2,2,2,2,2,2,1,3,3,3,1,3, 1,2,0,0,0,0,0,0,0,2,0,14,14,0,2,0, 0,0,0, 0,0,0,0,0,0,0,0,0,2,0,1,1,1,0,1, 0,2,0,0,12,13,15,13,0,2,0,0,0,0,2,0, 0,0,0, 0,0,0,0,0,0,0,0,0,2,2,2,2,2,2,2, 2,2,0,14,12,12,12,12,0,2,2,2,2,2,2,0, 0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,2,0,14,14,14,12,0,0,2,0,0,0,0,0,0, 0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,2,0,0,0,0,0,0,0,2,0,0,0,0,0,0, 0,0,0 }; bfm-0.6.4/include/ducks.h0000644000175000017500000000406010100345426015107 0ustar josejose00000000000000static char duck_cmap[4][3] = { { 32,152,248}, {248,252, 0}, {248,176, 64}, { 0, 0, 0} }; static int duck_data[3][306] = { {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0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\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0""0\212\356" "0\212\3560\212\356\0\0\0""0\212\3560\212\3560\212\356\0\0\0\0\0\0\0\0\0""0" "\212\3560\212\3560\212\356\0\0\0""0\212\3560\212\3560\212\356\0\0\0\0\0\0" """0\212\3560\212\3560\212\356\0\0\0""0\212\3560\212\3560\212\356\0\0\0\0" "\0\0\0\0\0""0\212\3560\212\3560\212\356\0\0\0""0\212\3560\212\3560\212\356" "\0\0\0\0\0\0""0\212\3560\212\3560\212\356\0\0\0""0\212\3560\212\3560\212" "\356\0\0\0\0\0\0\0\0\0""0\212\3560\212\3560\212\356\0\0\0""0\212\3560\212" "\3560\212\356\0\0\0""0\212\356\0\0\0""0\212\356\0\0\0""0\212\356\0\0\0""0" "\212\356\0\0\0\0\0\0\0\0\0""0\212\356\0\0\0""0\212\356\0\0\0""0\212\356\0" "\0\0""0\212\356\0\0\0\0\0\0""0\212\356\0\0\0""0\212\356\0\0\0""0\212\356" "\0\0\0""0\212\356\0\0\0\0\0\0\0\0\0""0\212\356\0\0\0""0\212\356\0\0\0""0" "\212\356\0\0\0""0\212\356\0\0\0\0\0\0""0\212\356\0\0\0""0\212\356\0\0\0""0" "\212\356\0\0\0""0\212\356\0\0\0\0\0\0\0\0\0""0\212\356\0\0\0""0\212\356\0" "\0\0""0\212\356\0\0\0""0\212\356\0\0\0""0\212\356\0\0\0""0\212\356\0\0\0" """0\212\356\0\0\0""0\212\356\0\0\0\0\0\0\0\0\0""0\212\356\0\0\0""0\212\356" "\0\0\0""0\212\356\0\0\0""0\212\356\0\0\0\0\0\0""0\212\356\0\0\0""0\212\356" "\0\0\0""0\212\356\0\0\0""0\212\356\0\0\0\0\0\0\0\0\0""0\212\356\0\0\0""0" "\212\356\0\0\0""0\212\356\0\0\0""0\212\356\0\0\0\0\0\0""0\212\356\0\0\0""0" "\212\356\0\0\0""0\212\356\0\0\0""0\212\356\0\0\0\0\0\0\0\0\0""0\212\356\0" "\0\0""0\212\356\0\0\0""0\212\356\0\0\0""0\212\356\0\0\0""0\212\356\0\0\0" """0\212\356\0\0\0""0\212\356\0\0\0""0\212\356\0\0\0\0\0\0\0\0\0""0\212\356" "\0\0\0""0\212\356\0\0\0""0\212\356\0\0\0""0\212\356\0\0\0\0\0\0""0\212\356" "\0\0\0""0\212\356\0\0\0""0\212\356\0\0\0""0\212\356\0\0\0\0\0\0\0\0\0""0" "\212\356\0\0\0""0\212\356\0\0\0""0\212\356\0\0\0""0\212\356\0\0\0\0\0\0""0" "\212\356\0\0\0""0\212\356\0\0\0""0\212\356\0\0\0""0\212\356\0\0\0\0\0\0\0" "\0\0""0\212\356\0\0\0""0\212\356\0\0\0""0\212\356\0\0\0""0\212\356\0\0\0" """0\212\356\0\0\0""0\212\356\0\0\0""0\212\356\0\0\0""0\212\356\0\0\0\0\0" "\0\0\0\0""0\212\356\0\0\0""0\212\356\0\0\0""0\212\356\0\0\0""0\212\356\0" "\0\0\0\0\0""0\212\356\0\0\0""0\212\356\0\0\0""0\212\356\0\0\0""0\212\356" "\0\0\0\0\0\0\0\0\0""0\212\356\0\0\0""0\212\356\0\0\0""0\212\356\0\0\0""0" "\212\356\0\0\0\0\0\0""0\212\356\0\0\0""0\212\356\0\0\0""0\212\356\0\0\0""0" "\212\356\0\0\0\0\0\0\0\0\0""0\212\356\0\0\0""0\212\356\0\0\0""0\212\356\0" "\0\0""0\212\356\0\0\0""0\212\356\0\0\0""0\212\356\0\0\0""0\212\356\0\0\0" """0\212\356\0\0\0\0\0\0\0\0\0""0\212\356\0\0\0""0\212\356\0\0\0""0\212\356" "\0\0\0""0\212\356\0\0\0\0\0\0""0\212\356\0\0\0""0\212\356\0\0\0""0\212\356" "\0\0\0""0\212\356\0\0\0\0\0\0\0\0\0""0\212\356\0\0\0""0\212\356\0\0\0""0" "\212\356\0\0\0""0\212\356\0\0\0\0\0\0""0\212\356\0\0\0""0\212\356\0\0\0""0" "\212\356\0\0\0""0\212\356\0\0\0\0\0\0\0\0\0""0\212\356\0\0\0""0\212\356\0" "\0\0""0\212\356\0\0\0""0\212\356\0\0\0""0\212\356\0\0\0""0\212\356\0\0\0" """0\212\356\0\0\0""0\212\356\0\0\0""0\212\356\0\0\0""0\212\356\0\0\0""0\212" "\356\0\0\0""0\212\356\0\0\0""0\212\356\0\0\0\0\0\0""0\212\356\0\0\0""0\212" "\356\0\0\0""0\212\356\0\0\0""0\212\356\0\0\0""0\212\356\0\0\0""0\212\356" "\0\0\0""0\212\356\0\0\0""0\212\356\0\0\0""0\212\356\0\0\0\0\0\0""0\212\356" "\0\0\0""0\212\356\0\0\0""0\212\356\0\0\0""0\212\356\0\0\0""0\212\356\0\0" "\0""0\212\356\0\0\0""0\212\356\0\0\0""0\212\356\0\0\0""0\212\356\0\0\0""0" "\212\3560\212\3560\212\356\0\0\0""0\212\3560\212\3560\212\356\0\0\0""0\212" "\356\0\0\0""0\212\3560\212\3560\212\356\0\0\0""0\212\3560\212\3560\212\356" "\0\0\0\0\0\0""0\212\3560\212\3560\212\356\0\0\0""0\212\3560\212\3560\212" "\356\0\0\0""0\212\356\0\0\0""0\212\3560\212\3560\212\356\0\0\0""0\212\356" "0\212\3560\212\356\0\0\0\0\0\0""0\212\3560\212\3560\212\356\0\0\0""0\212" "\3560\212\3560\212\356\0\0\0""0\212\356\0\0\0""0\212\3560\212\3560\212\356" "\0\0\0""0\212\3560\212\3560\212\356\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0""0\212\3560\212\3560\212\3560\212\3560\212\356" "0\212\3560\212\3560\212\3560\212\3560\212\3560\212\3560\212\3560\212\356" "0\212\3560\212\3560\212\3560\212\3560\212\3560\212\3560\212\3560\212\356" "0\212\3560\212\3560\212\3560\212\3560\212\3560\212\3560\212\3560\212\356" "0\212\3560\212\3560\212\3560\212\3560\212\3560\212\3560\212\3560\212\356" "0\212\3560\212\3560\212\3560\212\3560\212\3560\212\3560\212\3560\212\356" "0\212\3560\212\3560\212\3560\212\3560\212\3560\212\3560\212\356\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\0\0\0\0\0" "\0\0\0\0\0\0\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\40\0\0\0\0\0\0\0\0\0\0\0\0\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40" "\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6" "*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\0\0\0\0\0\0\0\0\0\0\0\0\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\0\0" "\0\0\0\0\0\0\0\0\0\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40" "\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40" "\40\40\40\40\40\40\40\0\0\0\0\0\0\0\0\0\0\0\0\6*\0\6*\0\6*\0\6*\0\6*\0\6" "*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0" "\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6" "*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0" "\6*\0\6*\0\6*\0\0\0\0\0\0\0\0\0\0\0\0\0\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40" "\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6" "*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\0\0\0\0\0\0\0\0\0\0\0\0\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\0\0" "\0\0\0\0\0\0\0\0\0\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40" "\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40" "\40\40\40\40\40\40\40\0\0\0\0\0\0\0\0\0\0\0\0\40\40\40\40\40\40\40\40\40" "\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40" "\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6" "*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\0\0\0\0\0\0\0\0\0\0\0\0" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40" "\0\0\0\0\0\0\0\0\0\0\0\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40" "\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40" "\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40" "\40\40\40\40\40\40\40\40\40\0\0\0\0\0\0\0\0\0\0\0\0\40\40\40\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40" "\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\0\0\0\0\0\0\0\0\0\0" "\0\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*" "\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0" "\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6" "*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\0\0\0\0\0\0\0\0\0\0\0\0" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40" "\0\0\0\0\0\0\0\0\0\0\0\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40" "\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40" "\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40" "\40\40\40\40\40\40\40\40\40\0\0\0\0\0\0\0\0\0\0\0\0\40\40\40\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40" "\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\0\0\0\0\0\0\0\0\0\0" "\0\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40" "\40\40\0\0\0\0\0\0\0\0\0\0\0\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40" "\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40" "\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\0\0\0\0\0\0\0\0\0\0\0\0\40\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\0\0\0\0\0\0\0" "\0\0\0\0\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\0\0\0\0\0\0\0\0\0\0\0\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6" "*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0" "\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6" "*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0" "\6*\0\0\0\0\0\0\0\0\0\0\0\0\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40" "\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6" "*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\0\0\0\0\0\0\0\0\0\0\0\0\40\40\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40" "\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\0\0\0\0\0\0\0\0" "\0\0\0\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\0\0\0\0\0\0\0\0\0\0\0\0\40\40\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40" "\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6" "*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\0\0\0\0\0\0\0\0\0\0\0\0\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\0\0\0\0\0" "\0\0\0\0\0\0\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\40\0\0\0\0\0\0\0\0\0\0\0\0\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40" "\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6" "*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\0\0\0\0\0\0\0\0\0\0\0\0\6*\0\6" "*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0" "\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6" "*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0" "\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\0\0\0\0\0\0\0\0\0\0\0\0\40\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\0\0\0\0\0\0\0" "\0\0\0\0\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\0\0\0\0\0\0\0\0\0\0\0\0\40\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40" "\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40" "\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0""0\212\3560\212\3560\212\3560\212" "\3560\212\3560\212\3560\212\3560\212\3560\212\3560\212\3560\212\3560\212" "\3560\212\3560\212\3560\212\3560\212\3560\212\3560\212\3560\212\3560\212" "\3560\212\3560\212\3560\212\3560\212\3560\212\3560\212\3560\212\3560\212" "\3560\212\3560\212\3560\212\3560\212\3560\212\3560\212\3560\212\3560\212" "\3560\212\3560\212\3560\212\3560\212\3560\212\3560\212\3560\212\3560\212" "\3560\212\3560\212\3560\212\3560\212\3560\212\3560\212\3560\212\3560\212" "\356\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\376\376\376\376\376\376\376\376" "\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376" "\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376" "\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376" "\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376" "\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376" "\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376" "\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376" "\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376" "\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0""0\213\357" "0\213\3570\213\357\0\0\0\0\0\0\0\0\0""0\213\357\0\0\0""0\213\3570\213\357" "0\213\357\0\0\0""0\213\3570\213\3570\213\357\0\0\0\0\0\0\0\0\0""0\213\357" "\0\0\0""0\213\3570\213\3570\213\357\0\0\0""0\213\3570\213\3570\213\357\0" "\0\0""0\213\3570\213\3570\213\357\0\0\0""0\213\3570\213\3570\213\357\0\0" "\0""0\213\3570\213\3570\213\357\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0""0" "\213\357\0\0\0""0\213\357\0\0\0\0\0\0\0\0\0""0\213\357\0\0\0""0\213\357\0" "\0\0""0\213\357\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0" """0\213\357\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0""0\213" "\357\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0""0\213\357" "\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0""0\213\357\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0""0\213\357\0\0\0""0\213\357\0\0\0\0\0\0\0\0\0""0\213\357\0\0\0\0\0\0\0" "\0\0""0\213\357\0\0\0\0\0\0\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0""0\213" "\357\0\0\0""0\213\357\0\0\0\0\0\0\0\0\0""0\213\357\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0""0\213\357\0" "\0\0""0\213\357\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0""0\213\357\0\0\0""0" "\213\357\0\0\0\0\0\0\0\0\0""0\213\357\0\0\0\0\0\0\0\0\0""0\213\357\0\0\0" "\0\0\0\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0""0\213\357" "\0\0\0\0\0\0\0\0\0""0\213\3570\213\3570\213\357\0\0\0\0\0\0\0\0\0""0\213" "\357\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0""0\213\357" "\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0""0\213\357\0\0\0""0\213\357\0\0" "\0\0\0\0\0\0\0""0\213\357\0\0\0""0\213\3570\213\3570\213\357\0\0\0\0\0\0" """0\213\3570\213\357\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0""0\213\3570" "\213\3570\213\357\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0\0\0\0\0\0\0""0" "\213\357\0\0\0""0\213\3570\213\3570\213\357\0\0\0""0\213\357\0\0\0""0\213" "\357\0\0\0""0\213\3570\213\357\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0""0\213\357\0\0\0""0\213\357\0" "\0\0\0\0\0\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0""0\213\357\0\0\0""0\213\3570\213\3570\213\357\0\0\0\0\0\0\0\0\0""0\213" "\357\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0\0\0\0\0\0\0""0\213\357\0\0\0" """0\213\357\0\0\0""0\213\357\0\0\0""0\213\3570\213\3570\213\357\0\0\0""0" "\213\357\0\0\0""0\213\357\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0\0\0\0\0" "\0\0""0\213\357\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0" """0\213\357\0\0\0\0\0\0\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0""0\213\357" "\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0\0\0\0\0\0\0""0\213\357\0\0\0""0" "\213\357\0\0\0""0\213\357\0\0\0\0\0\0\0\0\0""0\213\357\0\0\0""0\213\357\0" "\0\0""0\213\357\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0""0\213\3570\213\3570\213\357\0\0\0\0\0\0\0\0\0""0\213" "\357\0\0\0""0\213\3570\213\3570\213\357\0\0\0""0\213\3570\213\3570\213\357" "\0\0\0\0\0\0\0\0\0""0\213\357\0\0\0""0\213\3570\213\3570\213\357\0\0\0""0" "\213\3570\213\3570\213\357\0\0\0\0\0\0\0\0\0""0\213\357\0\0\0""0\213\357" "0\213\3570\213\357\0\0\0""0\213\3570\213\3570\213\357\0\0\0""0\213\357\0" "\0\0""0\213\357\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\354" "\27\27\354\27\27\354\27\27\0\0\0\0\0\0\0\0\0\354\27\27\0\0\0\354\27\27\354" "\27\27\354\27\27\0\0\0\354\27\27\354\27\27\354\27\27\0\0\0\0\0\0\0\0\0\354" "\27\27\0\0\0\354\27\27\354\27\27\354\27\27\0\0\0\354\27\27\354\27\27\354" "\27\27\0\0\0\354\27\27\354\27\27\354\27\27\0\0\0\354\27\27\354\27\27\354" "\27\27\0\0\0\354\27\27\354\27\27\354\27\27\0\0\0\354\27\27\0\0\0\354\27\27" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\354\27\27\0\0\0\354\27\27\0\0\0\0\0\0\0\0\0\354\27\27\0\0\0\354\27" "\27\0\0\0\354\27\27\0\0\0\354\27\27\0\0\0\354\27\27\0\0\0\354\27\27\0\0\0" "\354\27\27\0\0\0\354\27\27\0\0\0\354\27\27\0\0\0\354\27\27\0\0\0\354\27\27" "\0\0\0\354\27\27\0\0\0\354\27\27\0\0\0\354\27\27\0\0\0\354\27\27\0\0\0\354" "\27\27\0\0\0\354\27\27\0\0\0\354\27\27\0\0\0\354\27\27\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\354\27\27\0" "\0\0\354\27\27\0\0\0\0\0\0\0\0\0\354\27\27\0\0\0\0\0\0\0\0\0\354\27\27\0" "\0\0\0\0\0\0\0\0\354\27\27\0\0\0\354\27\27\0\0\0\354\27\27\0\0\0\354\27\27" "\0\0\0\0\0\0\0\0\0\354\27\27\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\354\27\27\0\0" "\0\354\27\27\0\0\0\354\27\27\0\0\0\354\27\27\0\0\0\354\27\27\0\0\0\354\27" "\27\0\0\0\354\27\27\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\354\27\27\0\0\0\354\27\27\0\0\0\0\0\0\0\0\0\354" "\27\27\0\0\0\0\0\0\0\0\0\354\27\27\0\0\0\0\0\0\0\0\0\354\27\27\0\0\0\354" "\27\27\0\0\0\354\27\27\0\0\0\354\27\27\0\0\0\0\0\0\0\0\0\354\27\27\354\27" "\27\354\27\27\0\0\0\0\0\0\0\0\0\354\27\27\0\0\0\354\27\27\0\0\0\354\27\27" "\0\0\0\354\27\27\0\0\0\354\27\27\0\0\0\354\27\27\0\0\0\354\27\27\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\354" "\27\27\0\0\0\354\27\27\0\0\0\0\0\0\0\0\0\354\27\27\0\0\0\354\27\27\354\27" "\27\354\27\27\0\0\0\0\0\0\354\27\27\354\27\27\0\0\0\354\27\27\0\0\0\354\27" "\27\0\0\0\354\27\27\354\27\27\354\27\27\0\0\0\354\27\27\0\0\0\354\27\27\0" "\0\0\0\0\0\0\0\0\354\27\27\0\0\0\354\27\27\354\27\27\354\27\27\0\0\0\354" "\27\27\0\0\0\354\27\27\0\0\0\354\27\27\354\27\27\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\354\27\27\0" "\0\0\354\27\27\0\0\0\0\0\0\0\0\0\354\27\27\0\0\0\354\27\27\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\354\27\27\0\0\0\354\27\27\354\27\27\354\27\27\0\0\0\0\0" "\0\0\0\0\354\27\27\0\0\0\354\27\27\0\0\0\354\27\27\0\0\0\0\0\0\0\0\0\354" "\27\27\0\0\0\354\27\27\0\0\0\354\27\27\0\0\0\354\27\27\354\27\27\354\27\27" "\0\0\0\354\27\27\0\0\0\354\27\27\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\354\27\27\0\0\0\354\27\27\0\0\0\0" "\0\0\0\0\0\354\27\27\0\0\0\354\27\27\0\0\0\354\27\27\0\0\0\354\27\27\0\0" "\0\354\27\27\0\0\0\0\0\0\0\0\0\354\27\27\0\0\0\354\27\27\0\0\0\354\27\27" "\0\0\0\354\27\27\0\0\0\354\27\27\0\0\0\0\0\0\0\0\0\354\27\27\0\0\0\354\27" "\27\0\0\0\354\27\27\0\0\0\0\0\0\0\0\0\354\27\27\0\0\0\354\27\27\0\0\0\354" "\27\27\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\354\27\27\354\27\27\354\27\27\0\0\0\0\0\0\0\0\0\354\27\27\0" "\0\0\354\27\27\354\27\27\354\27\27\0\0\0\354\27\27\354\27\27\354\27\27\0" "\0\0\0\0\0\0\0\0\354\27\27\0\0\0\354\27\27\354\27\27\354\27\27\0\0\0\354" "\27\27\354\27\27\354\27\27\0\0\0\0\0\0\0\0\0\354\27\27\0\0\0\354\27\27\354" "\27\27\354\27\27\0\0\0\354\27\27\354\27\27\354\27\27\0\0\0\354\27\27\0\0" "\0\354\27\27\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0"; bfm-0.6.4/include/mem_screen.h0000644000175000017500000010655110100345426016123 0ustar josejose00000000000000unsigned char mem_screen[56 * 80 * 3 + 1] = "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" """0\213\357\0\0\0""0\213\3570\213\3570\213\357\0\0\0""0\213\3570\213\357" "0\213\357\0\0\0""0\213\3570\213\3570\213\357\0\0\0""0\213\3570\213\3570\213" "\357\0\0\0""0\213\3570\213\3570\213\357\0\0\0""0\213\357\0\0\0""0\213\357" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0""0\213\3570\213\357" "0\213\357\0\0\0""0\213\3570\213\3570\213\357\0\0\0""0\213\3570\213\3570\213" "\357\0\0\0""0\213\357\0\0\0\0\0\0""0\213\357\0\0\0\0\0\0\0\0\0\0\0\0""0\213" "\357\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0""0\213\357" "\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0""0\213\357\0\0" "\0""0\213\357\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0""0" "\213\357\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0""0\213\357" "\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0""0\213\357\0\0" "\0""0\213\357\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0""0\213\357\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0\0\0\0\0\0\0""0\213" "\357\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0""0\213" "\357\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0""0\213\357" "\0\0\0\0\0\0\300\303\0\300\303\0\300\303\0\300\303\0\0\0\0\0\0\0\0\0\0""0" "\213\357\0\0\0""0\213\357\0\0\0\0\0\0\0\0\0""0\213\357\0\0\0""0\213\357\0" "\0\0""0\213\357\0\0\0\0\0\0\0\0\0""0\213\357\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0""0\213\357\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0\0\0\0\0\0\0""0\213" "\3570\213\3570\213\357\0\0\0\0\0\0\0\0\0""0\213\357\0\0\0""0\213\357\0\0" "\0""0\213\357\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0""0" "\213\357\0\0\0\0\0\0\300\303\0\0\0\0\300\303\0\0\0\0\300\303\0\0\0\0\0\0" "\0""0\213\357\0\0\0""0\213\357\0\0\0\0\0\0\0\0\0""0\213\357\0\0\0""0\213" "\357\0\0\0""0\213\357\0\0\0\0\0\0\0\0\0""0\213\357\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0""0\213\3570\213\3570\213\357\0" "\0\0""0\213\357\0\0\0""0\213\357\0\0\0\0\0\0\0\0\0""0\213\357\0\0\0""0\213" "\3570\213\3570\213\357\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0""0\213\357" "0\213\357\0\0\0\0\0\0\0\0\0\300\303\0\0\0\0\300\303\0\0\0\0\300\303\0\0\0" "\0\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0\0\0\0\0\0\0""0\213\357\0\0\0""0" "\213\3570\213\3570\213\357\0\0\0\0\0\0""0\213\357\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0""0\213\3570\213\3570\213\357\0\0\0\0\0\0\0\0\0""0\213\357\0" "\0\0""0\213\357\0\0\0""0\213\357\0\0\0\0\0\0\0\0\0""0\213\357\0\0\0""0\213" "\357\0\0\0""0\213\357\0\0\0""0\213\3570\213\3570\213\357\0\0\0""0\213\357" "\0\0\0""0\213\357\0\0\0\0\0\0\300\303\0\0\0\0\300\303\0\0\0\0\300\303\0\0" "\0\0\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0\0\0\0\0\0\0""0\213\357\0\0\0" """0\213\357\0\0\0""0\213\357\0\0\0\0\0\0""0\213\357\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0""0\213\357\0" "\0\0""0\213\357\0\0\0""0\213\357\0\0\0\0\0\0\0\0\0""0\213\357\0\0\0""0\213" "\357\0\0\0""0\213\357\0\0\0\0\0\0\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0" """0\213\357\0\0\0\0\0\0\300\303\0\0\0\0\300\303\0\0\0\0\300\303\0\0\0\0\0" "\0\0""0\213\357\0\0\0""0\213\357\0\0\0\0\0\0\0\0\0""0\213\357\0\0\0""0\213" "\357\0\0\0""0\213\357\0\0\0\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0""0\213\357\0\0\0""0\213\3570\213\3570\213\357\0" "\0\0""0\213\3570\213\3570\213\357\0\0\0\0\0\0\0\0\0""0\213\357\0\0\0""0\213" "\3570\213\3570\213\357\0\0\0""0\213\3570\213\3570\213\357\0\0\0""0\213\357" "\0\0\0""0\213\357\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0""0" "\213\3570\213\3570\213\357\0\0\0\0\0\0\0\0\0""0\213\357\0\0\0""0\213\357" "0\213\3570\213\357\0\0\0""0\213\357\0\0\0\0\0\0""0\213\357\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0""0\213\3570\213\3570\213\357\0\0\0""0" "\213\357\0\0\0""0\213\357\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0""0\213\3570\213\3570\213\357\0\0\0""0\213\3570\213\3570\213\357\0" "\0\0""0\213\3570\213\3570\213\357\0\0\0""0\213\357\0\0\0\0\0\0""0\213\357" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" """0\213\357\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0""0\213\357\0\0\0""0\213\357" "\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0""0\213\357\0\0" "\0""0\213\357\0\0\0""0\213\357\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0""0" "\213\357\0\0\0""0\213\357\0\0\0\0\0\0\0\0\0\300\303\0\300\303\0\300\303\0" "\300\303\0\0\0\0\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0" """0\213\357\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0\0\0\0\0\0\0""0\213\357" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0""0\213\357\0\0" "\0\0\0\0\300\303\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0""0\213\357\0\0\0""0" "\213\357\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0""0\213" "\357\0\0\0\0\0\0\0\0\0""0\213\357\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0" """0\213\3570\213\357\0\0\0\0\0\0\0\0\0\0\0\0\300\303\0\300\303\0\300\303" "\0\0\0\0\0\0\0\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0""0" "\213\357\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0\0\0\0""0\213\357\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0""0\213\357\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\300\303\0\0\0\0\0\0\0""0\213\357\0\0\0""0" "\213\357\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0""0\213" "\357\0\0\0\0\0\0""0\213\357\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0" """0\213\357\0\0\0""0\213\357\0\0\0\0\0\0\300\303\0\300\303\0\300\303\0\300" "\303\0\0\0\0\0\0\0\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0""0\213\357\0\0" "\0""0\213\357\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0\0\0\0""0\213\357\0" "\0\0""0\213\357\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0""0\213\3570\213\3570\213\357\0\0\0""0\213\357\0\0\0""0\213" "\357\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0""0\213\3570\213" "\3570\213\357\0\0\0""0\213\3570\213\3570\213\357\0\0\0""0\213\3570\213\357" "0\213\357\0\0\0""0\213\357\0\0\0\0\0\0""0\213\357\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0""0\212\3560\212\3560\212" "\3560\212\3560\212\3560\212\3560\212\3560\212\3560\212\3560\212\3560\212" "\3560\212\3560\212\3560\212\3560\212\3560\212\3560\212\3560\212\3560\212" "\3560\212\3560\212\3560\212\3560\212\3560\212\3560\212\3560\212\3560\212" "\3560\212\3560\212\3560\212\3560\212\3560\212\3560\212\3560\212\3560\212" "\3560\212\3560\212\3560\212\3560\212\3560\212\3560\212\3560\212\3560\212" "\3560\212\3560\212\3560\212\3560\212\3560\212\3560\212\3560\212\3560\212" "\3560\212\356\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\0\0\0\0\0\0\0\0\0\0\0\0\40\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40" "\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40" "\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\0\0\0\0\0\0\0\0\0\0\0\0\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\0\0\0\0" "\0\0\0\0\0\0\0\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6" "*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0" "\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6" "*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\0\0\0\0\0\0\0" "\0\0\0\0\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\0\0\0\0\0\0\0\0\0\0\0\0\40\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40" "\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40" "\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\0\0\0\0\0\0\0\0\0\0\0\0\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\0\0\0\0" "\0\0\0\0\0\0\0\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6" "*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40" "\40\40\40\40\40\40\0\0\0\0\0\0\0\0\0\0\0\0\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40" "\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40" "\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\0\0\0\0\0\0\0\0\0\0\0\0\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\0" "\0\0\0\0\0\0\0\0\0\0\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40" "\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6" "*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40" "\40\40\40\40\40\40\40\40\0\0\0\0\0\0\0\0\0\0\0\0\6*\0\6*\0\6*\0\6*\0\6*\0" "\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6" "*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0" "\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6" "*\0\6*\0\6*\0\6*\0\0\0\0\0\0\0\0\0\0\0\0\0\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40" "\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40" "\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\0\0\0\0\0\0\0\0\0\0\0\0\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\0" "\0\0\0\0\0\0\0\0\0\0\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40" "\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6" "*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40" "\40\40\40\40\40\40\40\40\0\0\0\0\0\0\0\0\0\0\0\0\40\40\40\40\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40" "\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40" "\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\0\0\0\0\0\0\0\0\0\0\0" "\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40" "\40\0\0\0\0\0\0\0\0\0\0\0\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40" "\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6" "*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\0\0\0\0\0\0\0\0\0\0\0\0\40\40\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40" "\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\0\0\0\0\0\0\0\0" "\0\0\0\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0" "\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6" "*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0" "\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\0\0\0\0\0\0\0\0\0\0\0" "\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40" "\40\0\0\0\0\0\0\0\0\0\0\0\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40" "\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6" "*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\0\0\0\0\0\0\0\0\0\0\0\0\40\40\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40" "\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\0\0\0\0\0\0\0\0" "\0\0\0\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\0\0\0\0\0\0\0\0\0\0\0\0\40\40\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40" "\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6" "*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\0\0\0\0\0\0\0\0\0\0\0\0\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\0\0\0\0\0" "\0\0\0\0\0\0\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\40\0\0\0\0\0\0\0\0\0\0\0\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*" "\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0" "\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6" "*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0\6*\0" "\6*\0\6*\0\0\0\0\0\0\0\0\0\0\0\0\0\40\40\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40" "\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6" "*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\0\0\0\0\0\0\0\0\0\0\0\0\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\0\0\0\0\0" "\0\0\0\0\0\0\0\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40" "\40\40\40\40\40\40\40\40\40\40\40\40\40\6*\0\40\40\40\40\40\40\40\40\40\40" "\40\40\40\40\40\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0""0\212\3560\212\3560\212\3560\212\3560\212\3560\212\3560\212" "\3560\212\3560\212\3560\212\3560\212\3560\212\3560\212\3560\212\3560\212" "\3560\212\3560\212\3560\212\3560\212\3560\212\3560\212\3560\212\3560\212" "\3560\212\3560\212\3560\212\3560\212\3560\212\3560\212\3560\212\3560\212" "\3560\212\3560\212\3560\212\3560\212\3560\212\3560\212\3560\212\3560\212" "\3560\212\3560\212\3560\212\3560\212\3560\212\3560\212\3560\212\3560\212" "\3560\212\3560\212\3560\212\3560\212\3560\212\356\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376" "\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376" "\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376" "\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376" "\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376" "\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376" "\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376" "\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376" "\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376" "\376\376\376\376\376\376\376\376\376\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0""0\213\3570\213\3570\213\357\0\0\0\0" "\0\0\0\0\0""0\213\357\0\0\0""0\213\3570\213\3570\213\357\0\0\0""0\213\357" "0\213\3570\213\357\0\0\0\0\0\0\0\0\0""0\213\357\0\0\0""0\213\3570\213\357" "0\213\357\0\0\0""0\213\3570\213\3570\213\357\0\0\0""0\213\3570\213\3570\213" "\357\0\0\0""0\213\3570\213\3570\213\357\0\0\0""0\213\3570\213\3570\213\357" "\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0""0\213\357\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0""0\213\357\0\0\0""0\213" "\357\0\0\0\0\0\0\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0" """0\213\357\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0""0\213" "\357\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0""0\213\357" "\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0""0\213\357\0\0" "\0""0\213\357\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0""0\213\3570\213\357" "0\213\357\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0""0\213\357" "\0\0\0""0\213\357\0\0\0\0\0\0\0\0\0""0\213\357\0\0\0\0\0\0\0\0\0""0\213\357" "\0\0\0\0\0\0\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0""0" "\213\357\0\0\0\0\0\0\0\0\0""0\213\357\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0""0\213" "\357\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0""0\213\357" "\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0""0\213\3570\213\3570\213\357\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0""0\213\357\0\0\0""0\213" "\357\0\0\0\0\0\0\0\0\0""0\213\357\0\0\0\0\0\0\0\0\0""0\213\357\0\0\0\0\0" "\0\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0""0\213\357\0" "\0\0\0\0\0\0\0\0""0\213\3570\213\3570\213\357\0\0\0\0\0\0\0\0\0""0\213\357" "\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0""0\213\357\0\0" "\0""0\213\357\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0""0\213\357\0\0\0""0\213\357" "\0\0\0\0\0\0\0\0\0""0\213\357\0\0\0""0\213\3570\213\3570\213\357\0\0\0\0" "\0\0""0\213\3570\213\357\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0""0\213\357" "0\213\3570\213\357\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0\0\0\0\0\0\0""0" "\213\357\0\0\0""0\213\3570\213\3570\213\357\0\0\0""0\213\357\0\0\0""0\213" "\357\0\0\0""0\213\3570\213\357\0\0\0\0\0\0""0\213\357\0\0\0""0\213\357\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0""0\213\357\0\0\0""0" "\213\357\0\0\0\0\0\0\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0""0\213\357\0\0\0""0\213\3570\213\3570\213\357\0\0\0\0\0\0\0" "\0\0""0\213\357\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0\0\0\0\0\0\0""0\213" "\357\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0""0\213\3570\213\3570\213\357" "\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0""0\213\357\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0""0\213\357\0\0\0""0\213" "\357\0\0\0\0\0\0\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0" """0\213\357\0\0\0""0\213\357\0\0\0\0\0\0\0\0\0""0\213\357\0\0\0""0\213\357" "\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0\0\0\0\0\0\0""0" "\213\357\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0\0\0\0\0\0\0""0\213\357\0" "\0\0""0\213\357\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0""0\213\3570\213\3570\213" "\357\0\0\0\0\0\0\0\0\0""0\213\357\0\0\0""0\213\3570\213\3570\213\357\0\0" "\0""0\213\3570\213\3570\213\357\0\0\0\0\0\0\0\0\0""0\213\357\0\0\0""0\213" "\3570\213\3570\213\357\0\0\0""0\213\3570\213\3570\213\357\0\0\0\0\0\0\0\0" "\0""0\213\357\0\0\0""0\213\3570\213\3570\213\357\0\0\0""0\213\3570\213\357" "0\213\357\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0""0\213\357\0\0\0""0\213" "\357\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\354\27\27\354\27\27\354\27\27\0\0\0\0" "\0\0\0\0\0\354\27\27\0\0\0\354\27\27\354\27\27\354\27\27\0\0\0\354\27\27" "\354\27\27\354\27\27\0\0\0\0\0\0\0\0\0\354\27\27\0\0\0\354\27\27\354\27\27" "\354\27\27\0\0\0\354\27\27\354\27\27\354\27\27\0\0\0\354\27\27\354\27\27" "\354\27\27\0\0\0\354\27\27\354\27\27\354\27\27\0\0\0\354\27\27\354\27\27" "\354\27\27\0\0\0\354\27\27\0\0\0\354\27\27\0\0\0\354\27\27\0\0\0\354\27\27" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\354\27\27\0\0\0\354" "\27\27\0\0\0\0\0\0\0\0\0\354\27\27\0\0\0\354\27\27\0\0\0\354\27\27\0\0\0" "\354\27\27\0\0\0\354\27\27\0\0\0\354\27\27\0\0\0\354\27\27\0\0\0\354\27\27" "\0\0\0\354\27\27\0\0\0\354\27\27\0\0\0\354\27\27\0\0\0\354\27\27\0\0\0\354" "\27\27\0\0\0\354\27\27\0\0\0\354\27\27\0\0\0\354\27\27\0\0\0\354\27\27\0" "\0\0\354\27\27\0\0\0\354\27\27\0\0\0\354\27\27\354\27\27\354\27\27\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\354\27\27\0\0\0\354\27\27" "\0\0\0\0\0\0\0\0\0\354\27\27\0\0\0\0\0\0\0\0\0\354\27\27\0\0\0\0\0\0\0\0" "\0\354\27\27\0\0\0\354\27\27\0\0\0\354\27\27\0\0\0\354\27\27\0\0\0\0\0\0" "\0\0\0\354\27\27\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\354\27\27\0\0\0\354\27\27" "\0\0\0\354\27\27\0\0\0\354\27\27\0\0\0\354\27\27\0\0\0\354\27\27\0\0\0\354" "\27\27\0\0\0\354\27\27\354\27\27\354\27\27\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\354\27\27\0\0\0\354\27\27\0\0\0\0\0\0\0\0\0\354" "\27\27\0\0\0\0\0\0\0\0\0\354\27\27\0\0\0\0\0\0\0\0\0\354\27\27\0\0\0\354" "\27\27\0\0\0\354\27\27\0\0\0\354\27\27\0\0\0\0\0\0\0\0\0\354\27\27\354\27" "\27\354\27\27\0\0\0\0\0\0\0\0\0\354\27\27\0\0\0\354\27\27\0\0\0\354\27\27" "\0\0\0\354\27\27\0\0\0\354\27\27\0\0\0\354\27\27\0\0\0\354\27\27\0\0\0\354" "\27\27\0\0\0\354\27\27\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\354\27\27\0\0\0\354\27\27\0\0\0\0\0\0\0\0\0\354\27\27\0\0\0\354\27\27" "\354\27\27\354\27\27\0\0\0\0\0\0\354\27\27\354\27\27\0\0\0\354\27\27\0\0" "\0\354\27\27\0\0\0\354\27\27\354\27\27\354\27\27\0\0\0\354\27\27\0\0\0\354" "\27\27\0\0\0\0\0\0\0\0\0\354\27\27\0\0\0\354\27\27\354\27\27\354\27\27\0" "\0\0\354\27\27\0\0\0\354\27\27\0\0\0\354\27\27\354\27\27\0\0\0\0\0\0\354" "\27\27\0\0\0\354\27\27\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\354\27\27\0\0\0\354\27\27\0\0\0\0\0\0\0\0\0\354\27\27\0\0\0\354\27\27" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\354\27\27\0\0\0\354\27\27\354\27\27\354\27" "\27\0\0\0\0\0\0\0\0\0\354\27\27\0\0\0\354\27\27\0\0\0\354\27\27\0\0\0\0\0" "\0\0\0\0\354\27\27\0\0\0\354\27\27\0\0\0\354\27\27\0\0\0\354\27\27\354\27" "\27\354\27\27\0\0\0\354\27\27\0\0\0\354\27\27\0\0\0\354\27\27\0\0\0\354\27" "\27\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\354\27\27\0\0\0" "\354\27\27\0\0\0\0\0\0\0\0\0\354\27\27\0\0\0\354\27\27\0\0\0\354\27\27\0" "\0\0\354\27\27\0\0\0\354\27\27\0\0\0\0\0\0\0\0\0\354\27\27\0\0\0\354\27\27" "\0\0\0\354\27\27\0\0\0\354\27\27\0\0\0\354\27\27\0\0\0\0\0\0\0\0\0\354\27" "\27\0\0\0\354\27\27\0\0\0\354\27\27\0\0\0\0\0\0\0\0\0\354\27\27\0\0\0\354" "\27\27\0\0\0\354\27\27\0\0\0\354\27\27\0\0\0\354\27\27\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\354\27\27\354\27\27\354\27\27\0\0\0" "\0\0\0\0\0\0\354\27\27\0\0\0\354\27\27\354\27\27\354\27\27\0\0\0\354\27\27" "\354\27\27\354\27\27\0\0\0\0\0\0\0\0\0\354\27\27\0\0\0\354\27\27\354\27\27" "\354\27\27\0\0\0\354\27\27\354\27\27\354\27\27\0\0\0\0\0\0\0\0\0\354\27\27" "\0\0\0\354\27\27\354\27\27\354\27\27\0\0\0\354\27\27\354\27\27\354\27\27" "\0\0\0\354\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0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"; bfm-0.6.4/include/fishmon.h0000644000175000017500000000374710100345427015455 0ustar josejose00000000000000#ifndef _FISHMON_H_ #define _FISHMON_H_ #include #include #define POWER2 12 #define REALY(y) ((y) >> POWER2) #define MAKEY(y) ((y) << POWER2) /* we are going to try and make this independent from 56x56 problem, * so that someone interested can zoom this to say 256x256 */ /* perform clipping outside this range, also this is the size of the * drawing area */ #define XMAX 56 #define YMAX 56 /* this is the max size of the RGB buffer: 56 * 56 * 3 * used for memcpy, memset, etc operations */ #define RGBSIZE (XMAX * YMAX * 3) /* size of the colormap based image */ #define CMAPSIZE (XMAX * YMAX) /* where WEED is located */ #define WEEDY (YMAX - 12) /* width of sprite header, sprite cmap alias, sprite master block alias */ #define HWIDTH width #define THE_CMAP header_data_cmap #define THE_DATA header_data /* how many fishes? */ #define NRFISH 6 #define MAXBUBBLE 32 /* main structure holding all sprites used in this dockapp */ typedef struct { int w; /* sprite width */ int h; /* sprite height */ int srcx; /* sprite start in sprites.h */ int srcy; /* sprite start in sprites.h */ unsigned char *data; /* pointer to sprite image */ } Sprite; /* structure describing each fish */ typedef struct { int speed; /* amount of pixels to add for next move */ int tx; /* current x position */ int y; /* current y position */ int travel; /* how far to move beyond the screen */ int rev; /* going left or right? */ int frame; /* current animation frame */ int delay; /* how quick we swap frames */ int turn; /* in "turn" mode */ } Fish; /* structure describing weed */ typedef struct { int where; /* x position */ int frame; /* which frame are we on now */ int delay; /* delay for each weed */ } Weed; typedef struct { int x; /* x position */ int y; /* y position */ int dy; /* vertical velocity */ int frame; /* current frame type */ } Bubble; #endif /* _FISHMON_H_ */ bfm-0.6.4/include/chars.h0000644000175000017500000000662510100345427015110 0ustar josejose00000000000000static unsigned char font_cmap[3][3] = { { 32, 32, 32 }, { 199, 159, 43 }, /* { 32,178,174}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2,0,0,0,2,0, 2,1,1,1,2,0,2,0,0,0,0,0,2,1,1,1, 2,0,2,0,0,0,2,0,2,1,1,1,2,0,0,0, 2,0,0,0,2,1,1,1,1,0,0,1,1,1,0,0, 2,0,0,0,2,0,2,0,0,0,2,0,2,1,1,1, 2,0,2,1,1,1,2,0,0,0,0,0,0,0 }; bfm-0.6.4/include/digits.h0000644000175000017500000001377610100345427015300 0ustar josejose00000000000000/* digits for the CPU counter */ unsigned char digits[95 * 9 * 3 + 1] = "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\40\260\254\40\260\254\40\260\254\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0}" "q\0\0\0\0\0\0\0}q\40\260\254\40\260\254\40\260\254\0}q\0\0\0\0}q\40\260\254" "\40\260\254\40\260\254\0}q\0\0\0\0}q\0\0\0\0\0\0\0\0\0\0}q\0\0\0\0}q\40\260" "\254\40\260\254\40\260\254\0}q\0\0\0\0}q\40\260\254\40\260\254\40\260\254" "\0}q\0\0\0\0}q\40\260\254\40\260\254\40\260\254\0}q\0\0\0\0}q\40\260\254" "\40\260\254\40\260\254\0}q\0\0\0\0}q\40\260\254\40\260\254\40\260\254\0}" "q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\40\260\254\0\0\0\0\0\0\0\0\0\40\260\254\0\0\0\0\0\0\0\0\0\0\0\0\40\260\254" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\40\260\254\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\40\260\254\0\0\0\40\260\254\0\0\0\0\0\0\0\0\0\40\260\254\0\0\0\40\260" "\254\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\40\260\254\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\40\260\254\0\0\0\40\260\254\0\0\0\0\0\0\0\0\0" "\40\260\254\0\0\0\40\260\254\0\0\0\0\0\0\0\0\0\40\260\254\0\0\0\40\260\254" "\0\0\0\0\0\0\0\0\0\40\260\254\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\40\260\254" "\0\0\0\0\0\0\0\0\0\40\260\254\0\0\0\0\0\0\0\0\0\0\0\0\40\260\254\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\40\260\254\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\40" "\260\254\0\0\0\40\260\254\0\0\0\0\0\0\0\0\0\40\260\254\0\0\0\40\260\254\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\40\260\254\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\40\260\254\0\0\0\40\260\254\0\0\0\0\0\0\0\0\0\40\260" "\254\0\0\0\40\260\254\0\0\0\0\0\0\0\0\0\40\260\254\0\0\0\0\0\0\0\0\0\0\0" "\0\40\260\254\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0}q\0\0\0\0\0\0\0" "\0\0\0}q\0\0\0\0\0\0\0\0\0\0\0\0\0}q\0\0\0\0\0\0\0}q\40\260\254\40\260\254" "\40\260\254\0}q\0\0\0\0\0\0\40\260\254\40\260\254\40\260\254\0}q\0\0\0\0" "}q\40\260\254\40\260\254\40\260\254\0}q\0\0\0\0}q\40\260\254\40\260\254\40" "\260\254\0}q\0\0\0\0}q\40\260\254\40\260\254\40\260\254\0}q\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0}q\0\0\0\0IA\40\260\254\40\260\254\40\260\254\0IA\0\0\0" "\0}q\40\260\254\40\260\254\40\260\254\0}q\0\0\0\0\0\0\0\0\0\40\260\254\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\40\260\254\0\0\0\0\0\0\0\0" "\0\40\260\254\0\0\0\0\0\0\0\0\0\0\0\0\40\260\254\0\0\0\0\0\0\40\260\254\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\40\260\254\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\40\260\254\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\40\260\254" "\0\0\0\40\260\254\0\0\0\0\0\0\0\0\0\40\260\254\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\40\260\254\0\0\0\40\260\254\0\0\0\0\0\0\0\0\0\40\260\254\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\40\260\254\0\0\0\0\0\0\40\260\254\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\40\260\254\0\0\0\0\0\0\0\0\0\40\260\254" "\0\0\0\0\0\0\0\0\0\0\0\0\40\260\254\0\0\0\0\0\0\40\260\254\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\40\260\254\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\40\260\254\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\40\260\254\0\0\0\40\260" "\254\0\0\0\0\0\0\0\0\0\40\260\254\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\40\260\254" "\0\0\0\40\260\254\0\0\0\0\0\0\0\0\0\40\260\254\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\40\260\254\0\0\0\40\260\254\0\0\0\0\0\0\0\0\0\40\260\254\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\40\260\254\40\260\254\40\260\254\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\40\260\254\0\0\0\0\0\0\0}q\40\260\254\40\260\254\40" "\260\254\0}q\0\0\0\0}q\40\260\254\40\260\254\40\260\254\0}q\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0}q\0\0\0\0}q\40\260\254\40\260\254\40\260\254\0}q\0\0\0" "\0}q\40\260\254\40\260\254\40\260\254\0}q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "}q\0\0\0\0}q\40\260\254\40\260\254\40\260\254\0}q\0\0\0\0}q\40\260\254\40" "\260\254\40\260\254\0}q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0"; bfm-0.6.4/include/sys_include.h0000644000175000017500000000256110100345427016324 0ustar josejose00000000000000/* BubbleMon dockapp 1.2 * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA. * */ #ifndef _SYS_INCLUDE_H_ #define _SYS_INCLUDE_H_ /* these routines must be written for each new platform */ int system_cpu(void); /* return total CPU load in percent */ int system_memory(void); /* set memory related values in BubbleMonData and return 1, or return 0 if memory didn't change */ #ifdef ENABLE_MEMSCREEN void system_loadavg(void); /* get current load average and put into bm->loadavg[].{i,f} */ #endif #ifdef ENABLE_FISH int net_tx_speed(void); /* Current fish speed for outgoing traffic */ int net_rx_speed(void); /* Current fish speed for incoming traffic */ #endif #endif /* _SYS_INCLUDE_H_ */ bfm-0.6.4/include/bubblemon.h0000644000175000017500000001041610100345427015746 0ustar josejose00000000000000/* BubbleMon dockapp 1.2 * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA. * */ #ifndef _BUBBLEMON_H_ #define _BUBBLEMON_H_ #include #include /* CPU load alpha-blending: smaller values = ligher text * minblend = mouseout * maxblend = mousein * min = 0 * max = 128 */ #if defined(ENABLE_CPU) || defined(ENABLE_MEMSCREEN) # define MINBLEND 80 # define MAXBLEND 190 #endif #ifdef ENABLE_DUCK #define DUCKBLEND 100 #endif #define MULTIPLIER 4096.0 #define POWER2 12 #define REALY(y) ((y) >> POWER2) #define MAKEY(y) ((y) << POWER2) #define MAKE_INTEGER(x) ((int)((x)*MULTIPLIER+0.5)) #define ROLLVALUE 100 /* frequency of history rollover */ #ifdef sun #include #if defined (uint64_t) typedef uint64_t u_int64_t; #else typedef unsigned long long u_int64_t; #endif /* defined (uint64_t) */ #endif // Pigeon /* Don't need this for this hack typedef struct { int x; Horizontal coordinate int y; Vertical coordinate int dy; Vertical velocity } Bubble; */ typedef struct { int i; /* integer part */ int f; /* fractional part */ } LoadAvg; #include "fishmon.h" typedef struct { /* X11 stuff */ Display *display; GdkWindow *win; /* main window */ GdkWindow *iconwin; /* icon window */ GdkGC *gc; /* drawing GC */ GdkPixmap *pixmap; /* main dockapp pixmap */ GdkBitmap *mask; /* dockapp mask */ /* main image buffer */ unsigned char rgb_buf[56 * 56 * 3 + 1]; #ifdef ENABLE_MEMSCREEN /* memory / swap screen buffer */ unsigned char mem_buf[56 * 56 * 3 + 1]; /* memory screen graph buffer */ unsigned char his_bufa[56 * 31 * 3 + 1]; /* loadavg screen graph buffer */ unsigned char his_bufb[56 * 33 * 3 + 1]; int screen_type; /* 0 - memory, 1 - cpu */ int picture_lock; /* blend coeff not changed when this is not 0 */ #endif /* bubble stuff */ int samples; unsigned char *bubblebuf; int *colors; int *waterlevels; int *waterlevels_dy; Bubble *bubbles; int n_bubbles; /* Color definitions */ int air_noswap, liquid_noswap, air_maxswap, liquid_maxswap; /* CPU percentage stuff. soon to go away */ int loadIndex; u_int64_t *load, *total; /* various params */ int maxbubbles; /* max bubbles number */ double ripples; /* Do we make ripples on the surface after bubbles? */ double gravity; /* How fast do the bubbles rise? */ double volatility; /* How fast do the water levels accelerate? */ double viscosity; /* 0.0 means the liquid never moves. 1.0 means the liquid will continue to oscillate forever. */ double speed_limit; /* How fast are the water levels allowed to move? */ /* stuff above in integer format */ int ripples_int; int gravity_int; int volatility_int; int viscosity_int; int speed_limit_int; /* system stuff. Moved here because various places need it */ u_int64_t mem_used; u_int64_t mem_max; u_int64_t swap_used; u_int64_t swap_max; unsigned int swap_percent; /* swap used, in percent */ unsigned int mem_percent; /* memory used, in percent */ /* history of memory use */ unsigned int memhist[53]; unsigned int memadd; /* loadavg stuff */ LoadAvg loadavg[3]; /* history of loadavgs */ unsigned int history[53]; unsigned int hisadd; #ifdef ENABLE_FISH Fish fishes[NRFISH]; /* fishes */ Weed weeds[2]; /* 3 weeds */ int nr_bubbles; /* current bubble count */ /* cmap based buffer for sprites, etc - notice not RGB buffer */ unsigned char image[CMAPSIZE]; #endif } BubbleMonData; #endif /* _BUBBLEMON_H_ */ bfm-0.6.4/include/master.xpm0000644000175000017500000001056010100345427015651 0ustar josejose00000000000000/* XPM */ static char * master_xpm[] = { "64 64 4 1", " c None", ". c #000000", "+ c #2299FF", "@ c #ABBAC6", " ", " ", " ", " .......................................................... ", " .++++++++++++++++++++++++++++++++++++++++++++++++++++++++@ ", " .++++++++++++++++++++++++++++++++++++++++++++++++++++++++@ ", " .++++++++++++++++++++++++++++++++++++++++++++++++++++++++@ ", " .++++++++++++++++++++++++++++++++++++++++++++++++++++++++@ ", " .++++++++++++++++++++++++++++++++++++++++++++++++++++++++@ ", " .++++++++++++++++++++++++++++++++++++++++++++++++++++++++@ ", " .++++++++++++++++++++++++++++++++++++++++++++++++++++++++@ ", " .++++++++++++++++++++++++++++++++++++++++++++++++++++++++@ ", " .++++++++++++++++++++++++++++++++++++++++++++++++++++++++@ ", " .++++++++++++++++++++++++++++++++++++++++++++++++++++++++@ ", " .++++++++++++++++++++++++++++++++++++++++++++++++++++++++@ ", " .++++++++++++++++++++++++++++++++++++++++++++++++++++++++@ ", " .++++++++++++++++++++++++++++++++++++++++++++++++++++++++@ ", " .++++++++++++++++++++++++++++++++++++++++++++++++++++++++@ ", " .++++++++++++++++++++++++++++++++++++++++++++++++++++++++@ ", " .++++++++++++++++++++++++++++++++++++++++++++++++++++++++@ ", " .++++++++++++++++++++++++++++++++++++++++++++++++++++++++@ ", " .++++++++++++++++++++++++++++++++++++++++++++++++++++++++@ ", " .++++++++++++++++++++++++++++++++++++++++++++++++++++++++@ ", " .++++++++++++++++++++++++++++++++++++++++++++++++++++++++@ ", " .++++++++++++++++++++++++++++++++++++++++++++++++++++++++@ ", " .++++++++++++++++++++++++++++++++++++++++++++++++++++++++@ ", " .++++++++++++++++++++++++++++++++++++++++++++++++++++++++@ ", " .++++++++++++++++++++++++++++++++++++++++++++++++++++++++@ ", " .++++++++++++++++++++++++++++++++++++++++++++++++++++++++@ ", " .++++++++++++++++++++++++++++++++++++++++++++++++++++++++@ ", " .++++++++++++++++++++++++++++++++++++++++++++++++++++++++@ ", " .++++++++++++++++++++++++++++++++++++++++++++++++++++++++@ ", " .++++++++++++++++++++++++++++++++++++++++++++++++++++++++@ ", " .++++++++++++++++++++++++++++++++++++++++++++++++++++++++@ ", " .++++++++++++++++++++++++++++++++++++++++++++++++++++++++@ ", " .++++++++++++++++++++++++++++++++++++++++++++++++++++++++@ ", " .++++++++++++++++++++++++++++++++++++++++++++++++++++++++@ ", " .++++++++++++++++++++++++++++++++++++++++++++++++++++++++@ ", " .++++++++++++++++++++++++++++++++++++++++++++++++++++++++@ ", " .++++++++++++++++++++++++++++++++++++++++++++++++++++++++@ ", " .++++++++++++++++++++++++++++++++++++++++++++++++++++++++@ ", " .++++++++++++++++++++++++++++++++++++++++++++++++++++++++@ ", " .++++++++++++++++++++++++++++++++++++++++++++++++++++++++@ ", " .++++++++++++++++++++++++++++++++++++++++++++++++++++++++@ ", " .++++++++++++++++++++++++++++++++++++++++++++++++++++++++@ ", " .++++++++++++++++++++++++++++++++++++++++++++++++++++++++@ ", " .++++++++++++++++++++++++++++++++++++++++++++++++++++++++@ ", " .++++++++++++++++++++++++++++++++++++++++++++++++++++++++@ ", " .++++++++++++++++++++++++++++++++++++++++++++++++++++++++@ ", " .++++++++++++++++++++++++++++++++++++++++++++++++++++++++@ ", " .++++++++++++++++++++++++++++++++++++++++++++++++++++++++@ ", " .++++++++++++++++++++++++++++++++++++++++++++++++++++++++@ ", " .++++++++++++++++++++++++++++++++++++++++++++++++++++++++@ ", " .++++++++++++++++++++++++++++++++++++++++++++++++++++++++@ ", " .++++++++++++++++++++++++++++++++++++++++++++++++++++++++@ ", " .++++++++++++++++++++++++++++++++++++++++++++++++++++++++@ ", " .++++++++++++++++++++++++++++++++++++++++++++++++++++++++@ ", " .++++++++++++++++++++++++++++++++++++++++++++++++++++++++@ ", " .++++++++++++++++++++++++++++++++++++++++++++++++++++++++@ ", " .++++++++++++++++++++++++++++++++++++++++++++++++++++++++@ ", " @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ ", " ", " ", " "}; bfm-0.6.4/ChangeLog.orig0000644000175000017500000001100710100345427014713 0ustar josejose00000000000000This ChangeLog file is backwards. Press "G" in vi to go to the end of it. Sun, 7 Jan 2001 - 1.0 Initial FreeBSD port Fri, 12 Jan 2001 - 1.0pl1 Duck "upside down" mode Initial version of "memory info" screen Mon, 15 Jan 2001 - 1.0pl2 FreeBSD memory code fixes Tue, 16 Jan 2001 - 1.0pl3 Most drawing operations rewritten and optimized Modular changes - extra features under #ifdef FreeBSD fixes Tue, 16 Jan 2001 - 1.0pl4 More fixes Thu, 18 Jan 2001 - 1.0pl6 Code reorganization Command line options Thu, 18 Jan 2001 - 1.0pl7 All floating point calculations eliminated FreeBSD changes Added Xresource parsing for color, etc options Load average/Memory screen toggle via shift key Sun, 21 Jan 2001 - 1.0pl8 Load average graph inside load average screen system-dependent code updates more features #ifdef'd Sun, 21 Jan 2001 - 1.0pl9 Load average / memory info screens, "picture lock". Sun, 21 Jan 2001 - 1.1test1 bubblemon_update() cleanup bubblemon.h cleanup load average graph updates session_defaults() update documentation updates Sun, 21 Jan 2001 - 1.1test2 argv count bug found and fixed range checking for values read from Xdefaults performance improvements in bubblemon_update() FreeBSD memory code changes documentation updates removed last pieces of floating point numbers Mon, 22 Jan 2001 - 1.1test3 bubblemon_update() cleanup Thu, 25 Jan 2001 - 1.1test4 Code reorganization Main Makefile will detect OS if GNU make is used Moved system dependent code into sys_(uname).c Changes to system-dependent code structure Reorganization of include files and directory structure History graphs for load average and memory use updates Performance improvements Some functions renamed Off-by-one error in rgb image data fixed BlackBox don't-draw-on-win feature bubblemon_update() cleanup Swapped load / memory screen order FreeBSD memory code updates Sun, 28 Jan 2001 - 1.1test5 Load average logic change, update to Linux and FreeBSD dependent code Other misc changes Mon, 29 Jan 2001 - 1.1test6 BubbleMonData is now a static structure Performance improvements Wed, 31 Jan 2001 - 1.1test7 Documentation updates Possible buffer overflow fix in session_defaults() Thu 01 Feb 2001 - 1.1 Minor documentation update sys_freebsd math update Version 1.1 released Wed 14 Feb 2001 - 1.2test1 SunOS port added Thu 15 Feb 2001 - 1.2 SunOS port fixed Version 1.2 released Mon 19 Feb 2001 - 1.21test1 Various updates to the SunOS port Added -k command line switch to display memory/swap in megabytes instead of kilobytes. Useful for machines with > 1024mb memory, since kilobytes display stops at 999mb for both swap and physical ram Portability fixes Thu 22 Feb 2001 - 1.21 Fix for FreeBSD CPU usage problem under high load Released version 1.21 Sun 25 Feb 2001 - 1.22 Fixed segfault which occured under certain low memory conditions, found and fixed by "John H. Robinson, IV" Released version 1.22 Sat 10 Mar 2001 - 1.23 Patch from Dan Price to fix Shift Key detection on all platforms Tracked down another segfault related to off-by-one-scanline error Increased bm.bubblebuf allocation because bubbles created at the very bottom of the "water" are drawn outside of 56x56 region. Released version 1.23 Fri 16 Mar 2001 - 1.3 Fixed load average graph - I don't know what the hell I was doing that it worked before, but the way the code was written it was never supposed to work :) Added some contributed code to hopefully catch most of bubble-related segfaults. Thanks to "John H. Robinson, IV" Updated Makefile to use proper libs when linking with gdk, etc. Should stop complaints about "missing library dependencies" This is a recommented upgrade if you use bubblemon version 1.2 or newer. Released version 1.3 Sat 14 Apr 2001 - 1.31 FreeBSD machines were compiling bubblemon as "big-endian", resulting in fairly weird looking color problem. This has been fixed :) Minor change to Makefile.FreeBSD to put bubblemon in /usr/X11R6 during install. Released version 1.31 Mon 16 Apr 2001 - 1.32 Important security update for FreeBSD - previous versions did not drop kmem privileges, and programs started by clicking on the dockapp were started with elevated privileges. This is a required upgrade for FreeBSD users. bfm-0.6.4/fishmon.c0000644000175000017500000005352010100345427014017 0ustar josejose00000000000000/* BubbleFishyMon dockapp * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA. */ /* Huw Giddens 2003-10-28: Added missing copyright boilerplate. Corrected the * calculation that keeps the fish in the water, and put it in its own * function adjust_y(). */ #define _GNU_SOURCE #define VERSION "1.23" /* general includes */ #include #include #include #include #include #include #include #include #include #include /* x11 includes */ #include #include #include #include "include/sprites.h" #include "include/fishmon.h" #include "include/chars.h" #include "include/bubblemon.h" #include "include/sys_include.h" /* *INDENT-OFF* */ /* drawing */ void draw_cmap_image(void); void draw_sprite(int x, int y, int idx); void draw_sprite_alpha(int x, int y, int idx, int alpha); void draw_string(int dx, int dy, char *string); void draw_ascii(int x, int y, char digit); void putpixel(int x, int y, float i, int linewidth, int color); /* stuff */ void fishmon_update(void); void bubble_update(void); void fish_update(void); void weed_update(void); #ifdef ENABLE_TIME void time_update(void); void anti_line(int x1, int y1, int x2, int y2, int linewidth, int color); #endif /* misc support functions */ void prepare_sprites(void); /* global variables */ extern BubbleMonData bm; extern int fish_traffic; extern int time_enabled; /* 34 sprites: * 0, 2, 4, 6, 8, 10, 12, 14 - fish left * 1, 3, 5, 7, 9, 11, 13, 15 - fish right * 16, 17, 18, 19, 20 - grass * 21, 22, 23, 24, 25 - small fish * 26, 27, 28, 29, 30 - bubbles * 31 - thermometer and the "liquid" */ Sprite sp[34] = { /* 00 */ { 17, 14, 0, 0, NULL }, /* left swim fish */ /* 01 */ { 17, 14, 18, 0, NULL }, /* right swim fish */ /* 02 */ { 17, 14, 0, 15, NULL }, /* left swim fish 1 */ /* 03 */ { 17, 14, 18, 15, NULL }, /* right swim fish 1 */ /* 04 */ { 17, 14, 0, 30, NULL }, /* left swim fish 2 */ /* 05 */ { 17, 14, 18, 30, NULL }, /* right swim fish 2 */ /* 06 */ { 17, 14, 0, 45, NULL }, /* left turn begin */ /* 07 */ { 17, 14, 18, 45, NULL }, /* right turn begin */ /* 08 */ { 17, 14, 0, 60, NULL }, /* facing */ /* 09 */ { 17, 14, 18, 60, NULL }, /* facing */ /* 10 */ { 17, 14, 0, 75, NULL }, /* left mouth open */ /* 11 */ { 17, 14, 18, 75, NULL }, /* right mouth open */ /* 12 */ { 17, 14, 0, 90, NULL }, /* left mouth open 1 */ /* 13 */ { 17, 14, 18, 90, NULL }, /* right mouth open 1 */ /* 14 */ { 17, 14, 0, 105, NULL }, /* left mouth open 2 */ /* 15 */ { 17, 14, 18, 105, NULL }, /* right mouth open 2 */ /* 16 */ { 17, 12, 0, 120, NULL }, /* grass 1 */ /* 17 */ { 17, 12, 18, 120, NULL }, /* grass 2 */ /* 18 */ { 17, 12, 0, 135, NULL }, /* grass 3 */ /* 19 */ { 17, 12, 18, 135, NULL }, /* grass 4 */ /* 20 */ { 17, 12, 0, 150, NULL }, /* grass 5 */ /* 21 */ { 11, 8, 0, 180, NULL }, /* small fish huge */ /* 22 */ { 11, 7, 0, 189, NULL }, /* small fish big */ /* 23 */ { 9, 6, 0, 197, NULL }, /* small fish small */ /* 24 */ { 7, 4, 10, 197, NULL }, /* small fish little */ /* 25 */ { 7, 3, 10, 202, NULL }, /* small fish tiny */ /* 26 */ { 5, 5, 19, 196, NULL }, /* bubble huge */ /* 27 */ { 5, 3, 19, 204, NULL }, /* bubble big */ /* 28 */ { 3, 3, 27, 196, NULL }, /* bubble small */ /* 29 */ { 2, 2, 27, 202, NULL }, /* bubble little */ /* 30 */ { 1, 1, 33, 196, NULL }, /* bubble tiny */ /* 31 */ { 6, 35, 26, 151, NULL }, /* thermometer case */ { 0, 0, 0, 0, NULL } /* terminator */ }; /* animation sequence loop for fish [4 frames, loop] */ int fish_animation[4] = { 0, 2, 4, 2 }; /* animation sequence loop for weeds [8 frames, loop] */ int weed_animation[8] = { 16, 17, 18, 19, 20, 19, 18, 17 }; /* animation sequence loop for turning fish [4 frames, no loop] */ int turn_animation[8] = { 6, 8, 7, 1, 7, 9, 6, 0 }; /* "x offset" sequence for bubbles moving upward */ int bubble_sequence[5] = { -2, -2, -1, 0, 0 }; /* keeps track of mouse focus */ /* keeps track of distance between bubble state changes (depends on YMAX) */ extern int bubble_state_change; /* day of week */ /* *INDENT-ON* */ void traffic_fish_update(void); /* update fish, bubbles, temperature, etc */ void fishmon_update(void) { memset(&bm.image, 0, CMAPSIZE); /* check for new mail if enabled and no new mail exists */ /* check_mail(); if (new_mail) */ weed_update(); /* update each fish position */ if(fish_traffic) { traffic_fish_update(); } else { fish_update(); } /* done with sprites - now draw colormap-based image */ draw_cmap_image(); /* draw bubbles - done after everything else because we blend them * on top of everything */ /* draw thermometer 80 - alpha draw_sprite_alpha(49, 20, 31, 80); */ } /* fishmon_update */ void weed_update(void) { int i; for (i = 0; i < 2; i++) { if (bm.weeds[i].delay++ <= 20) { draw_sprite(bm.weeds[i].where, WEEDY, weed_animation[bm.weeds[i].frame]); continue; } /* process frame shifting */ bm.weeds[i].delay = 0; draw_sprite(bm.weeds[i].where, WEEDY, weed_animation[bm.weeds[i].frame]); bm.weeds[i].frame++; if (bm.weeds[i].frame > 7) bm.weeds[i].frame = 0; } } void bubble_update(void) { Bubble *bubbles = bm.bubbles; int i, x, y; int seq; /* make a new bubble, if needed */ if ((bm.nr_bubbles < MAXBUBBLE) && ((rand() % 101) <= 32)) { bm.bubbles[bm.nr_bubbles].x = (rand() % XMAX); bm.bubbles[bm.nr_bubbles].y = MAKEY(YMAX); bm.bubbles[bm.nr_bubbles].dy = 0; bm.nr_bubbles++; } /* Update and draw the bubbles */ for (i = 0; i < bm.nr_bubbles; i++) { /* Accelerate the bubble */ bubbles[i].dy -= 64; /* Move the bubble vertically */ bubbles[i].y += bubbles[i].dy; /* Did we lose it? */ if (bubbles[i].y < 0) { /* Yes; nuke it */ bubbles[i].x = bubbles[bm.nr_bubbles - 1].x; bubbles[i].y = bubbles[bm.nr_bubbles - 1].y; bubbles[i].dy = bubbles[bm.nr_bubbles - 1].dy; bm.nr_bubbles--; /* We must check the previously last bubble, which is * now the current bubble, also. */ i--; continue; } /* Draw the bubble */ x = bubbles[i].x; y = bubbles[i].y; /* convert to standard dimension */ y = REALY(y); /* calculate bubble sequence - 0 to 4 (determine bubble sprite idx) */ seq = y / bubble_state_change; /* draw the bubble, using offset-to-center calculated from current * sequence, and make the bubble bigger as we go up. 120 - alpha */ draw_sprite_alpha(x + bubble_sequence[seq], y, 26 + seq, 120); } } /* This function adjusts a passed y value so that it's not less than the * water level. 0 on the y axis is at the top of the frame. This is called by * fish_update() and traffic_fish_update(). It returns the corrected value. */ static int adjust_y(int y) { /* Pigeon Make sure the fish is in the water :) */ int min_y = (YMAX * (100 - bm.mem_percent))/100; if(y <= min_y) return min_y; else return y; } void fish_update(void) { int i, j; for (i = 0; i < NRFISH; i++) { /* frozen fish doesn't need to be handled, or drawn */ if (bm.fishes[i].speed == 0) continue; /* randomly make fish change direction mid-way * but only if it isn't turning already and if it isn't * scared */ if (((rand() % 255) == 128) && (bm.fishes[i].turn != 1)) { bm.fishes[i].turn = 1; bm.fishes[i].frame = 0; bm.fishes[i].speed = 1; bm.fishes[i].delay = 0; } /* move fish in horizontal direction, left or right */ if (!bm.fishes[i].rev) { bm.fishes[i].tx -= bm.fishes[i].speed; if (bm.fishes[i].tx < -18 - bm.fishes[i].travel) { /* we moved out of bounds. change direction, * position, speed. */ bm.fishes[i].travel = rand() % 32; bm.fishes[i].tx = -18 - bm.fishes[i].travel; bm.fishes[i].rev = 1; bm.fishes[i].y = rand() % (YMAX - 14); bm.fishes[i].speed = (rand() % 2) + 1; } } else { bm.fishes[i].tx += bm.fishes[i].speed; if (bm.fishes[i].tx > XMAX + bm.fishes[i].travel) { /* we moved out of bounds. change direction, * position, speed. */ bm.fishes[i].travel = rand() % 32; bm.fishes[i].tx = XMAX + bm.fishes[i].travel; bm.fishes[i].rev = 0; bm.fishes[i].y = rand() % (YMAX - 14); bm.fishes[i].speed = (rand() % 2) + 1; } } /* move fish in vertical position randomly by one pixel up or down */ j = rand() % 16; if (j <= 4) { bm.fishes[i].y--; } else if (j > 12) { bm.fishes[i].y++; } bm.fishes[i].y = adjust_y(bm.fishes[i].y); /* handle fish currently turning around */ if (bm.fishes[i].turn) { int turnframe; /* turn_animation array keeps sprite indexes for turning fish * around. 0-3 - ltr turn, 4-7 = rtl turn - rev determines * if we use ltr or rtl parts by multiplying by 4 */ turnframe = turn_animation[bm.fishes[i].frame + ((bm.fishes[i].rev) * 4)]; draw_sprite(bm.fishes[i].tx, bm.fishes[i].y, turnframe); /* because this is a special case, handle updating things here. * notice, delay is lowered (quicker turn), and rev is also * flipped after turn completion */ bm.fishes[i].delay += bm.fishes[i].speed; if (bm.fishes[i].delay >= 5) { if (++bm.fishes[i].frame >= 4) { bm.fishes[i].frame = 0; bm.fishes[i].rev = !bm.fishes[i].rev; bm.fishes[i].turn = 0; bm.fishes[i].speed = (rand() % 2) + 1; } bm.fishes[i].delay = 0; } /* get to the next fish */ continue; } else { /* animate fishes using fish_animation array */ draw_sprite(bm.fishes[i].tx, bm.fishes[i].y, bm.fishes[i].rev + fish_animation[bm.fishes[i].frame]); } /* switch to next swimming frame */ bm.fishes[i].delay += bm.fishes[i].speed; if (bm.fishes[i].delay >= 10) { if (++bm.fishes[i].frame > 3) bm.fishes[i].frame = 0; bm.fishes[i].delay = 0; } } } void copy_sprite_data(int sx, int sy, int w, int h, unsigned char *to) { int i, j; for (i = 0; i < h; i++) { for (j = 0; j < w; j++) { to[(i * w) + j] = THE_DATA[((sy + i) * HWIDTH) + (sx + j)]; } } } void prepare_sprites(void) { int i = 0; i = height; i = 0; while (sp[i].w) { if (sp[i].data) free(sp[i].data); sp[i].data = calloc(1, sp[i].w * sp[i].h); copy_sprite_data(sp[i].srcx, sp[i].srcy, sp[i].w, sp[i].h, sp[i].data); i++; } if(fish_traffic) { for (i = 0; i < NRFISH; i++) { if(i < (NRFISH / 2)) { bm.fishes[i].tx = -18 - rand() % XMAX; bm.fishes[i].y = 50; bm.fishes[i].rev = 1; bm.fishes[i].speed = 0; } else { bm.fishes[i].tx = XMAX + rand() % XMAX; bm.fishes[i].y = 50; bm.fishes[i].rev = 0; bm.fishes[i].speed = 0; } } } else { for (i = 0; i < NRFISH; i++) { bm.fishes[i].y = 50; bm.fishes[i].rev = (i % 2) ? 1 : 0; bm.fishes[i].tx = rand() % XMAX; bm.fishes[i].speed = (rand() % 2) + 1; } } bm.weeds[0].where = -5; bm.weeds[0].frame = rand() % 7; bm.weeds[1].where = 42; bm.weeds[1].frame = rand() % 7; } /******************************************************************** * * * Drawing Functions below * * * ********************************************************************/ /* draw XMAX x YMAX colormap image into the main rgb buffer */ void draw_cmap_image(void) { int i; unsigned char cmap; for (i = 0; i < CMAPSIZE; i++) { if ((cmap = bm.image[i]) != 0) { int pos = i * 3; bm.rgb_buf[pos++] = THE_CMAP[cmap][0]; bm.rgb_buf[pos++] = THE_CMAP[cmap][1]; /* * Looks nicer without this :) bm.rgb_buf[pos] = THE_CMAP[cmap][2]; */ } } } /* draw a sprite into bm.image (palette-based) */ void draw_sprite(int x, int y, int idx) { /* bounding box of the clipped sprite */ int dw, di, dh, ds; /* loop counters */ int w, h; /* offset into image buffer */ int pos; /* cmap reference for each pixel */ unsigned char cmap; assert(idx >= 0); /* completely off the screen, don't bother drawing */ if ((y < -(sp[idx].h)) || (y > YMAX) || (x > XMAX) || (x < -(sp[idx].w))) return; /* do clipping for top side */ ds = 0; if (y < 0) ds = -(y); /* do clipping for bottom side */ dh = sp[idx].h; if ((y + sp[idx].h) > YMAX) dh = YMAX - y; /* do clipping for right side */ dw = sp[idx].w; if (x > (XMAX - sp[idx].w)) dw = sp[idx].w - (x - (XMAX - sp[idx].w)); /* do clipping for left side */ di = 0; if (x < 0) di = -(x); for (h = ds; h < dh; h++) { /* offset to beginning of current row */ int ypos = (h + y) * XMAX; for (w = di; w < dw; w++) { if ((cmap = sp[idx].data[h * sp[idx].w + w]) != 0) { pos = ypos + w + x; bm.image[pos] = cmap; } } } } /* draw a sprite into bm.rgb_buf with alpha-blend */ void draw_sprite_alpha(int x, int y, int idx, int alpha) { /* bounding box of the clipped sprite */ int dw, di, dh, ds; /* loop counters */ int w, h; /* offset into rgb buffer */ int pos; /* cmap reference for each pixel */ unsigned char cmap; /* completely off the screen, don't bother drawing */ if ((y < -(sp[idx].h)) || (y > YMAX) || (x > XMAX) || (x < -(sp[idx].w))) return; /* do clipping for top side */ ds = 0; if (y < 0) ds = -(y); /* do clipping for bottom side */ dh = sp[idx].h; if ((y + sp[idx].h) > YMAX) dh = YMAX - y; /* do clipping for right side */ dw = sp[idx].w; if (x > (XMAX - sp[idx].w)) dw = sp[idx].w - (x - (XMAX - sp[idx].w)); /* do clipping for left side */ di = 0; if (x < 0) di = -(x); for (h = ds; h < dh; h++) { /* offset to beginning of current row */ int ypos = (h + y) * XMAX; for (w = di; w < dw; w++) { if ((cmap = sp[idx].data[h * sp[idx].w + w]) != 0) { unsigned char r, g, b; pos = (ypos + w + x) * 3; r = THE_CMAP[cmap][0]; g = THE_CMAP[cmap][1]; b = THE_CMAP[cmap][2]; bm.rgb_buf[pos] = (alpha * (int) bm.rgb_buf[pos] + (256 - alpha) * (int) r) >> 8; bm.rgb_buf[pos + 1] = (alpha * (int) bm.rgb_buf[pos + 1] + (256 - alpha) * (int) g) >> 8; bm.rgb_buf[pos + 2] = (alpha * (int) bm.rgb_buf[pos + 2] + (256 - alpha) * (int) b) >> 8; } } } } /* draw string using the draw_ascii function below. Please make sure the * output doesn't go outside the dockapp as no checking is performed! */ void draw_string(int dx, int dy, char *string) { char c = 0; while ((c = *string++)) { draw_ascii(dx, dy, c); if (c != '-') dx += 6; else dx += 5; } } /* draw digits 0..9, letters A..Z, and "-" * Clipping not performed! Must be inside dockapp at all times! */ void draw_ascii(int dx, int dy, char digit) { char *source = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ- "; int idx = strchr(source, digit) - source; int x, y; /* handle "space" here */ if (idx == 37) return; for (y = 0; y < 7; y++) { for (x = 0; x < 6; x++) { int src = font_data[(y * 222 + x) + (idx * 6)]; if (src) { int pos = ((y + dy) * XMAX * 3) + (x + dx) * 3; bm.rgb_buf[pos + 0] = font_cmap[src][0]; bm.rgb_buf[pos + 1] = font_cmap[src][1]; bm.rgb_buf[pos + 2] = font_cmap[src][2]; } } } } /* put alpha-blended pixel on the backbuffer. Uses floats, could be * optimized, probably */ void putpixel(int x, int y, float i, int linewidth, int color) { int pos = (y * XMAX * 3) + x * 3; unsigned char r = ((color >> 16) & 0xff) * i + (bm.rgb_buf[pos]) * (1 - i); unsigned char g = ((color >> 8) & 0xff) * i + (bm.rgb_buf[pos + 1]) * (1 - i); unsigned char b = (color & 0xff) * i + (bm.rgb_buf[pos + 2]) * (1 - i); if (linewidth == 1) { bm.rgb_buf[pos] = r; bm.rgb_buf[pos + 1] = g; bm.rgb_buf[pos + 2] = b; } else { int dx, dy; for (dx = x; dx < x + linewidth; dx++) { for (dy = y; dy < y + linewidth; dy++) { pos = (dy * XMAX * 3) + dx * 3; bm.rgb_buf[pos] = r; bm.rgb_buf[pos + 1] = g; bm.rgb_buf[pos + 2] = b; } } } } void traffic_fish_update() { int i, j; int rx_speed = net_rx_speed(); int tx_speed = net_tx_speed(); for (i = 0; i < NRFISH; i++) { /* No traffic, do nothing */ if (bm.fishes[i].speed == 0 && rx_speed == 0 && tx_speed == 0) { continue; } if(i < (NRFISH / 2)) { /* tx traffic */ if(bm.fishes[i].tx < XMAX) { if(bm.fishes[i].speed < tx_speed) { /* Slowly accelerate */ bm.fishes[i].speed += 1; } bm.fishes[i].tx += bm.fishes[i].speed; } else { /* Done once, go back */ bm.fishes[i].tx = -18 - rand() % XMAX; bm.fishes[i].y = (rand() % (YMAX - 14)); if(tx_speed == 0) { /* Stop the fish when it's at the end... */ bm.fishes[i].speed = 0; } else { bm.fishes[i].speed = tx_speed; } } } else { /* rx traffic */ if(bm.fishes[i].tx > -18) { if(bm.fishes[i].speed < rx_speed) { /* Slowly accelerate */ bm.fishes[i].speed += 1; } bm.fishes[i].tx -= bm.fishes[i].speed; } else { /* Done once, go back */ bm.fishes[i].tx = XMAX + rand() % XMAX; bm.fishes[i].y = (rand() % (YMAX - 14)); if(rx_speed == 0) { /* Stop the fish when it's at the end... */ bm.fishes[i].speed = 0; } else { bm.fishes[i].speed = rx_speed; bm.fishes[i].tx -= bm.fishes[i].speed; } } } /* move fish in vertical position randomly by one pixel up or down */ j = rand() % 16; if (j <= 4) { bm.fishes[i].y--; } else if (j > 12) { bm.fishes[i].y++; } bm.fishes[i].y = adjust_y(bm.fishes[i].y); /* animate fishes using fish_animation array */ draw_sprite(bm.fishes[i].tx, bm.fishes[i].y, bm.fishes[i].rev + fish_animation[bm.fishes[i].frame]); /* switch to next swimming frame */ bm.fishes[i].delay += bm.fishes[i].speed; if (bm.fishes[i].delay >= 10) { if (++bm.fishes[i].frame > 3) bm.fishes[i].frame = 0; bm.fishes[i].delay = 0; } } } #ifdef ENABLE_TIME void time_update(void) { struct tm *data; time_t cur_time; static time_t old_time; int hr, min, sec; static int osec = -1; static int oday = -1; static int hdx, hdy, mdx, mdy, sdx, sdy; double psi; cur_time = time(NULL); if (cur_time != old_time) { old_time = cur_time; data = localtime(&cur_time); hr = data->tm_hour % 12; min = data->tm_min; sec = data->tm_sec; /* hours */ if ((sec % 15) == 0) { psi = hr * (M_PI / 6.0); psi += min * (M_PI / 360); hdx = floor(sin(psi) * 26 * 0.55) + 28; hdy = floor(-cos(psi) * 22 * 0.55) + 24; } /* minutes */ if ((sec % 15) == 0) { psi = min * (M_PI / 30.0); psi += sec * (M_PI / 1800); mdx = floor(sin(psi) * 26 * 0.7) + 28; mdy = floor(-cos(psi) * 22 * 0.7) + 24; } /* seconds */ if (osec != sec) { psi = sec * (M_PI / 30.0); sdx = floor(sin(psi) * 26 * 0.9) + 28; sdy = floor(-cos(psi) * 22 * 0.9) + 24; osec = sec; } /* see if we need to redraw the day/month/weekday deal */ if (data->tm_mday != oday) { oday = data->tm_mday; /* redundant calculation for a reason */ psi = hr * (M_PI / 6.0); psi += min * (M_PI / 360); hdx = floor(sin(psi) * 26 * 0.55) + 28; hdy = floor(-cos(psi) * 22 * 0.55) + 24; psi = min * (M_PI / 30.0); psi += sec * (M_PI / 1800); mdx = floor(sin(psi) * 26 * 0.7) + 28; mdy = floor(-cos(psi) * 22 * 0.7) + 24; /* reflash the backbuffer / date / weekday */ /* prepare_backbuffer(0); */ } } /* must redraw each frame */ anti_line(28, 24, mdx, mdy, 1, 0xeeeeee); anti_line(28, 24, hdx, hdy, 1, 0xbf0000); anti_line(28, 24, sdx, sdy, 1, 0xc79f2b); } /* draw antialiased line from (x1, y1) to (x2, y2), with width linewidth * color is an int like 0xRRGGBB */ void anti_line(int x1, int y1, int x2, int y2, int linewidth, int color) { int dx = abs(x1 - x2); int dy = abs(y1 - y2); int error, sign, tmp; float ipix; int step = linewidth; if (dx >= dy) { if (x1 > x2) { tmp = x1; x1 = x2; x2 = tmp; tmp = y1; y1 = y2; y2 = tmp; } error = dx / 2; if (y2 > y1) sign = step; else sign = -step; putpixel(x1, y1, 1, linewidth, color); while (x1 < x2) { if ((error -= dy) < 0) { y1 += sign; error += dx; } x1 += step; ipix = (float)error / dx; if (sign == step) ipix = 1 - ipix; putpixel(x1, y1, 1, linewidth, color); putpixel(x1, y1 - step, (1 - ipix), linewidth, color); putpixel(x1, y1 + step, ipix, linewidth, color); } putpixel(x2, y2, 1, linewidth, color); } else { if (y1 > y2) { tmp = x1; x1 = x2; x2 = tmp; tmp = y1; y1 = y2; y2 = tmp; } error = dy / 2; if (x2 > x1) sign = step; else sign = -step; putpixel(x1, y1, 1, linewidth, color); while (y1 < y2) { if ((error -= dx) < 0) { x1 += sign; error += dy; } y1 += step; ipix = (float)error / dy; if (sign == step) ipix = 1 - ipix; putpixel(x1 ,y1, 1, linewidth, color); putpixel(x1 - step, y1, (1 - ipix), linewidth, color); putpixel(x1 + step, y1, ipix, linewidth, color); } putpixel(x2, y2, 1, linewidth, color); } } #endif bfm-0.6.4/Makefile.FreeBSD0000644000175000017500000000175510100345427015064 0ustar josejose00000000000000# bubblemon configuration EXTRA = -DENABLE_DUCK EXTRA += -DENABLE_CPU EXTRA += -DENABLE_MEMSCREEN EXTRA += -DUPSIDE_DOWN_DUCK EXTRA += $(WMAN) # no user serviceable parts below CC = gcc # optimization cflags CFLAGS = -O3 -ansi -Wall `gtk-config --cflags` ${EXTRA} # profiling cflags # CFLAGS = -ansi -Wall -pg -O3 `gtk-config --cflags` ${EXTRA} -DPRO # test coverage cflags # CFLAGS = -fprofile-arcs -ftest-coverage -Wall -ansi -g `gtk-config --cflags` ${EXTRA} -DPRO LIBS = `gtk-config --libs | sed "s/-l.*//g"` -lgdk12 -lkvm PREFIX = /usr/X11R6 VPATH = include all: bubblemon bubblemon: bubblemon.o sys_freebsd.o gcc ${CFLAGS} -o bubblemon bubblemon.o sys_freebsd.o ${LIBS} clean: rm -f bubblemon bubblemon.o *.o *.bb* *.gcov gmon.* *.da winglue.c bubblemon32 *.so win32.spec *~ *.gmon *.s *.core install: install -c -g kmem -m 2755 -o root bubblemon ${PREFIX}/bin bubblemon.o: bubblemon.h ducks.h master.xpm sys_include.h digits.h \ load_screen.h mem_screen.h sys_freebsd.o: bubblemon.h bfm-0.6.4/bubblemon.c0000644000175000017500000013046110100503020014302 0ustar josejose00000000000000/* * bubblefishymon * * Well, Hacks from bubblemon by timecop and Johan * * http://www.student.nada.kth.se/~d92-jwa/code/ * http://www.ne.jp/asahi/linux/timecop/ * * Basically putting timecop's bubblemon and wmfishtime together. * * * 0.4 2001/11/20 * - Added -t for time. * - Changed a bit of the color of the clock's hands. * - The code is still in a very "hacking" state. Not clean. Not good. * Will be better :) * * 0.3 2001/07/16 * - Code tidying, fixes, etc. * * 0.2 * - Added -n for fishy network traffic * * 0.1 * - Got fish! * * * Pigeon (pigeon@pigeond.net) * http://pigeond.net/ * */ /* BubbleMon dockapp 1.32 * * - dockapp for Window Maker/Blackbox/E/Afterstep/SawBabble * - Code outside of bubblemon_update copyright 2000, 2001 * timecop@japan.co.jp * - oleg dashevskii made changes to collect memory * and cpu information on FreeBSD. Some major performance improvements * and other cool hacks. Useful ideas - memscreen, load screen, etc. * - Adrian B came up with the idea of load * meter. * - tarzeau@space.ch sent in cute duck gfx and suggestions, plus some * code and duck motion fixes. * - Phil Lu Dan Price - Solaris/SunOS * port * - Everything else copyright one of the guys below * * TODO: Anything else? Add fish? * * ************************************************************************* * * Bubbling Load Monitoring Applet * - A GNOME panel applet that displays the CPU + memory load as a * bubbling liquid. * Copyright (C) 1999-2000 Johan Walles * - d92-jwa@nada.kth.se * Copyright (C) 1999 Merlin Hughes * - merlin@merlin.org * - http://nitric.com/freeware/ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA. * */ #define _GNU_SOURCE #define VERSION "0.6.4" /* general includes */ #include #include #include #include #include #include /* x11 includes */ #include #include #include #include #ifndef GKRELLM_BFM #include "include/master.xpm" #endif #include "include/bubblemon.h" #include "include/sys_include.h" #ifdef ENABLE_DUCK #include "include/ducks.h" #endif #if defined(ENABLE_CPU) #include "include/digits.h" #endif #if defined(ENABLE_MEMSCREEN) #include "include/load_screen.h" #include "include/mem_screen.h" #endif /* #define DEBUG_DUCK 1 */ #ifndef GKRELLM_BFM static int get_screen_selection(void); #endif /* local prototypes *INDENT-OFF* */ static void bubblemon_setup_samples(void); static void bubblemon_setup_colors(void); static void bubblemon_allocate_buffers(void); static void bubblemon_update(int proximity); static void make_new_bubblemon_dockapp(void); static void get_memory_load_percentage(void); static void bubblemon_session_defaults(void); #ifndef GKRELLM_BFM static int get_screen_selection(void); #endif #if defined(ENABLE_CPU) || defined(ENABLE_MEMSCREEN) /* draw functions for load average / memory screens */ static void draw_pixel(unsigned int x, unsigned int y, unsigned char *buf, unsigned char *c); static void draw_history(int num, int size, unsigned int *history, unsigned char *buf); static void draw_digit(int srcx, int srcy, int destx, int desty); static void draw_string(char *string, int x, int y, int color); static void draw_cpudigit(const int what, const int where, unsigned char *kit); static void render_secondary(void); static void realtime_alpha_blend_of_cpu_usage(int cpu, int proximity); static void roll_membuffer(void); static void roll_history(void); #endif #ifdef ENABLE_DUCK static int animate_correctly(void); static void duck_set(int x, int y, int nr, int rev, int upsidedown); static void duck_swimmer(int posy); #endif #ifdef __FreeBSD__ extern int init_stuff(); /* defined in sys_freebsd.c */ #endif /* local prototypes end *INDENT-ON* */ /* global variables */ BubbleMonData bm; /* compiled-in options string */ char options[1024]; #ifdef ENABLE_DUCK int duck_enabled = 1; #ifdef ENABLE_FISH int fish_enabled = 1; int fish_traffic = 0; #ifdef NET_DEVICE char *network_interface = NET_DEVICE; #else char *network_interface = "eth0"; #endif #endif #ifdef ENABLE_TIME int time_enabled = 0; #endif #ifdef UPSIDE_DOWN_DUCK int upside_down_duck_enabled = 1; #endif /* UPSIDE_DOWN_DUCK */ #endif /* ENABLE_DUCK */ #ifdef ENABLE_CPU int cpu_enabled = 1; #endif /* ENABLE_CPU */ #ifdef ENABLE_MEMSCREEN int memscreen_enabled = 1; int memscreen_megabytes = 0; #endif /* ENABLE_MEMSCREEN */ #define INT_VAL 0 #define DOUBLE_VAL 1 #define COLOR_VAL 2 #ifdef ENABLE_FISH void prepare_backbuffer(int solid); void prepare_sprites(void); void fishmon_update(void); #endif #ifdef ENABLE_TIME void time_update(void); #endif #include "include/fishmon.h" int bubble_state_change = (YMAX / 4); static void bubblemon_session_defaults(void) { /* handy way to collect all this stuff in one place */ typedef struct { char *name; /* name as appears in Xdefaults */ int type; /* int, double, or color, see up */ void *var; /* pointer to value - only handles INT atm */ } xrm_vars; /* XResource stuff */ char name[BUFSIZ] = "", *ptr; XrmDatabase db = NULL; XrmValue val; char *type; int i; xrm_vars tab[] = { {"bubblemon.maxbubbles", INT_VAL, &bm.maxbubbles}, {"bubblemon.air_noswap", COLOR_VAL, &bm.air_noswap}, {"bubblemon.air_maxswap", COLOR_VAL, &bm.air_maxswap}, {"bubblemon.liquid_noswap", COLOR_VAL, &bm.liquid_noswap}, {"bubblemon.liquid_maxswap", COLOR_VAL, &bm.liquid_maxswap}, {"bubblemon.ripples", DOUBLE_VAL, &bm.ripples}, {"bubblemon.gravity", DOUBLE_VAL, &bm.gravity}, {"bubblemon.volatility", DOUBLE_VAL, &bm.volatility}, {"bubblemon.viscosity", DOUBLE_VAL, &bm.viscosity}, {"bubblemon.speed_limit", DOUBLE_VAL, &bm.speed_limit} }; /* number of CPU load samples */ bm.samples = 16; /* default colors. changeable from Xdefaults */ bm.air_noswap = 0x2299ff; bm.liquid_noswap = 0x0055ff; bm.air_maxswap = 0xff0000; bm.liquid_maxswap = 0xaa0000; /* default bubble engine parameters. Changeable from Xdefaults */ bm.maxbubbles = 100; bm.ripples = 0.2; bm.gravity = 0.01; bm.volatility = 1.0; bm.viscosity = 0.98; bm.speed_limit = 1.0; db = NULL; XrmInitialize(); /* get users's local Xdefaults */ if ((ptr = getenv("HOME")) != NULL) { snprintf(name, sizeof(name), "%s/.Xdefaults", ptr); } /* get the database and parse resources if we have some */ if ((db = XrmGetFileDatabase(name)) != NULL) { for (i = 0; i < (sizeof(tab) / sizeof(tab[0])); i++) { if (XrmGetResource(db, tab[i].name, tab[i].name, &type, &val)) { if (val.size > 0) /* no empty strings and shit like that */ switch (tab[i].type) { case INT_VAL: *(int *) tab[i].var = atoi(val.addr); break; case DOUBLE_VAL: *(double *) tab[i].var = atof(val.addr); break; case COLOR_VAL: sscanf(val.addr, "#%x", (int *) tab[i].var); break; default: /* WTF? */ break; } } } } #define RANGE_CHECK(x, min, max, def) \ if ((x) > (max) || (x) < (min)) { \ fprintf(stderr, #x" value is out of range. Using default value ("#def")\n"); \ (x) = (def); \ } /* range validation. 3l33t hackerz NO PASARAN */ RANGE_CHECK(bm.air_noswap, 0, 0xffffff, 0x2299ff); RANGE_CHECK(bm.liquid_noswap, 0, 0xffffff, 0x0055ff); RANGE_CHECK(bm.air_maxswap, 0, 0xffffff, 0xff0000); RANGE_CHECK(bm.liquid_maxswap, 0, 0xffffff, 0xaa0000); RANGE_CHECK(bm.maxbubbles, 10, 200, 100); RANGE_CHECK(bm.ripples, 0, 1, 0.2); RANGE_CHECK(bm.gravity, 0.005, 0.5, 0.01); RANGE_CHECK(bm.volatility, 0.1, 2, 1.0); RANGE_CHECK(bm.viscosity, 0, 1.0, 0.98); RANGE_CHECK(bm.speed_limit, 0.5, 2, 1.0); #undef RANGE_CHECK /* convert doubles into integer representation */ bm.ripples_int = MAKE_INTEGER(bm.ripples); bm.gravity_int = MAKE_INTEGER(bm.gravity); bm.volatility_int = MAKE_INTEGER(bm.volatility); bm.viscosity_int = MAKE_INTEGER(bm.viscosity); bm.speed_limit_int = MAKE_INTEGER(bm.speed_limit); } #undef INT_VAL #undef DOUBLE_VAL #undef COLOR_VAL #ifndef GKRELLM_BFM /* *INDENT-OFF* */ static void print_usage(void) { printf( "bubblefishymon version "VERSION", features: %s\n" "Usage: bubblefishymon [switches] [program_1] [program_2]\n\n" "Disable compiled-in features\n" #ifdef ENABLE_DUCK " -d\t\tdisable swimming duck\n" #ifdef UPSIDE_DOWN_DUCK " -u\t\tdisable upside-down duck\n" #endif /* UPSIDE_DOWN_DUCK */ #endif /* ENABLE_DUCK */ #ifdef ENABLE_FISH " -f\t\tdisable fish\n" #endif #ifdef ENABLE_CPU " -c\t\tdisable CPU meter\n" #endif /* ENABLE_CPU */ #ifdef ENABLE_MEMSCREEN " -m\t\tdisable memory screen\n" #endif /* ENABLE_MEMSCREEN */ "\nGeneral options\n" #ifdef ENABLE_MEMSCREEN " -p\t\tuse alternative color scheme in memory info screen\n" " -k\t\tdisplay memory and swap statistics in megabytes\n" #endif #ifdef ENABLE_FISH " -n[iface]\tfish represents network traffic [on ]\n" #endif #ifdef ENABLE_TIME " -t\t\tdraw the clock too\n" #endif " -h\t\tdisplay this help\n", options /* this is the global static string with compiled features */ ); } /* *INDENT-ON* */ #endif #ifdef GKRELLM_BFM int bfm_main() #else int main(int argc, char **argv) #endif { char execute[256]; #ifndef GKRELLM_BFM int proximity = 0; int ch; #endif #ifdef FPS int f, o; time_t y; #endif #ifdef PRO int cnt = 25000; #endif #ifndef GKRELLM_BFM GdkEvent *event; #endif #ifdef FPS o = f = y = 0; #endif /* initialize GDK */ #ifndef GKRELLM_BFM if (!gdk_init_check(&argc, &argv)) { fprintf(stderr, "GDK init failed, bye bye. Check \"DISPLAY\" variable.\n"); exit(-1); } #endif gdk_rgb_init(); /* dynamically generate getopt string depending on compile options * we are going to borrow 256 char string from exec function, and * also build up the "compiled features" string */ memset(execute, 0, 256); strcat(execute, "h"); /* help, always in */ #ifdef ENABLE_DUCK strcat(options, "DUCK "); strcat(execute, "d"); #ifdef UPSIDE_DOWN_DUCK strcat(options, "INVERT "); strcat(execute, "u"); #endif /* UPSIDE_DOWN_DUCK */ #endif /* ENABLE_DUCK */ #ifdef ENABLE_CPU strcat(options, "CPU "); strcat(execute, "c"); #endif /* ENABLE_CPU */ #ifdef ENABLE_MEMSCREEN strcat(options, "MEMSCREEN "); strcat(execute, "pmk"); #endif /* ENABLE_MEMSCREEN */ #ifdef ENABLE_FISH strcat(options, "FISH "); strcat(execute, "f"); strcat(execute, "n::"); #endif #ifdef ENABLE_TIME strcat(options, "TIME "); strcat(execute, "t"); #endif #ifndef GKRELLM_BFM /* command line options */ while ((ch = getopt(argc, argv, execute)) != -1) { switch (ch) { #ifdef ENABLE_DUCK case 'd': duck_enabled = 0; break; #ifdef UPSIDE_DOWN_DUCK case 'u': upside_down_duck_enabled = 0; break; #endif /* UPSIDE_DOWN_DUCK */ #endif /* ENABLE_DUCK */ #ifdef ENABLE_CPU case 'c': cpu_enabled = 0; break; #endif /* ENABLE_CPU */ #ifdef ENABLE_MEMSCREEN case 'm': memscreen_enabled = 0; break; case 'p': { /* no sense having -p if memscreen isn't compiled in, right? * what we are going to do is to change the colors as follows: * * (48,140,240) replaced with (158,196,237) - more pale blue * (237,23,23) replaced with (0,255,233) */ unsigned char *p = mem_screen; while (p < mem_screen + sizeof(mem_screen)) if (*p == 48) { /* hopefully no other colors beginning with 48 */ *p++ = 158; *p++ = 196; *p++ = 237; } else if (*p == 237) { /* hopefully no other colors beginning with 237 */ *p++ = 0; *p++ = 255; *p++ = 233; } else p += 3; p = load_screen; while (p < load_screen + sizeof(load_screen)) if (*p == 48) { /* hopefully no other colors beginning with 48 */ *p++ = 158; *p++ = 196; *p++ = 237; } else p += 3; } break; case 'k': memscreen_megabytes = 1; break; #endif /* ENABLE_MEMSCREEN */ #ifdef ENABLE_FISH case 'f': fish_enabled = 0; break; case 'n': fish_traffic = 1; if (optarg) network_interface = optarg; break; #endif #ifdef ENABLE_TIME case 't': time_enabled = 1; break; #endif default: print_usage(); exit(-1); break; } } argc -= optind; argv += optind; #endif /* zero data structure */ memset(&bm, 0, sizeof(bm)); #ifdef __FreeBSD__ if (init_stuff()) exit(-1); #endif /* set default things, from Xresources or compiled-in defaults */ bubblemon_session_defaults(); /* create dockapp window. creates windows, allocates memory, etc */ make_new_bubblemon_dockapp(); #ifdef ENABLE_FISH if(fish_enabled) { prepare_sprites(); } #endif #ifndef GKRELLM_BFM #ifdef PRO while (cnt--) { #else while (1) { #endif while (gdk_events_pending()) { event = gdk_event_get(); if (event) { switch (event->type) { case GDK_DESTROY: gdk_exit(0); exit(0); break; case GDK_BUTTON_PRESS: if (event->button.button == 3) { bm.picture_lock = 1; break; } if (event->button.button <= argc) { snprintf(execute, 250, "%s &", argv[event->button.button - 1]); system(execute); } break; #if defined(ENABLE_CPU) || defined(ENABLE_MEMSCREEN) case GDK_ENTER_NOTIFY: /* mouse in: make it darker, and eventually bring up * meminfo */ proximity = 1; bm.screen_type = get_screen_selection(); bm.picture_lock = 0; break; case GDK_LEAVE_NOTIFY: /* mouse out: back to light */ proximity = 0; break; #endif /* ENABLE_CPU || ENABLE_MEMSCREEN */ default: break; } } } #ifndef PRO usleep(15000); #else /* amazingly enough just calling this function takes insane * amount of time. usleep(0); */ #endif /* get system statistics */ get_memory_load_percentage(); /* update main rgb buffer: bm.rgb_buf */ bubblemon_update(proximity); /* *INDENT-OFF* */ #ifdef FPS /* render frames per second on bottom-right corner :) * This is GCC-specific (functions inside functions) * and very unoptimized. this is obfuscated 'cause its ugly */ f++;{int b;void q(int sx,int sy,int dx,int dy){int i,j;char *from,*to; for(j=0;j<8;j++){from=mem_screen+56*3*(sy+j)+sx*3;to=bm.rgb_buf+56*3* (dy+j)+dx*3;i=12;while(i--)*to++=*from++;}}b=o;if(b>=100){q((b/100)*4, 60,43,46);b=b%100;}q((b/10)*4,60,47,46);q((b%10)*4,60,51,46);}if(time( NULL)!=y){o=f;f=0;y=time(NULL);} #endif /* *INDENT-ON* */ /* actually draw the screen */ #ifndef BLACKBOX gdk_draw_rgb_image(bm.win, bm.gc, 4, 4, 56, 56, GDK_RGB_DITHER_NONE, bm.rgb_buf, 56 * 3); #endif gdk_draw_rgb_image(bm.iconwin, bm.gc, 4, 4, 56, 56, GDK_RGB_DITHER_NONE, bm.rgb_buf, 56 * 3); #ifdef ENABLE_MEMSCREEN /* update graph histories */ if (memscreen_enabled) roll_history(); #endif /* ENABLE_MEMSCREEN */ } #endif return 0; } /* main */ #ifdef GKRELLM_BFM void gkrellm_update(GtkWidget *widget, GdkDrawable *drawable, int start_x, int proximity) { bm.screen_type = 1; /* get system statistics */ get_memory_load_percentage(); /* update main rgb buffer: bm.rgb_buf */ bubblemon_update(proximity); gdk_draw_rgb_image(drawable, widget->style->fg_gc[GTK_STATE_NORMAL], start_x, 0, 56, 56, GDK_RGB_DITHER_NONE, bm.rgb_buf, 56 * 3); if (memscreen_enabled) roll_history(); } #endif /* * This determines if the left or right shift keys are depressed. */ #ifndef GKRELLM_BFM static int get_screen_selection(void) { static KeyCode lshift_code, rshift_code; static int first_time = 1; char keys[32]; if (first_time) { first_time = 0; lshift_code = XKeysymToKeycode(GDK_WINDOW_XDISPLAY(bm.win), XStringToKeysym("Shift_L")); rshift_code = XKeysymToKeycode(GDK_WINDOW_XDISPLAY(bm.win), XStringToKeysym("Shift_R")); } XQueryKeymap(GDK_WINDOW_XDISPLAY(bm.win), keys); #if 0 if (0) { /* debug */ int i = 0; printf("lshift_code = 0x%x (index = %d, bit = %d\n", lshift_code, lshift_code >> 3, lshift_code % 8); printf("rshift_code = 0x%x (index = %d, bit = %d\n", rshift_code, rshift_code >> 3, rshift_code % 8); for (i = 0; i < (sizeof(keys) / sizeof(keys[0])); i++) { if (0 == (i % 8)) { printf("\n%2d:", i); } printf(" %2d", keys[i]); } printf("\n"); } #endif if ((keys[lshift_code >> 3] == (1 << (lshift_code % 8))) || (keys[rshift_code >> 3] == (1 << (rshift_code % 8)))) { return 0; } else { return 1; } } #endif /* This is the function that actually creates the display widgets */ static void make_new_bubblemon_dockapp(void) { #define MASK GDK_BUTTON_PRESS_MASK | \ GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK GdkWindowAttr attr; #ifndef GKRELLM_BFM GdkWindowAttr attri; Window win; Window iconwin; #endif XSizeHints sizehints; #ifndef GKRELLM_BFM XWMHints wmhints; #endif attr.width = 64; attr.height = 64; attr.title = "bubblefishymon"; attr.event_mask = MASK; attr.wclass = GDK_INPUT_OUTPUT; attr.visual = gdk_visual_get_system(); attr.colormap = gdk_colormap_get_system(); attr.wmclass_name = "bubblefishymon"; attr.wmclass_class = "bubblefishymon"; attr.window_type = GDK_WINDOW_TOPLEVEL; sizehints.flags = USSize; sizehints.width = 64; sizehints.height = 64; #ifndef GKRELLM_BFM bm.win = gdk_window_new(NULL, &attr, GDK_WA_TITLE | GDK_WA_WMCLASS | GDK_WA_VISUAL | GDK_WA_COLORMAP); if (!bm.win) fprintf(stderr, "Cannot make toplevel window\n"); attri.width = 64; attri.height = 64; attri.title = "bubblefishymon"; attri.event_mask = MASK; attri.wclass = GDK_INPUT_OUTPUT; attri.visual = gdk_visual_get_system(); attri.colormap = gdk_colormap_get_system(); attri.wmclass_name = "bubblefishymon"; attri.wmclass_class = "bubblefishymon"; attri.window_type = GDK_WINDOW_CHILD; bm.iconwin = gdk_window_new(bm.win, &attri, GDK_WA_TITLE | GDK_WA_WMCLASS); if (!bm.iconwin) fprintf(stderr, "Cannot make icon window\n"); win = GDK_WINDOW_XWINDOW(bm.win); iconwin = GDK_WINDOW_XWINDOW(bm.iconwin); XSetWMNormalHints(GDK_WINDOW_XDISPLAY(bm.win), win, &sizehints); wmhints.initial_state = WithdrawnState; wmhints.icon_window = iconwin; wmhints.icon_x = 0; wmhints.icon_y = 0; wmhints.window_group = win; wmhints.flags = StateHint | IconWindowHint | IconPositionHint | WindowGroupHint; bm.gc = gdk_gc_new(bm.win); bm.pixmap = gdk_pixmap_create_from_xpm_d(bm.win, &(bm.mask), NULL, master_xpm); gdk_window_shape_combine_mask(bm.win, bm.mask, 0, 0); gdk_window_shape_combine_mask(bm.iconwin, bm.mask, 0, 0); gdk_window_set_back_pixmap(bm.win, bm.pixmap, False); gdk_window_set_back_pixmap(bm.iconwin, bm.pixmap, False); gdk_window_show(bm.win); XSetWMHints(GDK_WINDOW_XDISPLAY(bm.win), win, &wmhints); #endif #ifdef KDE_DOCKAPP /* makes the dockapp visible inside KDE wm */ gdk_window_show(bm.iconwin); #endif /* We begin with zero bubbles */ bm.n_bubbles = 0; /* Allocate memory for calculations */ bubblemon_allocate_buffers(); bubblemon_setup_samples(); bubblemon_setup_colors(); #undef MASK } /* make_new_bubblemon_dockapp */ /* Pigeon Dirty, I moved these here so that I can use it somewhere else */ unsigned int real_waterlevel_min, real_waterlevel_max; /* * This function, bubblemon_update, gets the CPU usage and updates * the bubble array and main rgb buffer. */ static void bubblemon_update(int proximity) { Bubble *bubbles = bm.bubbles; unsigned int i, loadPercentage, *col, x, y; unsigned char *ptr, *buf, *buf_ptr; unsigned int aircolor, watercolor, aliascolor; unsigned int waterlevels_goal; /*int current_waterlevel_goal; */ /* These values are for keeping track of where we have to start drawing water. */ unsigned int waterlevel_min, waterlevel_max; unsigned int real_waterlevel_min, real_waterlevel_max; /* These values are for keeping track how deep the duck is inside water */ unsigned int action_min = 56; static unsigned int last_action_min = 0; /* Find out the CPU load */ loadPercentage = system_cpu(); #ifdef ENABLE_MEMSCREEN /* get loadavg */ if (memscreen_enabled) system_loadavg(); #endif /* ENABLE_MEMSCREEN */ /* The buf is made up of ints (0-(NUM_COLORS-1)), each pointing out an entry in the color table. A pixel in the buf is accessed using the formula buf[row * w + column]. */ /* y coordinates are counted from here multiplied by 256 */ /* to get actual screen coordinate, divide by 256 */ buf = bm.bubblebuf; col = bm.colors; waterlevel_max = 0; waterlevel_min = MAKEY(56); /* Move the water level with the current memory usage. */ waterlevels_goal = MAKEY(56) - ((bm.mem_percent * MAKEY(56)) / 100); /* Guard against boundary errors */ waterlevels_goal -= (1 << (POWER2 - 1)); bm.waterlevels[0] = waterlevels_goal; bm.waterlevels[55] = waterlevels_goal; for (x = 1; x < 55; x++) { /* Accelerate the current waterlevel towards its correct value */ bm.waterlevels_dy[x] += (((bm.waterlevels[x - 1] + bm.waterlevels[x + 1] - 2 * bm.waterlevels[x]) * bm.volatility_int) >> (POWER2 + 1)); bm.waterlevels_dy[x] *= bm.viscosity_int; bm.waterlevels_dy[x] >>= POWER2; if (bm.waterlevels_dy[x] > bm.speed_limit_int) bm.waterlevels_dy[x] = bm.speed_limit_int; else if (bm.waterlevels_dy[x] < -bm.speed_limit_int) bm.waterlevels_dy[x] = -bm.speed_limit_int; } for (x = 1; x < 55; x++) { /* Move the current water level */ bm.waterlevels[x] = bm.waterlevels[x] + bm.waterlevels_dy[x]; if (bm.waterlevels[x] > MAKEY(56)) { /* Stop the wave if it hits the floor... */ bm.waterlevels[x] = MAKEY(56); bm.waterlevels_dy[x] = 0; } else if (bm.waterlevels[x] < 0) { /* ... or the ceiling. */ bm.waterlevels[x] = 0; bm.waterlevels_dy[x] = 0; } /* Keep track of the highest and lowest water levels */ if (bm.waterlevels[x] > waterlevel_max) waterlevel_max = bm.waterlevels[x]; if (bm.waterlevels[x] < waterlevel_min) waterlevel_min = bm.waterlevels[x]; } real_waterlevel_min = REALY(waterlevel_min); real_waterlevel_max = REALY(waterlevel_max); if (action_min > real_waterlevel_min) action_min = real_waterlevel_min; /* Vary the colors of air and water with how many percent of the available swap space that is in use. 32 = (99_numcolors / 3) - 1 */ watercolor = ((32 * bm.swap_percent) / 100) * 3; aliascolor = watercolor + 1; aircolor = watercolor + 2; /* Draw the air-and-water background The waterlevel_max is the HIGHEST VALUE for the water level, which is actually the LOWEST VISUAL POINT of the water. Confusing enough? So we want to draw from top to bottom: Just air from (y == 0) to (y <= waterlevel_min) Mixed air and water from (y == waterlevel_min) to (y <= waterlevel_max) Just water from (y == waterlevel_max) to (y <= h) Three loops is more code than one, but should be faster (fewer comparisons) */ /* Air only */ memset(buf, aircolor, real_waterlevel_min * 56); /* Air and water */ for (x = 0; x < 56; x++) { /* Air... */ for (y = real_waterlevel_min; (signed) y < REALY(bm.waterlevels[x]); y++) buf[y * 56 + x] = aircolor; /* ... and water */ for (; y < real_waterlevel_max; y++) buf[y * 56 + x] = watercolor; } /* Water only */ memset(buf + real_waterlevel_max * 56, watercolor, (56 - real_waterlevel_max) * 56); /* Here comes the bubble magic. Pixels are drawn by setting values in buf to 0-NUM_COLORS. */ /* Create a new bubble if the planets are correctly aligned... */ if ((bm.n_bubbles < bm.maxbubbles) && ((rand() % 101) <= loadPercentage)) { /* We don't allow bubbles on the edges 'cause we'd have to clip them */ bubbles[bm.n_bubbles].x = (rand() % 54) + 1; bubbles[bm.n_bubbles].y = MAKEY(56) - 256; bubbles[bm.n_bubbles].dy = 0; #ifdef DEBUG_DUCK fprintf (stderr, "new bubble: bubbles[bm.n_bubbles].x = %i\n", bubbles[bm.n_bubbles].x); #endif if (bm.ripples_int != 0) { /* Raise the water level above where the bubble is created */ if (bubbles[bm.n_bubbles].x > 2) bm.waterlevels[bubbles[bm.n_bubbles].x - 2] -= bm.ripples_int; bm.waterlevels[bubbles[bm.n_bubbles].x - 1] -= bm.ripples_int; bm.waterlevels[bubbles[bm.n_bubbles].x] -= bm.ripples_int; bm.waterlevels[bubbles[bm.n_bubbles].x + 1] -= bm.ripples_int; if (bubbles[bm.n_bubbles].x < 53) bm.waterlevels[bubbles[bm.n_bubbles].x + 2] -= bm.ripples_int; } /* Count the new bubble */ bm.n_bubbles++; } /* Update and draw the bubbles */ for (i = 0; i < bm.n_bubbles; i++) { /* Accelerate the bubble */ bubbles[i].dy -= bm.gravity_int; /* Move the bubble vertically */ bubbles[i].y += bubbles[i].dy; /* is the bubble grossly out of bounds? */ if (bubbles[i].x < 1 || bubbles[i].x > 54 || bubbles[i].y > MAKEY(56)) { #ifdef DEBUG_DUCK fprintf (stderr, "bubble out of bounds " "bubbles[%i].x=%i, bubbles[%i].y=%i\n", i, bubbles[i].x, i, bubbles[i].y); #endif /* Yes; nuke it */ bubbles[i].x = bubbles[bm.n_bubbles - 1].x; bubbles[i].y = bubbles[bm.n_bubbles - 1].y; bubbles[i].dy = bubbles[bm.n_bubbles - 1].dy; bm.n_bubbles--; /* We must check the previously last bubble, which is now the current bubble, also. */ i--; continue; } /* Did we lose it? */ if (bubbles[i].y < bm.waterlevels[bubbles[i].x]) { if (bm.ripples_int != 0) { /* Lower the water level around where the bubble is about to vanish */ bm.waterlevels[bubbles[i].x - 1] += bm.ripples_int; bm.waterlevels[bubbles[i].x] += 3 * bm.ripples_int; bm.waterlevels[bubbles[i].x + 1] += bm.ripples_int; } /* Yes; nuke it */ bubbles[i].x = bubbles[bm.n_bubbles - 1].x; bubbles[i].y = bubbles[bm.n_bubbles - 1].y; bubbles[i].dy = bubbles[bm.n_bubbles - 1].dy; bm.n_bubbles--; /* We must check the previously last bubble, which is now the current bubble, also. */ i--; continue; } /* Draw the bubble */ x = bubbles[i].x; y = bubbles[i].y; /* Clipping is not necessary for x, but it *is* for y. To prevent ugliness, we draw aliascolor only on top of watercolor, and aircolor on top of aliascolor. */ /* Top row */ buf_ptr = &(buf[(((REALY(y) - 1) * 56) + 56) + x - 1]); if (y > bm.waterlevels[x]) { if (*buf_ptr != aircolor) { (*buf_ptr)++; } buf_ptr++; *buf_ptr = aircolor; buf_ptr++; if (*buf_ptr != aircolor) { (*buf_ptr)++; } buf_ptr += 54; } else { buf_ptr += 56; } /* Middle row - no clipping necessary */ *buf_ptr = aircolor; buf_ptr++; *buf_ptr = aircolor; buf_ptr++; *buf_ptr = aircolor; buf_ptr += 54; /* Bottom row */ if (y < (MAKEY(56) - 256)) { if (*buf_ptr != aircolor) { (*buf_ptr)++; } buf_ptr++; *buf_ptr = aircolor; buf_ptr++; if (*buf_ptr != aircolor) { (*buf_ptr)++; } } } /* Drawing magic resides below this point */ ptr = bm.rgb_buf; buf_ptr = buf; i = 56 * 56; while (i--) { unsigned char *rgb = (unsigned char *) &col[*buf_ptr++]; #if (defined(__BYTE_ORDER) && defined(__LITTLE_ENDIAN) && (__BYTE_ORDER == __LITTLE_ENDIAN)) || defined(_LITTLE_ENDIAN) || (BYTE_ORDER == LITTLE_ENDIAN) *ptr++ = rgb[2]; *ptr++ = rgb[1]; *ptr++ = rgb[0]; #else /* big-endian. */ *ptr++ = rgb[1]; *ptr++ = rgb[2]; *ptr++ = rgb[3]; #endif } #ifdef ENABLE_DUCK if (duck_enabled) { duck_swimmer((last_action_min < action_min) ? last_action_min - 14 : action_min - 14); } #endif #ifdef ENABLE_FISH if(fish_enabled) { fishmon_update(); } #endif #ifdef ENABLE_TIME /* update clock face */ if(time_enabled) { time_update(); } #endif /* damn, thats ugly. Of course, the first solution that comes to mind * about this isn't the right one :) */ #if defined(ENABLE_CPU) && defined(ENABLE_MEMSCREEN) if (cpu_enabled || memscreen_enabled) { realtime_alpha_blend_of_cpu_usage(loadPercentage, proximity); } #endif #if defined(ENABLE_CPU) && !defined(ENABLE_MEMSCREEN) if (cpu_enabled) { realtime_alpha_blend_of_cpu_usage(loadPercentage, proximity); } #endif #if !defined(ENABLE_CPU) && defined(ENABLE_MEMSCREEN) if (memscreen_enabled) { realtime_alpha_blend_of_cpu_usage(loadPercentage, proximity); } #endif /* Remember where we have been poking around this round */ last_action_min = action_min; } /* bubblemon_update */ #ifdef ENABLE_MEMSCREEN /* draws 4x8 digits for the memory/swap panel */ static void draw_digit(int srcx, int srcy, int destx, int desty) { int i, j; char *from, *to; for (j = 0; j < 8; j++) { from = mem_screen + 56 * 3 * (srcy + j) + srcx * 3; to = bm.mem_buf + 56 * 3 * (desty + j) + destx * 3; i = 12; while (i--) *to++ = *from++; } } /* draws a string using previous function. non-digits and non-K/M = space */ static void draw_string(char *string, int x, int y, int color) { unsigned char c; while ((c = *string++)) { if (c == 'K') { draw_digit(40, (color) ? 69 : 60, x, y); } else if (c == 'M') { draw_digit(44, (color) ? 69 : 60, x, y); } else if (c == ' ') { draw_digit(50, 60, x, y); /* blank space */ } else { c -= '0'; draw_digit(c * 4, (color) ? 69 : 60, x, y); } x += 4; } } static void draw_pixel(unsigned int x, unsigned int y, unsigned char *buf, unsigned char *c) { unsigned char *ptr; ptr = buf + y * 56 * 3 + x * 3 + 6; /* +6 = x + 2 */ *ptr++ = *c++; *ptr++ = *c++; *ptr++ = *c++; } /* draw graph num x size, data taken from history, into rgb buffer buf. * this is called not very often: only 1 time out of 250 */ static void draw_history(int num, int size, unsigned int *history, unsigned char *buf) { int pixels_per_byte; int j, k; int *p; int d; pixels_per_byte = 100; p = history; for (j = 0; j < num; j++) { if (p[0] > pixels_per_byte) pixels_per_byte += 100; p++; } p = history; for (k = 0; k < num; k++) { d = (1.0 * p[0] / pixels_per_byte) * size; for (j = 0; j < size; j++) { if (j < d - 2) draw_pixel(k, size - j - 1, buf, "\x00\x7d\x71"); else if (j < d) draw_pixel(k, size - j - 1, buf, "\x20\xb6\xae"); } p++; } for (j = pixels_per_byte - 100; j > 0; j -= 100) { for (k = 0; k < num; k++) { d = ((float) size / pixels_per_byte) * j; draw_pixel(k, size - d - 1, buf, "\x71\xe3\x71"); } } } /* refreshes memory/swap screen */ static void render_secondary(void) { char percent[4]; char number[8]; int i; /* mem: 2, 24 * mem %: 38, 24 * swap: 2, 43 * 38, 43 * digits: 0, 60 and 0, 69 */ /* make a clean buffer with blank spaces. */ memcpy(bm.mem_buf, bm.screen_type ? load_screen : mem_screen, 56 * 56 * 3); if (bm.screen_type) { for (i = 0; i < 3; i++) { sprintf(number, "%2d", bm.loadavg[i].i); draw_string(number, 19 * i, 8, 0); sprintf(number, "%02d", bm.loadavg[i].f); draw_string(number, 19 * i + 10, 8, 0); } /* copy history graph from previous rollover */ memcpy(bm.mem_buf + 19 * 56 * 3, bm.his_bufb, 56 * 33 * 3); } else { /* draw memory */ if (memscreen_megabytes) snprintf(number, 8, "%6lluM", bm.mem_used >> 20); else snprintf(number, 8, "%6lluK", bm.mem_used >> 10); snprintf(percent, 4, "%03d", bm.mem_percent); draw_string(number, 2, 1, (bm.mem_percent > 90) ? 1 : 0); draw_string(percent, 38, 1, (bm.mem_percent > 90) ? 1 : 0); /* draw swap */ if (memscreen_megabytes) snprintf(number, 8, "%6lluM", bm.swap_used >> 20); else snprintf(number, 8, "%6lluK", bm.swap_used >> 10); snprintf(percent, 4, "%03d", bm.swap_percent); draw_string(number, 2, 10, (bm.swap_percent > 90) ? 1 : 0); draw_string(percent, 38, 10, (bm.swap_percent > 90) ? 1 : 0); /* copy history graph from previous rollover */ memcpy(bm.mem_buf + 21 * 56 * 3, bm.his_bufa, 56 * 31 * 3); } } static void roll_membuffer(void) { static int delay; if (++delay < 30) return; delay = 0; render_secondary(); } static void roll_history(void) { unsigned int yep, j; static int update, doit; if (doit-- <= 0) { doit = ROLLVALUE; if (update-- <= 0) { /* roll history buffers, averaging last 5 samples */ if (bm.history[52]) bm.history[52] /= bm.hisadd; if (bm.memhist[52]) bm.memhist[52] /= bm.memadd; for (j = 1; j < 53; j++) { bm.history[j - 1] = bm.history[j]; bm.memhist[j - 1] = bm.memhist[j]; } bm.history[52] = 0; bm.hisadd = 0; bm.memhist[52] = 0; bm.memadd = 0; /* refresh backgrounds */ memcpy(bm.his_bufa, mem_screen + 21 * 56 * 3, 31 * 56 * 3); memcpy(bm.his_bufb, load_screen + 19 * 56 * 3, 33 * 56 * 3); /* render memory graph */ draw_history(52, 31, bm.memhist, bm.his_bufa); /* render load average graph */ draw_history(52, 33, bm.history, bm.his_bufb); /* reset counter */ update = 5; } /* do load average history update */ yep = bm.loadavg[0].f + (bm.loadavg[0].i * 100); bm.history[52] += yep; bm.hisadd++; /* do memory history update */ yep = bm.mem_percent; bm.memhist[52] += yep; bm.memadd++; } } #endif /* ENABLE_MEMSCREEN */ #ifdef ENABLE_CPU /* draws digits for the CPU meter. This function is very specific * to the meter. Arguments it takes are not what they seem initially */ static void draw_cpudigit(const int what, const int where, unsigned char *kit) { unsigned int len, y; unsigned char *to, *from; for (y = 0; y < 9; y++) { len = 21; to = kit + y * 75 + where; from = digits + y * 285 + what; while (len--) *to++ = *from++; } } #endif /* ENABLE_CPU */ #if defined(ENABLE_CPU) || defined(ENABLE_MEMSCREEN) static void realtime_alpha_blend_of_cpu_usage(int cpu, int proximity) { /* where is the text going to be (now, bottom-center) */ #define POSX 16 #define POSY 46 int bob; /* memory window */ static int blend = MAXBLEND; #ifdef ENABLE_MEMSCREEN static int memblend = 256; static int showmem = 0; #endif /* ENABLE_MEMSCREEN */ #ifdef ENABLE_CPU static int yoh; static int avg; int hibyte, y, pos; /* CPU load buffer */ static unsigned char kit[25 * 3 * 9 + 1]; unsigned char *kitptr; /* the plan is simple. we don't want to redraw the digits every update * because that doesn't look so good. so we average it, and draw only * once every 10 updates. We alpha blend the static buffer so we still * get cool transparency effects. */ avg += cpu; while (++yoh > 10) { cpu = avg / 10; avg ^= avg; /* zero. Haha, I guess these are not */ yoh ^= yoh; /* register vars, optimizer just zeros them */ hibyte = cpu / 10; /* but it's cool to know it understands xor a, a */ if (hibyte == 10) { draw_cpudigit(18, 0, kit); draw_cpudigit(0, 18, kit); draw_cpudigit(0, 36, kit); } else { draw_cpudigit(216, 0, kit); draw_cpudigit(hibyte * 18, 18, kit); draw_cpudigit((cpu % 10) * 18, 36, kit); } /* percent sign is always there */ draw_cpudigit(180, 54, kit); } #endif /* ENABLE_CPU */ /* sexy fade effect */ if (proximity) { blend -= 4; if (blend < MINBLEND) { blend = MINBLEND; #ifdef ENABLE_MEMSCREEN if (memscreen_enabled) { if (!showmem) { /* first time here, update memory stats */ render_secondary(); } showmem = 1; if (!bm.picture_lock) memblend -= 6; if (memblend < 40) { roll_membuffer(); memblend = 40; } } #endif /* ENABLE_MEMSCREEN */ } } else { blend += 4; #ifdef ENABLE_MEMSCREEN if (bm.picture_lock) roll_membuffer(); if (memscreen_enabled && !bm.picture_lock) memblend += 10; #endif /* ENABLE_MEMSCREEN */ if (blend > MAXBLEND) { blend = MAXBLEND; } #ifdef ENABLE_MEMSCREEN if (memscreen_enabled && memblend > 256) { memblend = 256; showmem = 0; } #endif /* ENABLE_MEMSCREEN */ } #ifdef ENABLE_CPU if (cpu_enabled) { /* bit shifts result in smaller and faster code without an extra jns * which appears if we / 128 instead of >> 7. */ kitptr = kit; for (y = 0; y < 9; y++) { unsigned char src; pos = (y + POSY) * 56 * 3 + (POSX * 3); bob = 75; /* 25 * 3 */ while (bob--) { src = bm.rgb_buf[pos]; if (!src) bm.rgb_buf[pos++] = *kitptr++; else bm.rgb_buf[pos++] = (blend * src + (256 - blend) * *kitptr++) >> 8; } } } #endif /* ENABLE_CPU */ #ifdef ENABLE_MEMSCREEN /* we hovered long enough to print some memory info */ if (memscreen_enabled && showmem) { unsigned char *ptr, *ptr2, src; ptr = bm.mem_buf; ptr2 = bm.rgb_buf; bob = 9408; /* 56 * 56 * 3 */ while (bob--) { src = *ptr2; *ptr2++ = (memblend * src + (256 - memblend) * *ptr++) >> 8; } } #endif /* ENABLE_MEMSCREEN */ #undef POSY #undef POSX } #endif #ifdef ENABLE_DUCK static void duck_set(int x, int y, int nr, int rev, int upsidedown) { int w, h; int rw; #ifdef UPSIDE_DOWN_DUCK int rh; #endif int pos; int dw, di, dh, ds; int cmap; /* index into duck colors */ #define _R(idx) ((int)duck_cmap[idx][0]) #define _G(idx) ((int)duck_cmap[idx][1]) #define _B(idx) ((int)duck_cmap[idx][2]) #define GETME(x, y, idx) ((int)duck_data[idx][y * 18 + x]) ds = 0; if (y < 0) ds = -(y); dh = 17; if ((y + 17) > 56) dh = 56 - y; dw = 18; if (x > 38) dw = 18 - (x - 38); di = 0; if (x < 0) di = -(x); for (h = ds; h < dh; h++) { /* calculate this only once */ int ypos = (h + y) * 56; #ifdef UPSIDE_DOWN_DUCK rh = (upsidedown && upside_down_duck_enabled) ? 17 - h : h; #endif for (w = di; w < dw; w++) { rw = (rev) ? 17 - w : w; #ifdef UPSIDE_DOWN_DUCK if ((cmap = GETME(rw, rh, nr)) != 0) { #else if ((cmap = GETME(rw, h, nr)) != 0) { #endif unsigned char r, g, b; pos = (ypos + w + x) * 3; r = _R(cmap); g = _G(cmap); b = _B(cmap); /* and now we'll blend the duck part that in water */ /* if we use integers here we speed up this function about * 40%. */ if (h + y < REALY(bm.waterlevels[w + x])) { bm.rgb_buf[pos++] = r; bm.rgb_buf[pos++] = g; bm.rgb_buf[pos] = b; } else { bm.rgb_buf[pos] = (DUCKBLEND * (int) bm.rgb_buf[pos] + (256 - DUCKBLEND) * (int) r) >> 8; bm.rgb_buf[pos + 1] = (DUCKBLEND * (int) bm.rgb_buf[pos + 1] + (256 - DUCKBLEND) * (int) g) >> 8; bm.rgb_buf[pos + 2] = (DUCKBLEND * (int) bm.rgb_buf[pos + 2] + (256 - DUCKBLEND) * (int) b) >> 8; } } } } #undef _R #undef _G #undef _B #undef GETME } static int animate_correctly(void) { /* returns the correct order of framenumber 0,1,2,1,0,1,2... instead of 0,1,2,0,1,2 <- this way the duck looks really ugly instead of keeping 2 counters we just made it longer */ static int outp[48] = { 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 1, 1, 1, 1 }; static int totalcounter = -1; if (++totalcounter > 47) totalcounter = 0; return outp[totalcounter]; } static void duck_swimmer(int posy) { static int tx = -19; static int rp; static int rev = 1; static int upsidedown = 0; #ifdef UPSIDE_DOWN_DUCK /* dive */ if (upside_down_duck_enabled) { if (upsidedown == 0 && posy < 2) upsidedown = 1; else if (upsidedown == 1 && posy > 5) /* jump out */ upsidedown = 0; if (upsidedown) posy += 10; } #endif if (rp++ < 10) { duck_set(tx, posy, animate_correctly(), rev, upsidedown); return; } rp = 0; if (!rev) { if (tx-- < -18) { tx = -18; rev = 1; } } else { if (tx++ > 57) { tx = 57; rev = 0; } } duck_set(tx, posy, animate_correctly(), rev, upsidedown); } #endif /* ENABLE_DUCK */ static void bubblemon_setup_samples(void) { int i; u_int64_t load = 0, total = 0; if (bm.load) { load = bm.load[bm.loadIndex]; free(bm.load); } if (bm.total) { total = bm.total[bm.loadIndex]; free(bm.total); } bm.loadIndex = 0; bm.load = malloc(bm.samples * sizeof(u_int64_t)); bm.total = malloc(bm.samples * sizeof(u_int64_t)); for (i = 0; i < bm.samples; i++) { bm.load[i] = load; bm.total[i] = total; } } static void bubblemon_setup_colors(void) { #define NUM_COLORS 99 int i, j, *col; int r_air_noswap, g_air_noswap, b_air_noswap; int r_liquid_noswap, g_liquid_noswap, b_liquid_noswap; int r_air_maxswap, g_air_maxswap, b_air_maxswap; int r_liquid_maxswap, g_liquid_maxswap, b_liquid_maxswap; int actual_colors = NUM_COLORS / 3; if (!bm.colors) bm.colors = malloc(NUM_COLORS * sizeof(int)); col = bm.colors; r_air_noswap = (bm.air_noswap >> 16) & 0xff; g_air_noswap = (bm.air_noswap >> 8) & 0xff; b_air_noswap = (bm.air_noswap) & 0xff; r_liquid_noswap = (bm.liquid_noswap >> 16) & 0xff; g_liquid_noswap = (bm.liquid_noswap >> 8) & 0xff; b_liquid_noswap = (bm.liquid_noswap) & 0xff; r_air_maxswap = (bm.air_maxswap >> 16) & 0xff; g_air_maxswap = (bm.air_maxswap >> 8) & 0xff; b_air_maxswap = (bm.air_maxswap) & 0xff; r_liquid_maxswap = (bm.liquid_maxswap >> 16) & 0xff; g_liquid_maxswap = (bm.liquid_maxswap >> 8) & 0xff; b_liquid_maxswap = (bm.liquid_maxswap) & 0xff; for (i = 0; i < actual_colors; i++) { int r, g, b; int r_composite, g_composite, b_composite; j = i >> 1; /* Liquid */ r = (r_liquid_maxswap * j + r_liquid_noswap * ((actual_colors - 1) - j)) / (actual_colors - 1); g = (g_liquid_maxswap * j + g_liquid_noswap * ((actual_colors - 1) - j)) / (actual_colors - 1); b = (b_liquid_maxswap * j + b_liquid_noswap * ((actual_colors - 1) - j)) / (actual_colors - 1); r_composite = r; g_composite = g; b_composite = b; col[(i * 3)] = (r << 16) | (g << 8) | b; /* Air */ r = (r_air_maxswap * j + r_air_noswap * ((actual_colors - 1) - j)) / (actual_colors - 1); g = (g_air_maxswap * j + g_air_noswap * ((actual_colors - 1) - j)) / (actual_colors - 1); b = (b_air_maxswap * j + b_air_noswap * ((actual_colors - 1) - j)) / (actual_colors - 1); r_composite += r; g_composite += g; b_composite += b; col[(i * 3) + 2] = (r << 16) | (g << 8) | b; /* Anti-alias */ r = r_composite >> 1; g = g_composite >> 1; b = b_composite >> 1; col[(i * 3) + 1] = (r << 16) | (g << 8) | b; } #undef NUM_COLORS } static void bubblemon_allocate_buffers(void) { int i; /* storage for bubbles */ bm.bubbles = (Bubble *) malloc(sizeof(Bubble) * bm.maxbubbles); /* Allocate (zeroed) bubble memory */ if (bm.bubblebuf) free(bm.bubblebuf); bm.bubblebuf = calloc(56 * 60, sizeof(char)); /* Allocate water level memory */ if (bm.waterlevels) free(bm.waterlevels); bm.waterlevels = malloc(56 * sizeof(int)); for (i = 0; i < 56; i++) { bm.waterlevels[i] = MAKEY(56); } /* Allocate water level velocity memory */ if (bm.waterlevels_dy) free(bm.waterlevels_dy); bm.waterlevels_dy = calloc(56, sizeof(int)); } static void get_memory_load_percentage(void) { /* system_memory() will return true on initial run so that we get * correct memory info, but may subsequently return 0 if memory * is not changing */ if (system_memory()) { /* new memory/swap data is in, calculate things */ bm.mem_percent = (100 * bm.mem_used) / bm.mem_max; if (bm.swap_max != 0) { bm.swap_percent = (100 * bm.swap_used) / bm.swap_max; } else { bm.swap_percent = 0; } } } /* ex:set ts=8: */ bfm-0.6.4/sys_freebsd.c0000644000175000017500000001214010100345427014655 0ustar josejose00000000000000/* BubbleMon dockapp 1.2 - FreeBSD specific code * Copyright (C) 2001, oleg dashevskii * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA. * */ #include #include #include #include #include #include #include #include #include #include #include #include #include "include/bubblemon.h" #include "include/sys_include.h" extern BubbleMonData bm; static kvm_t *kd = NULL; static struct nlist nlst[] = { {"_cp_time", 0}, {"_cnt", 0}, {"_bufspace", 0}, {0, 0} }; static int pageshift; #define pagetob(size) ((size) << pageshift) int init_stuff() { /* calculate page shift to convert pages into kilobytes */ int pagesize = getpagesize(); pageshift = 0; while (pagesize > 1) { pageshift++; pagesize >>= 1; } /* open kernel memory */ kd = kvm_open(NULL, NULL, NULL, O_RDONLY, "kvm_open"); if (kd == NULL) { puts("Could not open kernel virtual memory"); return 1; } kvm_nlist(kd, nlst); if (nlst[0].n_type == 0 || nlst[1].n_type == 0 || nlst[2].n_type == 0) { puts("Error extracting symbols"); return 2; } /* drop setgid & setuid (the latter should not be there really) */ seteuid(getuid()); setegid(getgid()); if (geteuid() != getuid() || getegid() != getgid()) { puts("Unable to drop privileges"); return 3; } return 0; } /* Returns the current CPU load in percent */ int system_cpu(void) { int loadPercentage; int previous_total, previous_load; int total, load; unsigned long int cpu_time[CPUSTATES]; int i; if (kvm_read(kd, nlst[0].n_value, &cpu_time, sizeof(cpu_time)) != sizeof(cpu_time)) return 0; load = cpu_time[CP_USER] + cpu_time[CP_SYS] + cpu_time[CP_NICE]; total = load + cpu_time[CP_IDLE]; i = bm.loadIndex; previous_load = bm.load[i]; previous_total = bm.total[i]; bm.load[i] = load; bm.total[i] = total; bm.loadIndex = (i + 1) % bm.samples; if (previous_total == 0) loadPercentage = 0; /* first time here */ else if (total == previous_total) loadPercentage = 100; else loadPercentage = (100 * (load - previous_load)) / (total - previous_total); return loadPercentage; } int system_memory(void) { u_int64_t my_mem_used, my_mem_max; u_int64_t my_swap_used, my_swap_max; struct vmmeter sum; int bufspace; static int swappgsin = -1; static int swappgsout = -1; static int swap_firsttime = 1; static int swapavail = 0, swapused = 0; static time_t last_time_swap = 0; time_t curr_time; if (kvm_read(kd, nlst[1].n_value, &sum, sizeof(sum)) != sizeof(sum)) return 0; /* _cnt */ if (kvm_read(kd, nlst[2].n_value, &bufspace, sizeof(bufspace)) != sizeof(bufspace)) return 0; /* _bufspace */ my_mem_max = pagetob((u_int64_t) sum.v_page_count); my_mem_used = pagetob((u_int64_t) sum.v_active_count); /* only calculate when first time or when changes took place */ /* do not call it more than 1 time per 2 seconds */ /* otherwise it can eat up to 50% of CPU time on heavy swap activity */ curr_time = time(NULL); if (swap_firsttime || (((sum.v_swappgsin > swappgsin) || (sum.v_swappgsout > swappgsout)) && curr_time > last_time_swap + 1)) { struct kvm_swap swap; int n; swapavail = 0; swapused = 0; n = kvm_getswapinfo(kd, &swap, 1, 0); if (n >= 0 && swap.ksw_total != 0) { swapavail = pagetob(swap.ksw_total); swapused = pagetob(swap.ksw_used); } swap_firsttime = 0; last_time_swap = curr_time; } my_swap_used = swapused; my_swap_max = swapavail; swappgsin = sum.v_swappgsin; swappgsout = sum.v_swappgsout; bm.mem_used = my_mem_used; bm.mem_max = my_mem_max; bm.swap_used = my_swap_used; bm.swap_max = my_swap_max; return 1; } #ifdef ENABLE_MEMSCREEN void system_loadavg(void) { static int avg_delay; if (avg_delay-- <= 0) { struct loadavg loadinfo; int i, mib[2]; size_t size; mib[0] = CTL_VM; mib[1] = VM_LOADAVG; size = sizeof (loadinfo); if (sysctl(mib, 2, &loadinfo, &size, NULL, 0) >= 0) for (i = 0; i < 3; i++) { bm.loadavg[i].i = loadinfo.ldavg[i] / loadinfo.fscale; bm.loadavg[i].f = ((loadinfo.ldavg[i] * 100 + loadinfo.fscale / 2) / loadinfo.fscale) % 100; } avg_delay = ROLLVALUE; } } #endif /* ENABLE_MEMSCREEN */ /* ex:set ts=8: */ bfm-0.6.4/sys_sunos.c0000644000175000017500000002033310100345427014415 0ustar josejose00000000000000/* BubbleMon dockapp 1.2 - SunOS specific code * Copyright 2001 Phil Lu * Copyright 2001 Dan Price * vim: ts=4 sw=4 * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA. * */ /* * This file is best viewed with tab stop set to 4 spaces ... * * For Nedit, from ~/.nedit: * nedit.tabDistance: 4 * For vi*, from ~/.exrc: * set ts=4 sw=4 */ #include #include #include #include #include #include #include #include #include #include #include "include/bubblemon.h" #include "include/sys_include.h" extern BubbleMonData bm; static kstat_ctl_t *kc = 0; static kstat_t **cpu_ksp_list = 0; static int ncpus = 0; static void GetMemoryStats(u_int64_t *pMemMax, u_int64_t *pMemFree); static void GetSwapStats(u_int64_t *pSwapTotal, u_int64_t *pSwapFree); static void GetCPULoadAverage(float *one_m, float *five_m, float *fift_m); static int dbg_print_mem = 0; /* from environment: DBG_PRINT_MEM=interval */ static int dbg_print_cpu = 0; /* from environment: DBG_PRINT_CPU=interval */ static int dbg_hardcode = 0; /* from environment: DBG_HARDCODE */ /* * setup_system() gets called to initialize everything specific to Solaris, * and when kstat_chain_update() indicates that the kernel's kstat chain has * altered. * * When that occurs, CPUs may have come on- or off-line, so we need to * rediscover the system cpus. */ void setup_system() { char *str = 0; kstat_t *ksp = 0; static int bootstrap = 1; int i = 0; if (bootstrap) { /* grab debugging flags from environment */ if ((str = getenv("DBG_PRINT_MEM"))) dbg_print_mem = atoi(str); if ((str = getenv("DBG_PRINT_CPU"))) dbg_print_cpu = atoi(str); if ((str = getenv("DBG_HARDCODE"))) dbg_hardcode = 1; if ((kc = kstat_open()) == NULL) { perror("can't open /dev/kstat"); exit(1); } bootstrap = 0; } /* * User selected to monitor all CPUs. First, count them. */ for (i = 0, ksp = kc->kc_chain; ksp; ksp = ksp->ks_next) { if (strcmp(ksp->ks_module, "cpu_stat") == 0) i++; } if (cpu_ksp_list) { free(cpu_ksp_list); } cpu_ksp_list = (kstat_t **) calloc(i * sizeof (kstat_t *), 1); ncpus = i; /* * stash the ksp for each CPU. */ for (i = 0, ksp = kc->kc_chain; ksp; ksp = ksp->ks_next) { if (strcmp(ksp->ks_module, "cpu_stat") == 0) { cpu_ksp_list[i] = ksp; i++; } } } /* returns current CPU load in percent, 0 to 100 */ int system_cpu(void) { static int previous_total = 0, previous_used = 0; int used = 0, idle = 0, total = 0, i = 0, t = 0; cpu_stat_t stat; if (dbg_hardcode) return 20; if (kc == NULL || kstat_chain_update(kc)) { setup_system(); } /* * Read each cpu's data. If the kstat chain has changed (a state change * has happened, maybe a new cpu was added to the system or one went * away), then reinitialize everything with setup_system(). Finally, * recursively call system_cpu() * * We'll need to do a little better than this in the future, since we * could recurse too much in the pathological case here. */ for (i = 0; i < ncpus; i++) { if (kstat_read(kc, cpu_ksp_list[i], (void *)&stat) == -1) { setup_system(); return (system_cpu()); } used += stat.cpu_sysinfo.cpu[CPU_USER]; /* user */ used += stat.cpu_sysinfo.cpu[CPU_KERNEL]; /* sys */ used += stat.cpu_sysinfo.cpu[CPU_WAIT]; /* wait */ idle += stat.cpu_sysinfo.cpu[CPU_IDLE]; /*idle ("free") */ } total = used + idle; t = 100 * (double)(used - previous_used) / (double)(total - previous_total); previous_total = total; previous_used = used; if (dbg_print_cpu) { static int i = 0; if (0 == (i % dbg_print_cpu)) { printf("system_cpu: %d%%, total=%d\n", t, total); printf("system_cpu: used=%d, idle=%d\n", used, idle); } i++; } return (t); } typedef struct TMyMem { u_int64_t lMemMax; u_int64_t lMemFree; u_int64_t lSwapMax; u_int64_t lSwapFree; } MyMem; int system_memory(void) { static MyMem last = { 100, 20, 200, 10, }; MyMem cur = { 100, 20, 200, 10, }; int rc = 0; if (dbg_hardcode) { bm.mem_max = 100; bm.mem_used = 20; bm.swap_max = 200; bm.swap_used = 0; return 1; } GetSwapStats(&cur.lSwapMax, &cur.lSwapFree); bm.swap_max = cur.lSwapMax; bm.swap_used = cur.lSwapMax - cur.lSwapFree; GetMemoryStats(&cur.lMemMax, &cur.lMemFree); bm.mem_max = cur.lMemMax + cur.lSwapMax; bm.mem_used = cur.lMemMax - cur.lMemFree + bm.swap_used; if (dbg_print_mem) { static int i = 0; if (0 == (i % dbg_print_mem)) { printf("system_memory: mem: max=%llu used=%llu\n", bm.mem_max, bm.mem_used); printf("system_memory: swap: max=%llu used=%llu\n", bm.swap_max, bm.swap_used); } i++; } /* if memory info changed - update things */ rc = (0 == memcmp(&last, &cur, sizeof(last)) ? 0 : 1); memcpy(&last, &cur, sizeof(last)); return rc; } #ifdef ENABLE_MEMSCREEN void system_loadavg(void) { static int avg_delay = 0; float one_m = 0, five_m = 0, fift_m = 0; if (dbg_hardcode) { bm.loadavg[0].i = 0; bm.loadavg[0].f = 53; /* 0.53 */ bm.loadavg[1].i = 0; bm.loadavg[1].f = 45; /* 0.45 */ bm.loadavg[2].i = 0; bm.loadavg[2].f = 38; /* 0.38 */ return; } if (avg_delay-- <= 0) { GetCPULoadAverage(&one_m, &five_m, &fift_m); if (dbg_print_cpu) { static int i = 0; if (0 == (i % dbg_print_cpu)) printf("loadavg: %0.2f %0.2f %0.2f\n", one_m, five_m, fift_m); i++; } bm.loadavg[0].i = floor(one_m); bm.loadavg[0].f = 100 * (one_m - floor(one_m)); bm.loadavg[1].i = floor(five_m); bm.loadavg[1].f = 100 * (five_m - floor(five_m)); bm.loadavg[2].i = floor(fift_m); bm.loadavg[2].f = 100 * (fift_m - floor(fift_m)); avg_delay = ROLLVALUE; } } #endif /* ENABLE_MEMSCREEN */ static void GetMemoryStats(u_int64_t *pMemMax, u_int64_t *pMemFree) { uint_t lPagesToBytesMult = sysconf(_SC_PAGESIZE); *pMemMax = (uint64_t)sysconf(_SC_PHYS_PAGES) * lPagesToBytesMult; *pMemFree = (uint64_t)sysconf(_SC_AVPHYS_PAGES) * lPagesToBytesMult; if (dbg_print_mem) { static int i = 0; if (0 == (i % dbg_print_mem)) { printf("GetMemoryStats: pMemMax=%llu Bytes\n", *pMemMax); printf("GetMemoryStats: pMemFree=%llu Bytes\n", *pMemFree); } i++; } } static void GetSwapStats(u_int64_t *pSwapTotal, u_int64_t *pSwapFree) { struct anoninfo anon; uint_t lPagesToBytesMult = sysconf(_SC_PAGESIZE); if (swapctl(SC_AINFO, &anon) == -1) { perror("swapctl failed"); /* let's not blow up code by setting stuff to 0 :) */ *pSwapTotal = *pSwapFree = 1; return; } *pSwapTotal = lPagesToBytesMult * (anon.ani_max); *pSwapFree = lPagesToBytesMult * (anon.ani_max - anon.ani_resv); if (dbg_print_mem) { static int i = 0; if (0 == (i % dbg_print_mem)) { (void) printf("GetSwapStats: pSwapMax=%llu Bytes\n", *pSwapTotal); (void) printf("GetSwapStats: pSwapFree=%llu Bytes\n", *pSwapFree); } i++; } } /* * we'd prefer to use getloadavg(3C) but it wasn't present in Solaris until * sunos 5.7. (sigh) */ static void GetCPULoadAverage(float *one_m, float *five_m, float *fift_m) { kstat_named_t *kn = 0; kstat_t *ks = 0; if (kc == NULL || kstat_chain_update(kc)) { setup_system(); } ks = kstat_lookup(kc, "unix", 0, "system_misc"); if (kstat_read(kc, ks, 0) == -1) { perror("kstat_read"); exit(1); } /* * Get the 1, 5 and 15min load average. */ kn = kstat_data_lookup(ks, "avenrun_1min"); *one_m = kn->value.ul / (ncpus * 256.0); kn = kstat_data_lookup(ks, "avenrun_5min"); *five_m = kn->value.ul / (ncpus * 256.0); kn = kstat_data_lookup(ks, "avenrun_15min"); *fift_m = kn->value.ul / (ncpus * 256.0); } bfm-0.6.4/ChangeLog0000644000175000017500000000637710100350163013763 0ustar josejose000000000000002003-07-24 03:57 Peter Palfrader * : Move setting hints a bit down, as suggested in wmfire's bug report #250937 (closes: #251507). See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=250937 and http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=251507 * : Restore default of using eth0 with 'fish show network traffic'. (closes: #241284). One of the recent versions changed that to ppp0! See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=241284 * : Allow an optional value for -n to specify the network interface. (closes: #159782). See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=159782 2003-07-24 03:53 James Rowe * : Merged the debian patch. Basically just changes a default option in the Makefile and replaces the debian/ structure. A small attempt to make importing patches much easier(as they seem to be coming from Debian users a lot ;) 2004-07-24 03:38 Miguel Bazdresch * : Stop the waterlevel memory monitor including cached memory in the total. [Linux ONLY] 2003-11-05 05:03 James Rowe * : Pull the NET_DEVICE variable in to the config section of the Makefile. (suggestion from too many people to mention.) * : Fixes to all "-Wall" warnings. * : Fixed typo in PLUGIN_URL. * : Wow, so not only are there still C compilers out there that don't accept C++ style '//' comments, but there are people who use such compilers out there too. In all seriousness though, thanks to Teijo for finding such a system just to send a bug report :P 2003-11-04 01:48 Bill Wilson * : Adds a spin button and code so there can be a bubblefishymon update interval independent of gkrellm builtin updates. I arbitrarily set to allow 10 - 50 updates per second. * : Put a callback on the prog_entry so that the apply_config function can be eliminated. This totally converts the plugin to an instant apply config and it becomes the first plugin I know of that achieves this status! You'll notice there are no longer the "Apply" and "Close" buttons appearing when the bubblefishymon config page is up. 2003-11-02 16:37 James Rowe * : Applied patch from Huw Giddens to fix the memory usage routines for 2.6 kernels that still works for 2.4 kernels. It is now possible to use the same binary with different kernels. * : Import of debian packaging dir, again from Huw Giddens. Probably requires some fixing by someone with a Debian box, because some of the Makefile changes have not been applied. [ PREFIX and "all" target]. And the "install" target changes have been taken under some duress. 2003-10-08 11:36 James Rowe * : Applied the gkrellm2 support patch from Debian's package, by Sjoerd Simons . * : Includes and installs the debian packages' manpage. * : Hacked in Linux 2.6 mem support from the bubblemon-dockapp-1.41 release. Reads version from linux's version.h and builds accordingly. * : Hacked in OpenBSD compile time support from the bubblemon-dockapp-1.4 release. * : Made GTK2 builds the default for both bubblefishymon and gkrellm. * : Bumped revision to 0.6.0 from the original 0.5.1 release on http://pigeond.net/bfm/. bfm-0.6.4/doc/0000755000175000017500000000000010100350424012741 5ustar josejose00000000000000bfm-0.6.4/doc/Xdefaults.sample0000644000175000017500000000050610100345430016105 0ustar josejose00000000000000! BubbleMon settings ! vim: syntax=xdefaults bubblemon.maxbubbles: 100 bubblemon.air_noswap: #2299FF bubblemon.air_maxswap: #FF0000 bubblemon.liquid_noswap: #0055FF bubblemon.liquid_maxswap: #AA0000 bubblemon.ripples: 0.2 bubblemon.gravity: 0.01 bubblemon.volatility: 1.0 bubblemon.viscosity: 0.98 bubblemon.speed_limit: 1.0 bfm-0.6.4/doc/bubblefishymon.10000644000175000017500000000473610100345430016046 0ustar josejose00000000000000.\" Hey, EMACS: -*- nroff -*- .\" First parameter, NAME, should be all caps .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection .\" other parameters are allowed: see man(7), man(1) .TH BUBBLEFISHYMON 1 "September 6, 2002" .\" Please adjust this date whenever revising the manpage. .\" .\" Some roff macros, for reference: .\" .nh disable hyphenation .\" .hy enable hyphenation .\" .ad l left justify .\" .ad b justify to both left and right margins .\" .nf disable filling .\" .fi enable filling .\" .br insert line break .\" .sp insert n+1 empty lines .\" for manpage-specific macros, see man(7) .SH NAME bubblefishymon \- system load meter with ducks and fish .SH SYNOPSIS .B bubblefishymon .RI [ options ] " " [ program ] " " [ program ] .br .SH DESCRIPTION This manual page documents briefly the .B bubblefishymon command. This manual page was written for the Debian distribution because the original program does not have a manual page. .PP .B bubblefishymon is a dockapp-style system monitor for CPU, memory, swap, load average and network traffic. Based on wmfishtime(1) and bubblemon, this program has been considerably improved over the parent code. .PP The higher the water level, the more memory is in use. The more profuse the bubbles, the higher the CPU usage. Fish represent network traffic direction and speed. .PP When the mouse is moved into the window, the display will change to chow the load history, or, if the right Shift key is held, the current memory usage. If you press the right mouse button, the window will freeze in that state until you move the mouse out then back into the window. .PP .B program1 and .B program2 are the programs to spawn when either the left or middle mouse buttons are pressed, respectively. .SH OPTIONS .TP .B \-d disable swimming duck. .TP .B \-f disable fish. .TP .B \-c disable CPU meter. .TP .B \-m disable memory screen. .TP .B \-p use alternate colour scheme in memory info screen. .TP .B \-k display memory and swap statistics in megabytes. .TP .B \-h display help. .SH SEE ALSO .BR wmbubble(1) .BR bubblemon-gnome1(1) .SH AUTHOR This manual page was taken and adapted from wmbubble by Gurkan Sengun , and modified for the Debian system by Jamie Wilkinson . The original manual page for wmbubble was written by John H. Robinson, IV for the for the Debian GNU/Linux system (but may be used by others). bfm-0.6.4/doc/COPYING0000644000175000017500000000014510100345430013775 0ustar josejose00000000000000#include On a Debian system, you can find the GPL license in /usr/share/common-licenses/GPL bfm-0.6.4/README0000644000175000017500000000112510100345427013062 0ustar josejose00000000000000 BubbleFishyMon with gkrellm support Type 'make' or 'make bubblefishymon' to build bubblefishymon Type 'make bubblefishymon1' to build bubblefishymon for gtk1 Type 'make gkrellm' to build gkrellm-bfm.so for gkrellm2 Type 'make gkrellm1' to build gkrellm-bfm.so for gkrellm TODO - Any way to fix the update speed? Gkrellm maximum update is 10 per second. - Someone tests/does the FreeBSD and SunOS platform? - Possible/Make more sense, to make a gkrellm swallow plugin? (Quick search on google: http://www.moongroup.com/archives/xfce-dev/2001-06/msg00076.html) Pigeon. pigeon@pigeond.net bfm-0.6.4/SUPPORTED_SYSTEMS0000644000175000017500000000015210100345430014732 0ustar josejose00000000000000Linux - timecop@japan.co.jp FreeBSD - od@iclub.nsu.ru Solaris/SunOS - wplu13@netscape.net, dp@rampant.org bfm-0.6.4/README.bubblemon0000644000175000017500000001654310100345430015032 0ustar josejose00000000000000For copyright/authors/contributors see top of bubblemon.c. For list of supported operating systems, see SUPPORTED_SYSTEMS. Abstract: This program is a dockapp-style CPU, memory, swap and load average monitor. Based on the GNOME BubbleMon applet, this program has been considerably improved. Many new features have been added. This is version 1.3. Features: On the surface, dockapp BubbleMon follows the same style as original GNOME applet. Main screen area is split into 2 parts - air and water. Water level depends on how much physical and virtual memory is used by the system. CPU activity makes water "boil" and creates bubbles. CPU meter near the bottom shows actual value in percent. As memory usage increases, water level goes up. When system runs out of physical memory and begins using swap, both water and air colors change depending on amount of swap used. There is a cute yellow duck swimming from one corner of the dockapp to another. The duck really doesn't do anything at the moment, but in a future version it's speed might correspond to system load average or another variable. This is the "main" mode of BubbleMon. There are 2 additional screens available - memory and load average. Load average screen is accessed by simply hovering the mouse pointer over BubbleMon window. Memory screen is accessed same way, except you must hold down either left or right "Shift" key before moving the mouse pointer over BubbleMon window. Both Memory and Load average screens fade in slowly for a reason - during fade, you can click "Right" mouse button to lock currently fading screen. This way you can see both CPU load screen and either memory or load average screen. To exit "locked" mode, simply move the mouse pointer in and out of the BubbleMon window. Memory screen displays current amount of free memory and swap, in kilobytes and percent. Top number is amount of used memory, in kilobytes and percent, and bottom number is amount of used swap. Under Linux implementation, used swap is set to "0" until 100% of system memory is used. Below these numbers is a graph of recent memory use. Unless you are running something that dynamically allocates and deallocates huge amounts of memory, this graph is most likely going to be more or less a straight line. Percentage and kilobyte counters will change color in case of memory or swap use over 90%. Load average screen displays system load average, same way as presented by "uptime" command. Approximately last 3 minutes of system load are graphed below the load average numbers. Default "light blue" color of load average and memory screens can be changed to a "pale" version by using "-p" command line switch. You can start BubbleMon with up to 2 command-line argumens (not counting switches), each being a path to a program or shell script to execute when you click Left or Middle mouse button inside BubbleMon window. These must be the last 2 parameters. There is a .wav file and a simple shell script to play it, inside misc/ directory, which you can use to make some duck sounds with bubblemon. Configuration: BubbleMon is very configurable. Previous section explains many features, but all of them can be disabled, either through compile-time settings or with command-line switches at startup. Either the general Makefile or FreeBSD- specific Makefile contain compilation defines near the top. You can comment out a particular line, to disable that feature. Alternatively, you can run "bubblemon -h" for a list of command line options. This will show command-line switches which can be used to disable certain BubbleMon modes, and modify color scheme used in memory and load average screens. You can also change colors of the air, water, various physics constants which control bubble generation, and maximum number of bubbles to make. All of these settings are read on start-up from the user's HOME directory, using .Xdefaults file. If you don't have a .Xdefaults file in your home directory, you can copy Xdefaults.sample which is distributed with BubbleMon. If you already have some settings in .Xdefaults you can simply append BubbleMon settings file to your current configuration: hostname:~$ cat /path/to/bubblemon-src/Xdefaults.sample >> ~/.Xdefaults However if you are happy with the current color scheme or bubble physics, you don't need to do anything at all, because BubbleMon has default settings compiled in. Information about original GNOME BubbleMon applet: You can get the original BubbleMon applet from http://www.nada.kth.se/~d92-jwa/code - but that version requires GNOME, does not have a cute duck, uses more CPU, and doesn't allow you to start programs by clicking on it. But, I guess if you like GNOME, you might want to check it out. Programming details: It's been a long tradition that dockapps use Xlib to draw, mainly because that's what the first dockapp used and because there are some abstraction layers to hide some of Xlib ugliness (libdockapp, wmgeneral, etc). Xlib is fine if all you do is change a couple pixels every other second, like most dockapps do. But if you deal with 3D, or any kind of large amount of pixel shuffling, Xlib really starts to suck. Common mistake when doing lots of pixel shuffling in Xlib is using XPutPixel or XCopyArea. Say, you got a 56x56 dockapp, and 80% of it is changed every 10ms. That's almost 2.5 thousand pixel ops. And a 1x1 XCopyArea takes as much server overhead as a 64x64 XCopyArea. Since X11 sucks, each one of these puts a request in the server queue and will waste ungodly amounts of bandwidth (if you run a remote X session) and use CPU time on the server machine. X11 really doesn't provide any simple way to deal with drawing stuff on screen without messing with colormaps or other serious ugliness. If you are familiar with game programming and that kind of stuff, you know that screen is usually drawn on a back buffer and then switched, so the user sees smooth animation instead of watching the screen redraw. X11 doesn't really have this feature, because even drawing to a off-screen pixmap is still slow - and requires contacting the server, and still requires dealing with colormaps. Solution is simple. GDK. Gimp Drawing toolKit. And a large buffer to draw in. Render your screen on the "back buffer", which is completely in memory and thus doesn't need to contact the server, and then use gdk_draw_rgb_image to quicky slap that on-screen. That's about the only GDK function you will ever need to use. Results are impressive - very complex scenes could be rendered in local memory, fast, and the only network I/O generated is from copying backbuffer to the screen, which is minimal compared to updating the same screen pixel by pixel. Since bubblemon does a lot of pixel shuffling, it uses this technique to draw. Thanks to gdkrgb, BubbleMon achieves fluid animation at 33 frames per second. Some window managers, like BlackBox, don't require dockapps to draw on the main window, only on the icon window. You can run make with "make WMAN=-DBLACKBOX" to remove code dealing with drawing on main window, for a marginal performance improvement, though it's very unlikely you will notice the difference unless you are profiling. timecop@japan.co.jp Notes from the FreeBSD port author: For FreeBSD, the percentage of used memory is calculated as number_of_active_pages / total_number_of_pages_in_the_system * 100%. If you have any concerns regarding this or FreeBSD port of BubbleMon in general, please email oleg dashevskii . bfm-0.6.4/COPYING0000644000175000017500000004311010100345430013227 0ustar josejose00000000000000 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. bfm-0.6.4/sys_openbsd.c0000644000175000017500000000641110100345430014673 0ustar josejose00000000000000/* BubbleMon dockapp 1.2 - OpenBSD specific code * Copyright (C) 2001, Peter Stromberg * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA. * */ #include #include #include #include #include #include #include #include #include #include "include/bubblemon.h" #include "include/sys_include.h" extern BubbleMonData bm; /* Returns the current CPU load in percent */ int system_cpu(void) { int loadPercentage; int previous_total, previous_load; int total, load; long cpu_time[CPUSTATES]; int i; int mib[2]; size_t size; mib[0] = CTL_KERN; mib[1] = KERN_CPTIME; size = sizeof (cpu_time); if (sysctl(mib, 2, &cpu_time, &size, NULL, 0) < 0) return 0; load = cpu_time[CP_USER] + cpu_time[CP_SYS] + cpu_time[CP_NICE]; total = load + cpu_time[CP_IDLE]; i = bm.loadIndex; previous_load = bm.load[i]; previous_total = bm.total[i]; bm.load[i] = load; bm.total[i] = total; bm.loadIndex = (i + 1) % bm.samples; if (previous_total == 0) loadPercentage = 0; /* first time here */ else if (total == previous_total) loadPercentage = 100; else loadPercentage = (100 * (load - previous_load)) / (total - previous_total); return loadPercentage; } int system_memory(void) { #define pagetob(size) ((size) << (uvmexp.pageshift)) struct uvmexp uvmexp; int nswap, rnswap, i; int mib[] = { CTL_VM, VM_UVMEXP }; size_t size = sizeof (uvmexp); if (sysctl(mib, 2, &uvmexp, &size, NULL, 0) < 0) return 0; bm.mem_used = pagetob(uvmexp.active); bm.mem_max = pagetob(uvmexp.npages); bm.swap_used = 0; bm.swap_max = 0; if ((nswap = swapctl(SWAP_NSWAP, 0, 0)) != 0) { struct swapent *swdev = malloc(nswap * sizeof(*swdev)); if((rnswap = swapctl(SWAP_STATS, swdev, nswap)) != nswap) { for (i = 0; i < nswap; i++) { if (swdev[i].se_flags & SWF_ENABLE) { bm.swap_used += (swdev[i].se_inuse / (1024 / DEV_BSIZE)); bm.swap_max += (swdev[i].se_nblks / (1024 / DEV_BSIZE)); } } } free(swdev); } return 1; } #ifdef ENABLE_MEMSCREEN void system_loadavg(void) { static int avg_delay; if (avg_delay-- <= 0) { struct loadavg loadinfo; int i; int mib[] = { CTL_VM, VM_LOADAVG }; size_t size = sizeof (loadinfo); if (sysctl(mib, 2, &loadinfo, &size, NULL, 0) >= 0) for (i = 0; i < 3; i++) { bm.loadavg[i].i = loadinfo.ldavg[i] / loadinfo.fscale; bm.loadavg[i].f = ((loadinfo.ldavg[i] * 100 + loadinfo.fscale / 2) / loadinfo.fscale) % 100; } avg_delay = ROLLVALUE; } } #endif /* ENABLE_MEMSCREEN */ /* ex:set sw=4 ts=4: */ bfm-0.6.4/sys_linux.c0000644000175000017500000001636610100347713014420 0ustar josejose00000000000000/* BubbleMon dockapp 1.2 - Linux specific code * Copyright 2000, 2001 timecop@japan.co.jp * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA. * */ /* Huw Giddens 2003-10-27: Changed system_memory() so that it reports memory * correctly on Linux 2.6 systems. Also works on 2.4 systems without * recompile. Based on a patch by Marcelo E Magallon , * see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=175140 */ #include #include #include "include/bubblemon.h" #include "include/sys_include.h" extern BubbleMonData bm; /* returns current CPU load in percent, 0 to 100 */ int system_cpu(void) { unsigned int cpuload; u_int64_t load, total, oload, ototal; u_int64_t ab, ac, ad, ae; int i; FILE *stat; stat = fopen("/proc/stat", "r"); fscanf(stat, "%*s %Ld %Ld %Ld %Ld", &ab, &ac, &ad, &ae); fclose(stat); /* Find out the CPU load */ /* user + sys = load * total = total */ load = ab + ac + ad; /* cpu.user + cpu.sys; */ total = ab + ac + ad + ae; /* cpu.total; */ /* "i" is an index into a load history */ i = bm.loadIndex; oload = bm.load[i]; ototal = bm.total[i]; bm.load[i] = load; bm.total[i] = total; bm.loadIndex = (i + 1) % bm.samples; /* Because the load returned from libgtop is a value accumulated over time, and not the current load, the current load percentage is calculated as the extra amount of work that has been performed since the last sample. yah, right, what the fuck does that mean? */ if (ototal == 0) /* ototal == 0 means that this is the first time we get here */ cpuload = 0; else if ((total - ototal) <= 0) cpuload = 100; else cpuload = (100 * (load - oload)) / (total - ototal); return cpuload; } int system_memory(void) { u_int64_t mem_used, mem_max, swap_used, swap_max; u_int64_t value, mem_cache, mem_buffers, swap_cache; static int delay = 0; FILE *mem; char name[256]; char line[256]; if (delay-- <= 0) { mem = fopen("/proc/meminfo", "r"); if (mem == NULL) return 0; while (!feof(mem)) { if (fgets(line, 256, mem) == NULL) break; if (sscanf(line, "%s %Ld", name, &value) != 2) continue; /* Before I calculate mem_used, I store MemFree in the mem_used * variable. The same with swap_used/SwapFree */ if (strcmp(name, "MemTotal:") == 0) mem_max = value; else if (strcmp(name, "Cached:") == 0) mem_cache = value; else if (strcmp(name, "Buffers:") == 0) mem_buffers = value; else if (strcmp(name, "MemFree:") == 0) mem_used = value; else if (strcmp(name, "SwapTotal:") == 0) swap_max = value; else if (strcmp(name, "SwapFree:") == 0) swap_used = value; else if (strcmp(name, "SwapCached:") == 0) swap_cache = value; } fclose(mem); mem_used = mem_max - ( mem_used + mem_cache + mem_buffers ); if( mem_used > mem_max ) mem_used = mem_max; swap_used = swap_max - swap_used; /* proc reports usage in kb, bm wants it in bytes. */ bm.mem_used = 1024 * mem_used; bm.mem_max = 1024 * mem_max; bm.swap_used = 1024 * swap_used; bm.swap_max = 1024 * swap_max; return 1; /* update */ } return 0; /* nothing changed, don't update */ } #ifdef ENABLE_MEMSCREEN void system_loadavg(void) { FILE *avg; static int avg_delay; if (avg_delay-- <= 0) { avg = fopen("/proc/loadavg", "r"); fscanf(avg, "%d.%d %d.%d %d.%d", &bm.loadavg[0].i, &bm.loadavg[0].f, &bm.loadavg[1].i, &bm.loadavg[1].f, &bm.loadavg[2].i, &bm.loadavg[2].f); fclose(avg); avg_delay = ROLLVALUE; } } #endif /* ENABLE_MEMSCREEN */ #ifdef ENABLE_FISH #define FISH_MAX_SPEED 8 #define DIFF_MIN 10 /* The actual speed for the fish... */ int tx_speed; int rx_speed; u_int64_t tx_amount; u_int64_t rx_amount; /* Store the last one to compare */ u_int64_t last_tx_amount; u_int64_t last_rx_amount; /* Store the max for scaling, too. */ u_int64_t max_tx_diff = DIFF_MIN; u_int64_t max_rx_diff = DIFF_MIN; /* The cnt for scaling */ int tx_cnt; int rx_cnt; int delay; extern int fish_traffic; extern char *network_interface; void get_traffic(void); int net_tx_speed(void) { get_traffic(); return tx_speed; } int net_rx_speed(void) { get_traffic(); return rx_speed; } void get_traffic(void) { FILE *dev; char buffer[256]; u_int64_t diff; /* Have some delay in updating/sampling traffic... */ if(delay++ < 5) { return; } else { delay = 0; } if((dev = fopen("/proc/net/dev", "r")) == NULL) { /* Sanity check */ fish_traffic = 0; } else { /* Don't care about the first 2 lines */ fgets(buffer, 256, dev); fgets(buffer, 256, dev); while(fgets(buffer, 256, dev)) { char name[256]; /* I love sscanf! :) */ sscanf(buffer, "%*[ ]%[^:]:%*d %Ld %*d %*d %*d %*d %*d %*d %*d %Ld %*d %*d %*d %*d %*d %*d", name, &rx_amount, &tx_amount); if(!strcmp(name, network_interface)) { /* Incoming traffic */ if(rx_amount != last_rx_amount) { if(last_rx_amount == 0) { last_rx_amount = rx_amount; } diff = rx_amount - last_rx_amount; last_rx_amount = rx_amount; rx_speed = FISH_MAX_SPEED * diff / max_rx_diff; if(rx_speed == 0) { /* At least, make it move a bit, cos we know there's traffic */ rx_speed = 1; } /* Do something to max rate, to do proper (hopefully) scaling */ if(max_rx_diff < diff) { max_rx_diff = diff; } else { /* Slowly lower the scale */ if(++rx_cnt > 5) { max_rx_diff = diff; if(max_rx_diff < DIFF_MIN) { /* And don't scale it too low */ max_rx_diff = DIFF_MIN; } rx_cnt = 0; } } } else { rx_speed = 0; } /* Outgoing traffic */ if(tx_amount != last_tx_amount) { if(last_tx_amount == 0) { last_tx_amount = tx_amount; } diff = tx_amount - last_tx_amount; last_tx_amount = tx_amount; tx_speed= FISH_MAX_SPEED * diff / max_tx_diff; if(tx_speed == 0) { /* At least, make it move a bit, cos we know there's traffic */ tx_speed = 1; } /* Do something to max rate, to do proper (hopefully) scaling */ if(max_tx_diff < diff) { max_tx_diff = diff; } else { /* Slowly lower the scale */ if(++tx_cnt > 5) { max_tx_diff = diff; if(max_tx_diff < DIFF_MIN) { /* And don't scale it too low */ max_tx_diff = DIFF_MIN; } tx_cnt = 0; } } } else { tx_speed = 0; } } } } fclose(dev); } #endif bfm-0.6.4/Makefile0000644000175000017500000000736510100347713013656 0ustar josejose00000000000000# BubbleFishyMon with gkrellm support # Type 'make' or 'make bubblefishymon' to build bubblefishymon # Type 'make bubblefishymon1' to build bubblefishymon for gtk1 # Type 'make gkrellm' to build gkrellm-bfm.so for gkrellm2 # Type 'make gkrellm1' to build gkrellm-bfm.so for gkrellm # where to install this program PREFIX ?= /usr/local # bubblemon configuration EXTRA = -DENABLE_DUCK EXTRA += -DENABLE_CPU EXTRA += -DENABLE_MEMSCREEN EXTRA += -DENABLE_FISH EXTRA += -DENABLE_TIME EXTRA += -DUPSIDE_DOWN_DUCK # EXTRA += -DKDE_DOCKAPP # If building for Linux define the network device to monitor. NET_DEVICE = eth0 ############################################################################### # no user serviceable parts below # ############################################################################### EXTRA += $(WMAN) # gtk cflags and gtk lib flags GTK_CFLAGS = $(shell gtk-config --cflags) GTK_LIBS = $(shell gtk-config --libs) GTK2_CFLAGS = $(shell pkg-config gtk+-2.0 --cflags) GTK2_LIBS = $(shell pkg-config gtk+-2.0 --libs) # optimization cflags #CFLAGS = -O3 -Wall ${EXTRA} CFLAGS = ${EXTRA} # profiling cflags # CFLAGS = -ansi -Wall -pg -O3 ${EXTRA} -DPRO # test coverage cflags # CFLAGS = -fprofile-arcs -ftest-coverage -Wall -ansi -g ${EXTRA} -DPRO SHELL = sh OS = $(shell uname -s) SRCS = fishmon.c bubblemon.c OBJS = fishmon.o bubblemon.o BUBBLEFISHYMON = bubblefishymon # Some stuffs for building gkrellm-bfm GKRELLM_SRCS = gkrellm-bfm.c GKRELLM_OBJS = gkrellm-bfm.o GKRELLM_BFM = gkrellm-bfm.so LDFLAGS = -shared -Wl STRIP = strip CC = gcc INSTALLMAN = -m 644 # special things for Linux ifeq ($(OS), Linux) ifeq "$(NET_DEVICE)" "" CFLAGS+=-DNET_DEVICE=\"eth0\" else CFLAGS+=-DNET_DEVICE=\"$(NET_DEVICE)\" endif SRCS += sys_linux.c OBJS += sys_linux.o INSTALL = -m 755 INSTALLMAN = -m 644 endif # special things for FreeBSD ifeq ($(OS), FreeBSD) SRCS += sys_freebsd.c OBJS += sys_freebsd.o LIBS = -lkvm INSTALL = -c -g kmem -m 2755 -o root endif # special things for OpenBSD ifeq ($(OS), OpenBSD) OBJS += sys_openbsd.o LIBS = `gtk-config --libs | sed "s/-lgtk//g"` endif #special things for SunOS ifeq ($(OS), SunOS) # try to detect if gcc is available (also works if you call gmake CC=cc to # select the sun compilers on a system with both) COMPILER=$(shell \ if [ `$(CC) -v 2>&1 | egrep -c '(gcc|egcs|g\+\+)'` = 0 ]; then \ echo suncc; else echo gcc; fi) # if not, fix up CC and the CFLAGS for the Sun compiler ifeq ($(COMPILER), suncc) CC=cc CFLAGS=-v -xO3 endif ifeq ($(COMPILER), gcc) CFLAGS=-O3 -Wall endif CFLAGS += ${EXTRA} SRCS += sys_sunos.c OBJS += sys_sunos.o LIBS = -lkstat -lm INSTALL = -m 755 endif all: $(BUBBLEFISHYMON) gkrellm: clean_obj $(CC) -DGKRELLM2 -DGKRELLM_BFM -fPIC $(GTK2_CFLAGS) $(CFLAGS) -c $(SRCS) \ $(GKRELLM_SRCS) $(CC) $(GTK2_LIBS) $(LDFLAGS) -o $(GKRELLM_BFM) $(OBJS) $(GKRELLM_OBJS) $(STRIP) $(GKRELLM_BFM) gkrellm1: clean_obj $(CC) -DGKRELLM_BFM -fPIC $(GTK_CFLAGS) $(CFLAGS) -c $(SRCS) \ $(GKRELLM_SRCS) $(CC) $(GTK_LIBS) $(LDFLAGS) -o $(GKRELLM_BFM) $(OBJS) $(GKRELLM_OBJS) $(STRIP) $(GKRELLM_BFM) bubblefishymon: clean_obj $(CC) $(GTK2_CFLAGS) $(CFLAGS) -o $(BUBBLEFISHYMON) \ $(LIBS) $(GTK2_LIBS) $(SRCS) $(STRIP) $(BUBBLEFISHYMON) bubblefishymon1: clean_obj $(CC) $(GTK_CFLAGS) $(CFLAGS) -o $(BUBBLEFISHYMON) \ $(LIBS) $(GTK_LIBS) $(SRCS) $(STRIP) $(BUBBLEFISHYMON) clean_obj: rm -rf *.o clean: rm -f bubblefishymon *.o *.bb* *.gcov gmon.* *.da *~ *.so install: install -d $(DESTDIR)/$(PREFIX)/bin $(DESTDIR)/$(PREFIX)/share/man/man1 install $(INSTALL) $(BUBBLEFISHYMON) $(DESTDIR)/$(PREFIX)/bin install $(INSTALL_MAN) doc/bubblefishymon.1 $(DESTDIR)/$(PREFIX)/share/man/man1