Check-in [6fa6394179]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview

SHA1 Hash:6fa6394179cc95419547169985fcd821b63ba97a
Date: 2012-03-02 11:33:06
User: BarryK
Comment:noryb009: woof support/find_cat source rewritten in C, x4 faster than Genie version

Tags And Properties
Changes

Changes to woof-arch/x86/build/support/find_cat

cannot compute difference between binary files

Changes to woof-code/boot/initrd-tree0/init

@@ -1473,11 +1473,13 @@
 echo '#complete set of modules in the initrd (moved to main f.s.)...' >> /pup_rw/etc/rc.d/PUPSTATE
 echo "ZDRVINIT='$ZDRVINIT'" >> /pup_rw/etc/rc.d/PUPSTATE #v4.02
 echo '#Partition no. override on boot drive to which session is (or will be) saved...' >> /pup_rw/etc/rc.d/PUPSTATE
 echo "PSAVEMARK='$PSAVEMARK'" >> /pup_rw/etc/rc.d/PUPSTATE
 if [ "$PLANG" ];then #120215 L18L. 120217 bring this back, seems like a good thing!
- echo "OUTPUT_CHARSET=UTF-8
+ echo "#PLANG is written to LANG in /etc/profile by init script initrd...
+PLANG=${PLANG}
+OUTPUT_CHARSET=UTF-8
 export OUTPUT_CHARSET" >> /pup_rw/etc/rc.d/PUPSTATE
 fi
 echo "PSUBDIR='${zPSUBDIR}'" >> /pup_rw/etc/rc.d/PUPSTATE #120215
 
 #older ${DISTRO_FILE_PREFIX}save.2fs <v2.16 will not have this file...

Changes to woof-code/rootfs-skeleton/etc/rc.d/rc.sysinit

@@ -67,10 +67,11 @@
 #110823 mavrothal: Check if it is an OLPC XO and add the devices.
 #120124 tracing problem of b43 firmware not loading, peebee posted udev trace, determined ssb uevent replay missing, found test for <2.6.24 kernel broken for 3.x.
 #120216 slight mods to make sss translation easy (see /usr/share/sss/script_strings).
 #120217 improvement for full hd install, non-english.
 #120301 need to load console font earlier.
+#120301 a problem if initrd has kernel default font, switching here changes all o/p from initrd to partial garbage.
 
 #unset TZ #100319 busybox hwclock gives priority to this (rather than /etc/localtime) and 'init' has set it wrong.
 #...comment-out for now. note, TZ now set in rc.country.
 ORIGLANG="`grep '^LANG=' /etc/profile | cut -f 2 -d '=' | cut -f 1 -d ' '`" #120217
 ORIGLANG1="${ORIGLANG%_*}" #ex: en
@@ -128,10 +129,16 @@
 PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/X11R7/bin
 [ $loglevel ] && LOGLEVEL=$loglevel #boot param.
 [ $pmedia ] && PMEDIA=$pmedia #boot parameter, broad category of boot media. ex: cd.
 [ $pdev1 ] && PDEV1=$pdev1    #boot parameter, partition have booted off. ex: hda3
 
+#120301 a problem if initrd has kernel default font, switching here changes all o/p from initrd to partial garbage.
+#workaround, clear the screen...
+if [ -d /initrd ];then
+ PLANG=`grep '^PLANG=' /etc/rc.d/PUPSTATE | cut -f 2 -d '='`
+ [ "${PLANG%_*}" != "en" ] && clear
+fi
 load_consolefont #120301 if this was done in initrd then it would carry through, and this would not be needed.
 #...this is done in rc.country, but needs to be move above all the o/p to /dev/console.
 
 STATUS=0
 

Changes to woof-code/support/find_cat.c

@@ -1,1 +1,308 @@
+/*called from 0setup
+  Compile like this:
+  # gcc -O2 -o find_cat find_cat.c
+*/
+
+/*
+bash script to make description words into C code:
+
+#/bin/sh
+output="/tmp/find_cat_output"
+
+echo -n "" > $output
+
+#BuildingBlock
+PKG_CAT[1]=" library "
+#Help
+PKG_CAT[2]=" howto | documentation | faq | doc | docs | help "
+#Develop
+PKG_CAT[3]=" develop | development | programming | language | lua | vala |lisp | mono | assembler | bash "
+#Graphic
+PKG_CAT[4]=" paint | painting | image edit| bitmap edit| vector edit| photo| graphic| font edit| image view| thumbnail"
+#Fun
+PKG_CAT[5]=" game | games | boardgame | fun "
+#Multimedia
+PKG_CAT[6]=" multimedia | scanner | audio play| sound play| audio edit| sound edit| video play| video edit| video view| media player | song | ripper | recorder | burner | mixer "
+#Internet
+PKG_CAT[7]=" internet | download| chat | irc |icq | yahoo |msn | instant messag| im client | ftp | sftp | ssh | secure shell | torrent | podcast | mail | email | news | browser | web | telnet "
+#Network
+PKG_CAT[8]=" network | modem | dialup | firewall | file sharing | samba | server | port scanner | wireless | bluetooth | irda | lan | wan | vpn "
+#Personal
+PKG_CAT[9]=" personal | wiki | password | wikki | wik| notes | blog | address| database "
+#Calculate
+PKG_CAT[10]=" calculate | calculator | spreadsheet | financ| measure| accounting | bookkeeping "
+#Document
+PKG_CAT[11]=" document | wordprocessor | text editor | hex editor | html editor |pdf editor |pdf viewer | dictionary | wysiwyg | open office| openoffice | postscript viewer | presentation | desktop publishing | word processor"
+#Filesystem
+PKG_CAT[12]=" filesystem | disk | batch | catalog| file manager | renamer | file | drive| disk| disc "
+#Desktop
+PKG_CAT[13]=" window | screen | icon| desktop "
+#Utility
+PKG_CAT[14]=" utility | archive| remote | backup | partition | terminal | storage | console "
+#System
+PKG_CAT[15]=" system | print | printing | process | hardware | monitor"
+#Setup
+#PKG_CAT[16]="  "
+
+i=0
+for cat in "BuildingBlock" "Help" "Develop" "Graphic" "Fun" "Multimedia" "Internet" "Network" "Personal" "Calculate" "Document" "Filesystem" "Desktop" "Utility" "System"
+do
+ let i++
+
+ OLDIFS=$IFS
+ IFS="|"
+ for name in ${PKG_CAT[$i]}
+ do
+  echo -e "\\tif(strstr(desc, \"${name}\")) {printf(\"${cat}\");return;}" >> $output
+ done
+
+ IFS=$OLDIFS
+done
+
+*/
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+char *name;
+char *desc;
+
+void parseOneDB();
+
+int main(int argc, const char* argv[]) {
+	if(argc < 2) { // not enough arguments
+		return 1;
+	}
+
+	// get " name "
+	name = (char *)malloc(sizeof(char) * (strlen(argv[1])+2));
+	name[0] = ' '; // start with space
+	strcat(name, argv[1]); // add name
+	strcat(name, " "); // end with space
+
+	// get " desc "
+	int chars=3; // starting desc length (spaces + terminating null)
+	int i;
+	for(i=2; i<argc; ++i) { // for each argument
+		if(i!=2) { // not first arg
+			++chars; // add space length (1)
+		}
+		chars+=strlen(argv[i]); // add length
+	}
+
+	desc = (char *)malloc(sizeof(char) * chars); // allocate memory for description
+
+	desc[0] = ' '; // start with space
+	chars=1; // used 1 char
+
+	for(i=2; i<argc; ++i) { // for each argument
+		if(i!=2) { // not first arg
+			desc[chars]=' '; // add space
+			++chars;
+		}
+		strcat(desc, argv[i]); // add chars
+		chars+=strlen(argv[i]);
+	}
+	strcat(desc, " "); // add last space
+
+	parseOneDB(); // parse
+	return 0;
+}
+
+void parseOneDB() {
+	int i;
+	//lower case name
+	for(i=0;i<strlen(name);++i) {
+		if (name[i] >= 'A' && name[i] <= 'Z') {
+			name[i] = name[i] + ('a'-'A');
+		}
+	}
+	//lower case desc
+	for(i=0;i<strlen(desc);++i) {
+		if (desc[i] >= 'A' && desc[i] <= 'Z') {
+			desc[i] = desc[i] + ('a'-'A');
+		}
+	}
+
+	//names of packages in each category
+	char PKG_CAT_Desktop[]=" blackbox compiz desk_icon_theme_browndust desk_icon_theme_darkfire desk_icon_theme_original e16 fbpanel fluxbox fvwm gfontsel glipper gtk-chtheme gtk_theme_citrus_cut gtk_theme_fishing_the_sky gtk_theme_fishpie gtk_theme_gradient_brown gtk_theme_gradient_grey gtk_theme_m8darker gtk_theme_phacile_blue gtk_theme_polished_blue gtk_theme_stardust_zigbert gxset icewm jwm2 jwmconfig2 lxpanel metacity minixcal obconf openbox pupx rox_filer rox_filer twm wallpaper windowmaker xclipboard xclock xkbconfigmanager xlock_gui xlockmore ";
+	char PKG_CAT_System[]=" absvolume absvolume_puppy absvolume_puppy asapm asapm blinky freememapplet freememapplet freememapplet_xlib gparted gparted gtklp hardinfo hpijs lxtask memtest memtester pprocess pschedule sysprof_DEV usbview xload ";
+	char PKG_CAT_Setup[]=" net_setup net_setup_retro petget wakepup2 ";
+	char PKG_CAT_Utility[]=" alltray clamav cutecom floppy gadmin-rsync gexec glade2bas_DEV hiawatha isomaster lxrad lxrad_DEV lzma minicom most pbackup picocom pmirror rxvt rxvt rxvt-unicode snotes urxvt-unicode xarchive xarchiver xfdiff-cut xfprot xterm ";
+	char PKG_CAT_Filesystem[]=" gdmap gfnrename gwhere mc nautilus pdrive pfind prename uxplor worker xfe zfind ";
+	char PKG_CAT_Graphic[]=" autoq3d autotrace blender dia dia-gnomeless eog flphoto fotoxx gcolor2 gimageview gimp gimp-help gphoto2 gpicview gqview grabc gview inkscape inkscape inkscapelite inkview mtpaint scale2x varicad xfig xpaint xv ";
+	char PKG_CAT_Document[]=" abiword abiword-dictionary-en abiword-plugins adobereader aiksaurus amaya bluefish chmsee cssed e3 emacs epdfview geany gedit ghex gv jed joe jove leafpad leafpad link-grammar lyx medit mp nano pdfedit scite scribus xman xpdf zedit ";
+	char PKG_CAT_Calculate[]=" acct calcoo cgtkcalc expensetracker galculator gmeasures gnumeric grisbi homebank moneymanagerx ycalc xcalc ";
+	char PKG_CAT_Personal[]=" datakiosk didiwiki dlume evolution fpm2 notecase osmo pplog pstopwatch ptimer ";
+	char PKG_CAT_Network[]=" autoconnect bind file_sharing-curlftpfs-mpscan fwbuilder gfilemanager gnome-ppp gpptp john linux_firewall monkey mtr nmap pnethood pppoeconf_pup pure_ftpd pwireless rp_pppoe_cli superscan wifi-radar wireshark wvdial ";
+	char PKG_CAT_Internet[]=" alpine axel ayttm bareftp bitchx dillo ekiga elinks elm epic4 fetchmail filezilla firefox flashplayer flock gajim gcurl getmail gftp gtkmoz gurlchecker jags lftp ihu licq links lynx mailx mcabber mldonkey mozilla-firefox mozilla-thunderbird msmtp mutt ncftp netsurf nn pan pctorrent pidgin pidgin_perl psip puppy-podcast-grabber pwget seamonkey seamonkey seamonkey_addons sendmail skipstone ssh_gui sylpheed urlgfe wengophone xchat ";
+	char PKG_CAT_Multimedia[]=" amarok amp asunder audacious audacity aumix cdw cinelerra dkop gecko-mediaplayer grafburn gtkam gxine madplay mhwaveedit mpg321 mplayer mplayer_codecs_basic mplayer_codecs_full mplayer-fonts mplayerplug-in pburn pburn_theme_pburn_original pcdripper pdvdrsab pmetatagger pmusic pmusic_THEME_pmusic_original pupdvdtool ripoff sgmixer simpleburn timidity++ workbone xfmedia xfreecd xine-ui xsane zmixer ";
+	char PKG_CAT_Fun[]=" frozen-bubble gnuchess gtans lincity picpuz rubix supertux tile vitetris wesnoth wormux xinvaders xsoldier ";
+	char PKG_CAT_Develop[]=" anjuta boo clisp cmake cvs gambas lua mercurial mono nant ocaml nasm poedit ruby subversion svn vala valgrind ";
+	char PKG_CAT_BuildingBlock[]=" 915resolution a2ps a52dec acl alsa-lib alsa-utils atk audiofile aufs autocutsel autologin bash bbc_provided bc bcrypt bdb bin boehm-gc bogofilter bridge-utils busybox buttondialog bzip2 cairo cairomm cddetect cdp cdparanoia cdrdao cdrkit cdrtools chmlib coreutils cpio ctorrent cups cups cups_pdf curl ddcprobe device_mapper dhcp dhcpcd dhcp_client dialog dialog dictd_client dietlibc diffstat diffutils disktype dmidecode docbook-xml dosfstools dotpuphandler dpkg-deb dvdauthor dvd+rwtools e2fsprogs ed edid eject elspci enchant exiv2 expat faac faad2 ffmpeg file findutils flac foomatic-filters freetype fribidi fuse gail gawk gcc gdbm getdir gettext ghostscript ghostscript gifsicle gins glib glibc glibc_i18n_en glibc_locales glibmm gnome_menus goffice goffice7 grep grub gtk+ gtk+ gtkdialog gtkdialog2 gtkdialog3 gtklist04mu gtklogfileviewer gtkmm guess_fs gutenprint gutenprint gxmessage gzip hdparm hicolor-icon-theme hotplug2stdout hsfmodem id3lib ifplugd ifplugd_old inotail inotify-tools installwatch iptables jasper kbd lame lcms less libao libart libcap libcddb libcdio libdaemon libdvdcss libdvdnav libdvdplay libdvdread libexif libexif-gtk libexo libexo_lib libgd libgif libglade libgnomecanvas libgnomecanvasmm libgnomecups libgnomecups libgnomeprint libgnomeprint libgnomeprintui libgphoto2 libgsf libid3tag libidl libjpeg libmad libmng libogg libpng librsvg libsigc++ libsndfile libstdc++ libtiff libtool libungif libusb libvorbis libxfce4util libxfcegui4 libxml libxml_python libxscrnsaver libxslt libxslt_python linux-header metamail mimencode mirdir mktemp modem_stats module-init-tools module_init_tools mp3info mut2 ncompress ncurses ndiswrapper nenscript netpbm net-tools normalize ntfs-3g ntfsprogs openssh_client openssl pango parted pciutils pcmcia-cs pcmciautils pcre perl perl-compress-zlib perl-digest-sha1 perl-extutils-depends perl-extutils-pkgconfig perl-html-parser perl-uri perl-xml-parser perl-xml-simple pfilesearch pixman poppler popt ppp pptp procinfo procps programchooser psmisc pup_dock puppybasic puppyinputdetect puppyserialdetect qt4 readline reiserfsprogs replaceit rman rsync samba samba_client sane-backends sdparm sed setserial setvol sgml-base since sqlite squashfs_tools squashfs-tools startup-notification sysfsutils syslinux sysvinit tar time truncate udev udev_cut unclutter unionfs_utils unzip util-linux vamps vcdimager vorbis-tools waitmax wavplay wget wireless-tools wpa_supplicant wpa_supplicant wpa_supplicant wv x264 xclip xcut xdg_puppy xdialog xine-lib xine-plugin xmessage xorg_base xorg_really_base xorg_xfbdev xorg_xorg_base xorg_xorg_dri xorg_xorg_full_dri xorg_xorg_servers xorg_xvesa xvidcore yaf_splash zenity zip zlib ";
+	char PKG_CAT_Help[]=" linux-faqs linux-howtos man-pages ";
+
+	if(strstr(PKG_CAT_Desktop, name)) {printf("Desktop");return;}
+	if(strstr(PKG_CAT_System, name)) {printf("System");return;}
+	if(strstr(PKG_CAT_Setup, name)) {printf("Setup");return;}
+	if(strstr(PKG_CAT_Utility, name)) {printf("Utility");return;}
+	if(strstr(PKG_CAT_Filesystem, name)) {printf("Filesystem");return;}
+	if(strstr(PKG_CAT_Graphic, name)) {printf("Graphic");return;}
+	if(strstr(PKG_CAT_Document, name)) {printf("Document");return;}
+	if(strstr(PKG_CAT_Calculate, name)) {printf("Calculate");return;}
+	if(strstr(PKG_CAT_Personal, name)) {printf("Personal");return;}
+	if(strstr(PKG_CAT_Network, name)) {printf("Network");return;}
+	if(strstr(PKG_CAT_Internet, name)) {printf("Internet");return;}
+	if(strstr(PKG_CAT_Multimedia, name)) {printf("Multimedia");return;}
+	if(strstr(PKG_CAT_Fun, name)) {printf("Fun");return;}
+	if(strstr(PKG_CAT_Develop, name)) {printf("Develop");return;}
+	if(strstr(PKG_CAT_BuildingBlock, name)) {printf("BuildingBlock");return;}
+	if(strstr(PKG_CAT_Help, name)) {printf("Help");return;}
+
+	if(strstr(name, " lib")) {printf("BuildingBlock");return;} //check if library
+
+	//words in description
+	if(strstr(desc, " library ")) {printf("BuildingBlock");return;}
+	if(strstr(desc, " howto ")) {printf("Help");return;}
+	if(strstr(desc, " documentation ")) {printf("Help");return;}
+	if(strstr(desc, " faq ")) {printf("Help");return;}
+	if(strstr(desc, " doc ")) {printf("Help");return;}
+	if(strstr(desc, " docs ")) {printf("Help");return;}
+	if(strstr(desc, " help ")) {printf("Help");return;}
+	if(strstr(desc, " develop ")) {printf("Develop");return;}
+	if(strstr(desc, " development ")) {printf("Develop");return;}
+	if(strstr(desc, " programming ")) {printf("Develop");return;}
+	if(strstr(desc, " language ")) {printf("Develop");return;}
+	if(strstr(desc, " lua ")) {printf("Develop");return;}
+	if(strstr(desc, " vala ")) {printf("Develop");return;}
+	if(strstr(desc, "lisp ")) {printf("Develop");return;}
+	if(strstr(desc, " mono ")) {printf("Develop");return;}
+	if(strstr(desc, " assembler ")) {printf("Develop");return;}
+	if(strstr(desc, " bash ")) {printf("Develop");return;}
+	if(strstr(desc, " paint ")) {printf("Graphic");return;}
+	if(strstr(desc, " painting ")) {printf("Graphic");return;}
+	if(strstr(desc, " image edit")) {printf("Graphic");return;}
+	if(strstr(desc, " bitmap edit")) {printf("Graphic");return;}
+	if(strstr(desc, " vector edit")) {printf("Graphic");return;}
+	if(strstr(desc, " photo")) {printf("Graphic");return;}
+	if(strstr(desc, " graphic")) {printf("Graphic");return;}
+	if(strstr(desc, " font edit")) {printf("Graphic");return;}
+	if(strstr(desc, " image view")) {printf("Graphic");return;}
+	if(strstr(desc, " thumbnail")) {printf("Graphic");return;}
+	if(strstr(desc, " game ")) {printf("Fun");return;}
+	if(strstr(desc, " games ")) {printf("Fun");return;}
+	if(strstr(desc, " boardgame ")) {printf("Fun");return;}
+	if(strstr(desc, " fun ")) {printf("Fun");return;}
+	if(strstr(desc, " multimedia ")) {printf("Multimedia");return;}
+	if(strstr(desc, " scanner ")) {printf("Multimedia");return;}
+	if(strstr(desc, " audio play")) {printf("Multimedia");return;}
+	if(strstr(desc, " sound play")) {printf("Multimedia");return;}
+	if(strstr(desc, " audio edit")) {printf("Multimedia");return;}
+	if(strstr(desc, " sound edit")) {printf("Multimedia");return;}
+	if(strstr(desc, " video play")) {printf("Multimedia");return;}
+	if(strstr(desc, " video edit")) {printf("Multimedia");return;}
+	if(strstr(desc, " video view")) {printf("Multimedia");return;}
+	if(strstr(desc, " media player ")) {printf("Multimedia");return;}
+	if(strstr(desc, " song ")) {printf("Multimedia");return;}
+	if(strstr(desc, " ripper ")) {printf("Multimedia");return;}
+	if(strstr(desc, " recorder ")) {printf("Multimedia");return;}
+	if(strstr(desc, " burner ")) {printf("Multimedia");return;}
+	if(strstr(desc, " mixer ")) {printf("Multimedia");return;}
+	if(strstr(desc, " internet ")) {printf("Internet");return;}
+	if(strstr(desc, " download")) {printf("Internet");return;}
+	if(strstr(desc, " chat ")) {printf("Internet");return;}
+	if(strstr(desc, " irc ")) {printf("Internet");return;}
+	if(strstr(desc, "icq ")) {printf("Internet");return;}
+	if(strstr(desc, " yahoo ")) {printf("Internet");return;}
+	if(strstr(desc, "msn ")) {printf("Internet");return;}
+	if(strstr(desc, " instant messag")) {printf("Internet");return;}
+	if(strstr(desc, " im client ")) {printf("Internet");return;}
+	if(strstr(desc, " ftp ")) {printf("Internet");return;}
+	if(strstr(desc, " sftp ")) {printf("Internet");return;}
+	if(strstr(desc, " ssh ")) {printf("Internet");return;}
+	if(strstr(desc, " secure shell ")) {printf("Internet");return;}
+	if(strstr(desc, " torrent ")) {printf("Internet");return;}
+	if(strstr(desc, " podcast ")) {printf("Internet");return;}
+	if(strstr(desc, " mail ")) {printf("Internet");return;}
+	if(strstr(desc, " email ")) {printf("Internet");return;}
+	if(strstr(desc, " news ")) {printf("Internet");return;}
+	if(strstr(desc, " browser ")) {printf("Internet");return;}
+	if(strstr(desc, " web ")) {printf("Internet");return;}
+	if(strstr(desc, " telnet ")) {printf("Internet");return;}
+	if(strstr(desc, " network ")) {printf("Network");return;}
+	if(strstr(desc, " modem ")) {printf("Network");return;}
+	if(strstr(desc, " dialup ")) {printf("Network");return;}
+	if(strstr(desc, " firewall ")) {printf("Network");return;}
+	if(strstr(desc, " file sharing ")) {printf("Network");return;}
+	if(strstr(desc, " samba ")) {printf("Network");return;}
+	if(strstr(desc, " server ")) {printf("Network");return;}
+	if(strstr(desc, " port scanner ")) {printf("Network");return;}
+	if(strstr(desc, " wireless ")) {printf("Network");return;}
+	if(strstr(desc, " bluetooth ")) {printf("Network");return;}
+	if(strstr(desc, " irda ")) {printf("Network");return;}
+	if(strstr(desc, " lan ")) {printf("Network");return;}
+	if(strstr(desc, " wan ")) {printf("Network");return;}
+	if(strstr(desc, " vpn ")) {printf("Network");return;}
+	if(strstr(desc, " personal ")) {printf("Personal");return;}
+	if(strstr(desc, " wiki ")) {printf("Personal");return;}
+	if(strstr(desc, " password ")) {printf("Personal");return;}
+	if(strstr(desc, " wikki ")) {printf("Personal");return;}
+	if(strstr(desc, " wik")) {printf("Personal");return;}
+	if(strstr(desc, " notes ")) {printf("Personal");return;}
+	if(strstr(desc, " blog ")) {printf("Personal");return;}
+	if(strstr(desc, " address")) {printf("Personal");return;}
+	if(strstr(desc, " database ")) {printf("Personal");return;}
+	if(strstr(desc, " calculate ")) {printf("Calculate");return;}
+	if(strstr(desc, " calculator ")) {printf("Calculate");return;}
+	if(strstr(desc, " spreadsheet ")) {printf("Calculate");return;}
+	if(strstr(desc, " financ")) {printf("Calculate");return;}
+	if(strstr(desc, " measure")) {printf("Calculate");return;}
+	if(strstr(desc, " accounting ")) {printf("Calculate");return;}
+	if(strstr(desc, " bookkeeping ")) {printf("Calculate");return;}
+	if(strstr(desc, " document ")) {printf("Document");return;}
+	if(strstr(desc, " wordprocessor ")) {printf("Document");return;}
+	if(strstr(desc, " text editor ")) {printf("Document");return;}
+	if(strstr(desc, " hex editor ")) {printf("Document");return;}
+	if(strstr(desc, " html editor ")) {printf("Document");return;}
+	if(strstr(desc, "pdf editor ")) {printf("Document");return;}
+	if(strstr(desc, "pdf viewer ")) {printf("Document");return;}
+	if(strstr(desc, " dictionary ")) {printf("Document");return;}
+	if(strstr(desc, " wysiwyg ")) {printf("Document");return;}
+	if(strstr(desc, " open office")) {printf("Document");return;}
+	if(strstr(desc, " openoffice ")) {printf("Document");return;}
+	if(strstr(desc, " postscript viewer ")) {printf("Document");return;}
+	if(strstr(desc, " presentation ")) {printf("Document");return;}
+	if(strstr(desc, " desktop publishing ")) {printf("Document");return;}
+	if(strstr(desc, " word processor")) {printf("Document");return;}
+	if(strstr(desc, " filesystem ")) {printf("Filesystem");return;}
+	if(strstr(desc, " disk ")) {printf("Filesystem");return;}
+	if(strstr(desc, " batch ")) {printf("Filesystem");return;}
+	if(strstr(desc, " catalog")) {printf("Filesystem");return;}
+	if(strstr(desc, " file manager ")) {printf("Filesystem");return;}
+	if(strstr(desc, " renamer ")) {printf("Filesystem");return;}
+	if(strstr(desc, " file ")) {printf("Filesystem");return;}
+	if(strstr(desc, " drive")) {printf("Filesystem");return;}
+	if(strstr(desc, " disk")) {printf("Filesystem");return;}
+	if(strstr(desc, " disc ")) {printf("Filesystem");return;}
+	if(strstr(desc, " window ")) {printf("Desktop");return;}
+	if(strstr(desc, " screen ")) {printf("Desktop");return;}
+	if(strstr(desc, " icon")) {printf("Desktop");return;}
+	if(strstr(desc, " desktop ")) {printf("Desktop");return;}
+	if(strstr(desc, " utility ")) {printf("Utility");return;}
+	if(strstr(desc, " archive")) {printf("Utility");return;}
+	if(strstr(desc, " remote ")) {printf("Utility");return;}
+	if(strstr(desc, " backup ")) {printf("Utility");return;}
+	if(strstr(desc, " partition ")) {printf("Utility");return;}
+	if(strstr(desc, " terminal ")) {printf("Utility");return;}
+	if(strstr(desc, " storage ")) {printf("Utility");return;}
+	if(strstr(desc, " console ")) {printf("Utility");return;}
+	if(strstr(desc, " system ")) {printf("System");return;}
+	if(strstr(desc, " print ")) {printf("System");return;}
+	if(strstr(desc, " printing ")) {printf("System");return;}
+	if(strstr(desc, " process ")) {printf("System");return;}
+	if(strstr(desc, " hardware ")) {printf("System");return;}
+	if(strstr(desc, " monitor")) {printf("System");return;}
 
+	printf("BuildingBlock"); // default
+}