xqf-1.0.5/0000777002404400000620000000000010523106504007310 500000000000000xqf-1.0.5/po/0000777002404400000620000000000010523106502007724 500000000000000xqf-1.0.5/po/Makevars0000644002404400000620000000345310107237115011344 00000000000000# Makefile variables for PO directory in any package using GNU gettext. # Usually the message domain is the same as the package name. DOMAIN = xqf # These two variables depend on the location of this directory. subdir = po top_builddir = .. # These options get passed to xgettext. XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ # This is the copyright holder that gets inserted into the header of the # $(DOMAIN).pot file. Set this to the copyright holder of the surrounding # package. (Note that the msgstr strings, extracted from the package's # sources, belong to the copyright holder of the package.) Translators are # expected to transfer the copyright for their translations to this person # or entity, or to disclaim their copyright. The empty string stands for # the public domain; in this case the translators are expected to disclaim # their copyright. COPYRIGHT_HOLDER = Free Software Foundation, Inc. # This is the email address or URL to which the translators shall report # bugs in the untranslated strings: # - Strings which are not entire sentences, see the maintainer guidelines # in the GNU gettext documentation, section 'Preparing Strings'. # - Strings which use unclear terms or require additional context to be # understood. # - Strings which make invalid assumptions about notation of date, time or # money. # - Pluralisation problems. # - Incorrect English spelling. # - Incorrect formatting. # It can be your email address, or a mailing list address where translators # can write to without being subscribed, or the URL of a web page through # which the translators can contact you. MSGID_BUGS_ADDRESS = xqf-developer@lists.sourceforge.net # This is the list of locale categories, beyond LC_MESSAGES, for which the # message catalogs shall be used. It is usually empty. EXTRA_LOCALE_CATEGORIES = xqf-1.0.5/po/ca.po0000644002404400000620000014014010520643117010570 00000000000000# Catalan translation of XQF. # Copyright © 2002, 2003, 2004 Free Software Foundation, Inc. # This file is distributed under the same license as the xqf package. # Jordi Mallach , 2002, 2003, 2004. # msgid "" msgstr "" "Project-Id-Version: xqf 1.0.1\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2006-10-28 13:56+0200\n" "PO-Revision-Date: 2005-09-20 01:57+0200\n" "Last-Translator: Jordi Mallach \n" "Language-Team: Catalan \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../xqf.desktop.in.h:1 msgid "Game Server Browser" msgstr "Navegador de jocs" #: ../xqf.desktop.in.h:2 msgid "Locate and connect to game servers" msgstr "Cerqueu i connecteu-vos a servidors de jocs" #: ../xqf.desktop.in.h:3 ../src/dialogs.c:492 msgid "XQF Game Server Browser" msgstr "Navegador de jocs XQF" #: ../src/addmaster.c:111 msgid "You have to specify a name and an address." msgstr "Heu d'especificar un nom i una adreça." #: ../src/addmaster.c:118 #, c-format msgid "Master address \"%s\" is not valid." msgstr "L'adreça del servidor mestre «%s» no és vàlida." #: ../src/addmaster.c:174 ../src/source.c:69 msgid "LAN" msgstr "LAN" #: ../src/addmaster.c:245 msgid "Rename Master" msgstr "Reanomena el mestre" #: ../src/addmaster.c:249 msgid "Add Master" msgstr "Afegeix un mestre" #. Master Name (Description) #: ../src/addmaster.c:263 msgid "Master Name" msgstr "Nom del mestre" #. Master Address #: ../src/addmaster.c:319 msgid "Master Address" msgstr "Adreça del mestre" #. Cancel Button #: ../src/addmaster.c:409 ../src/addserver.c:152 ../src/dialogs.c:421 #: ../src/filter.c:1619 ../src/filter.c:2122 ../src/game.c:1819 #: ../src/launch.c:339 ../src/pref.c:4784 ../src/psearch.c:224 #: ../src/redial.c:227 ../src/srv-prop.c:841 ../src/xqf.c:981 ../src/xqf.c:994 #: ../src/xqf.c:1867 msgid "Cancel" msgstr "Cancel·la" #: ../src/addserver.c:91 ../src/addserver.c:188 msgid "Add Server" msgstr "Afegeix un servidor" #. Server Entry #: ../src/addserver.c:102 msgid "Server:" msgstr "Servidor:" #: ../src/dialogs.c:124 ../src/dialogs.c:199 ../src/dialogs.c:279 msgid "XQF: Warning!" msgstr "XQF: Atenció!" #. OK Button #. gtk_button_box_set_child_size(GTK_BUTTON_BOX(hbuttonbox1), 79, 38); #. OK Button #: ../src/dialogs.c:149 ../src/dialogs.c:410 ../src/dialogs.c:600 #: ../src/filter.c:1630 ../src/filter.c:2110 ../src/pref.c:4792 #: ../src/psearch.c:213 ../src/srv-prop.c:849 msgid "OK" msgstr "D'acord" #: ../src/dialogs.c:224 ../src/dialogs.c:304 ../src/filter.c:1050 #: ../src/psearch.c:398 ../src/xqf.c:957 ../src/xqf.c:969 ../src/xqf.c:1645 msgid "Yes" msgstr "Sí" #: ../src/dialogs.c:236 ../src/dialogs.c:316 ../src/filter.c:1051 #: ../src/psearch.c:398 ../src/xqf.c:957 ../src/xqf.c:969 ../src/xqf.c:1645 msgid "No" msgstr "No" #: ../src/dialogs.c:326 ../src/xqf.c:994 msgid "Redial" msgstr "Torna a cridar" #: ../src/dialogs.c:493 #, c-format msgid "Version %s" msgstr "Versió %s" #. translators can use the copyright symbol instead of (C) #: ../src/dialogs.c:496 msgid "Copyright (C) 1998-2002 Roman Pozlevich" msgstr "Copyright © 1998-2002 Roman Pozlevich" #: ../src/dialogs.c:499 msgid "Maintainers:" msgstr "Mantenidors:" #: ../src/dialogs.c:505 msgid "Contributors:" msgstr "Contribuïdors:" #: ../src/dialogs.c:509 msgid "Bug reports and feature requests:" msgstr "Informes d'error i peticions de millores:" #: ../src/dialogs.c:556 msgid "About XQF" msgstr "Quant a XQF" #: ../src/dialogs.c:583 msgid "[placeholder, do not translate]" msgstr "[placeholder, do not translate]" #: ../src/filter.c:97 msgid "Server" msgstr "Servidor" #: ../src/filter.c:98 msgid "S Filter" msgstr "Filtre S" #: ../src/filter.c:99 msgid "SF Cfg" msgstr "Cfg FS" #: ../src/filter.c:111 msgid "Player" msgstr "Jugador" #: ../src/filter.c:112 msgid "P Filter" msgstr "Filtre J" #: ../src/filter.c:113 msgid "PF Cfg" msgstr "Cfg FJ" #: ../src/filter.c:1011 msgid "Enter filter name" msgstr "Introduïu el nom del filtre" #: ../src/filter.c:1049 msgid "Delete server filter" msgstr "Suprimeix el filtre de servidor" #: ../src/filter.c:1052 #, c-format msgid "Really delete server filter \"%s\"?" msgstr "Esteu segur de voler suprimir el filtre de servidor «%s»?" #: ../src/filter.c:1257 msgid "Server Filter" msgstr "Filtre de servidors" #: ../src/filter.c:1271 ../src/flt-player.c:821 ../src/pref.c:2821 msgid "New" msgstr "Nou" #: ../src/filter.c:1278 msgid "Rename" msgstr "Reanomena" #. FIXME: plural #: ../src/filter.c:1285 ../src/flt-player.c:827 ../src/pref.c:2829 #: ../src/xqf.c:1867 msgid "Delete" msgstr "Suprimeix" #: ../src/filter.c:1292 msgid "Server would pass filter if" msgstr "El servidor passaria el filtre si" #. row=0..1 #. max ping #: ../src/filter.c:1313 msgid "ping is less than" msgstr "el ping és menor que" #. GAMECONTAINS Filter -- baa #. http://developer.gnome.org/doc/API/gtk/gtktable.html #: ../src/filter.c:1334 msgid "the game contains the string" msgstr "el joc conté la cadena" #. row=1..2 #. max timeouts #: ../src/filter.c:1352 msgid "the number of retries is fewer than" msgstr "el número de reintents és menor que" #. GAMETYPE Filter -- baa #. http://developer.gnome.org/doc/API/gtk/gtktable.html #: ../src/filter.c:1371 msgid "the game type contains the string" msgstr "el tipus de joc conté la cadena" #. row=2..3 #. not full #: ../src/filter.c:1388 msgid "it is not full" msgstr "no està ple" #. Version Filter -- baa #: ../src/filter.c:1395 msgid "the version contains the string" msgstr "la versió conté la cadena" #: ../src/filter.c:1414 msgid "it is not empty" msgstr "no està buit" #. Map filter #: ../src/filter.c:1423 msgid "the map contains the string" msgstr "el mapa conté la cadena" #: ../src/filter.c:1441 msgid "cheats are not allowed" msgstr "les trampes no estan permitides" #. Server name filter #: ../src/filter.c:1450 msgid "the server name contains the string" msgstr "el nom del servidor conté la cadena" #: ../src/filter.c:1468 msgid "no password required" msgstr "no es requereix contrasenya" #: ../src/filter.c:1479 ../src/filter.c:1958 msgid "Country filter:" msgstr "Filtre d'estat:" #: ../src/filter.c:1520 msgid "select..." msgstr "seleccioneu..." #: ../src/filter.c:1533 msgid "clear" msgstr "neteja" #: ../src/filter.c:1591 msgid "XQF: Filters" msgstr "XQF: Filtres" #. window caption for country filter #: ../src/filter.c:1949 msgid "Configure Country Filter" msgstr "Configura el filtre d'estat" #: ../src/filter.c:2091 msgid "Show all countries" msgstr "Mostra tots els estats" #: ../src/flt-player.c:69 ../src/flt-player.c:75 msgid "string" msgstr "cadena" #: ../src/flt-player.c:70 msgid "substr" msgstr "subcad" #: ../src/flt-player.c:71 msgid "regexp" msgstr "expreg" #: ../src/flt-player.c:76 msgid "substring" msgstr "subcadena" #: ../src/flt-player.c:77 msgid "regular expression" msgstr "expressió regular" #: ../src/flt-player.c:448 ../src/psearch.c:116 msgid "XQF: Error" msgstr "XQF: Error" #: ../src/flt-player.c:448 ../src/psearch.c:117 #, c-format msgid "" "Regular Expression Error!\n" "\n" "%s\n" "\n" "%s." msgstr "" "Error en l'expressió regular!\n" "\n" "%s\n" "\n" "%s." #. Pattern Entry #: ../src/flt-player.c:666 ../src/flt-player.c:754 msgid "Pattern" msgstr "Patró" #. Comment #: ../src/flt-player.c:701 msgid "Pattern Comment" msgstr "Comentari del patró" #: ../src/flt-player.c:754 msgid "Mode" msgstr "Mode" #: ../src/flt-player.c:760 msgid "Player Filter" msgstr "Filtre de jugadors" #: ../src/flt-player.c:839 msgid "Up" msgstr "Puja" #: ../src/flt-player.c:845 msgid "Down" msgstr "Baixa" #: ../src/game.c:212 msgid "" "Note: Soldier of Fortune will not connect to a server correctly\n" "without creating a startup script for the game. Please see the\n" "XQF documentation for more information." msgstr "" "Nota: Soldier of Fortune no connectarà a un servidor correctament\n" "sense crear un script d'inici per al joc. Si us plau, vegeu la\n" "documentació d'XQF per a més informació." #: ../src/game.c:216 msgid "" "Note: Unreal Tournament will not launch correctly without\n" "modifications to the game's startup script. Please see the\n" "XQF documentation for more information." msgstr "" "Nota: Unreal Tournament no es llançarà correctament sense\n" "modificacions al script d'inici del joc. Si us plau, vegeu\n" "la documentació d'XQF per a més informació." #: ../src/game.c:220 msgid "Sample Command Line: wine hl.exe -- hl.exe -console" msgstr "Exemple de línia d'ordres: wine hl.exe -- hl.exe -console" #: ../src/game.c:223 msgid "" "Note: Savage will not launch correctly without\n" "modifications to the game's startup script. Please see the\n" "XQF documentation for more information." msgstr "" "Nota: Savage no es llançarà correctament sense\n" "modificacions al script d'inici del joc. Si us plau, vegeu\n" "la documentació d'XQF per a més informació." #. %s = game name e.g. QuakeWorld #: ../src/game.c:1691 #, c-format msgid "%s command line is empty." msgstr "la línia d'ordres de %s està buida." #. directory name, game name #. %s directory, game name #: ../src/game.c:1698 ../src/game.c:1807 #, c-format msgid "" "\"%s\" is not a directory\n" "Please specify correct %s working directory." msgstr "" "«%s» no és un directori\n" "Especifiqueu un directori de treball de %s correcte." #. game name #: ../src/game.c:1710 #, c-format msgid "Please specify correct %s working directory." msgstr "Especifiqueu un directori de treball de %s correcte." #. directory, subdirectory, game name #: ../src/game.c:1716 #, c-format msgid "" "Directory \"%s\" doesn't contain \"%s\" subdirectory.\n" "Please specify correct %s working directory." msgstr "" "El directori «%s» no conté el subdirectori «%s».\n" "Especifiqueu un directori de treball de %s correcte." #. %s Quake3 #: ../src/game.c:1773 #, c-format msgid "" "~/.q3a directory doesn't exist or doesn't contain\n" "\"baseq3\" (\"demoq3\") subdirectory.\n" "Please run %s client at least once before running XQF\n" "or specify correct %s working directory." msgstr "" "El directori ~/.q3a no existeix o no conté\n" "el subdirectori «baseq3» (o «demoq3»).\n" "Executeu el client de %s al menys una vegada abans d'utilitzar\n" "XQF o especifiqueu un directori de treball de %s correcte." #. %s directory, Quake3 #: ../src/game.c:1782 #, c-format msgid "" "\"%s\" directory doesn't exist or doesn't contain \"baseq3\" (\"demoq3\") " "subdirectory.\n" "Please specify correct %s working directory\n" "or leave it empty (~/.q3a is used by default)" msgstr "" "El directori «%s» no existeix o no conté el subdirectori «baseq3» (o " "«demoq3»).\n" "Especifique un directori de treball de %s correcte\n" " o deixeu-ho en blanc (s'utilitzarà ~/.q3a per defecte)" #: ../src/game.c:1819 ../src/launch.c:339 ../src/xqf.c:981 ../src/xqf.c:994 msgid "Launch" msgstr "Llança" #. %s frontend.cfg #: ../src/game.c:1821 #, c-format msgid "" "Cannot write to file \"%s\".\n" "\n" "Launch client anyway?" msgstr "" "No es pot escriure en el fitxer «%s».\n" "\n" "Voleu llançar el client de totes maneres?" #: ../src/game.c:2448 msgid "" "The server has Punkbuster enabled but it is not going\n" "to be set on the command line.\n" "You may have problems connecting.\n" "You can fix this in the game preferences." msgstr "" "El servidor té el Punkbuster activat però no es va a\n" "fixar en la línia d'ordres.\n" "Pot ser tindreu problemes per a connectar.\n" "Podeu solucionar açò en les preferències del joc." #: ../src/launch.c:70 ../src/launch.c:195 msgid "XQF: ERROR!" msgstr "XQF: ERROR!" #: ../src/launch.c:70 #, c-format msgid "" "ERROR!\n" "\n" "%s(%s) failed: %s" msgstr "" "ERROR!\n" "\n" "%s(%s) ha fallat: %s" #: ../src/launch.c:195 #, c-format msgid "" "ERROR!\n" "\n" "%s" msgstr "" "ERROR!\n" "\n" "%s" #: ../src/launch.c:340 #, c-format msgid "" "There is %s client running.\n" "\n" "Launch %s client?" msgstr "" "Hi ha un client de %s en execució.\n" "\n" "Voleu llançar el client de %s?" #: ../src/pref.c:646 msgid "com_soundmegs and com_zonemegs must be lower than com_hunkmegs" msgstr "com_soundmegs i com_zonemegs han de ser menors que com_hunkmegs" #: ../src/pref.c:1232 msgid "Invalid source IP address" msgstr "L'adreça IP font és invàlida" #: ../src/pref.c:1244 msgid "Invalid source port range" msgstr "El rang de ports font és invàlid" #. Top (Shirt) Color #: ../src/pref.c:1592 ../src/pref.c:1691 msgid "Top" msgstr "Superior" #. Bottom (Pants) Color #: ../src/pref.c:1608 ../src/pref.c:1707 msgid "Bottom" msgstr "Inferior" #. Player Name #: ../src/pref.c:1854 ../src/pref.c:1965 ../src/pref.c:2025 ../src/pref.c:2077 #: ../src/xqf-ui.c:54 ../src/xqf-ui.c:129 msgid "Name" msgstr "Nom" #: ../src/pref.c:1875 ../src/xqf-ui.c:141 msgid "Colors" msgstr "Colors" #: ../src/pref.c:1908 msgid "Login name" msgstr "Nom d'usuari" #: ../src/pref.c:1950 msgid "Skin/Colors" msgstr "Pell/Colors" #: ../src/pref.c:1986 msgid "Team" msgstr "Equip" #: ../src/pref.c:2044 msgid "Model/Skin" msgstr "Model/Pell" #: ../src/pref.c:2131 msgid "--- Anything ---" msgstr "--- Qualsevol ---" #: ../src/pref.c:2132 msgid "Axe" msgstr "Destral" #: ../src/pref.c:2133 msgid "Shotgun" msgstr "Escopeta" #: ../src/pref.c:2134 msgid "Super Shotgun" msgstr "Super escopeta" #: ../src/pref.c:2135 msgid "Nailgun" msgstr "Pistola de claus" #: ../src/pref.c:2136 msgid "Super Nailgun" msgstr "Super pistola de claus" #: ../src/pref.c:2137 msgid "Grenade Launcher" msgstr "Llança granades" #: ../src/pref.c:2138 msgid "Rocket Launcher" msgstr "Llança coets" #: ../src/pref.c:2139 msgid "ThunderBolt" msgstr "Llança descàrregues" #: ../src/pref.c:2187 msgid "Use skins" msgstr "Utilitza pells" #: ../src/pref.c:2193 msgid "Don't use skins" msgstr "No utilitza pells" #: ../src/pref.c:2199 msgid "Don't download new skins" msgstr "No descarrega pells noves" #: ../src/pref.c:2241 msgid "You must configure a command line first" msgstr "Heu de configurar la línia d'ordres abans" #: ../src/pref.c:2283 msgid "Game not found" msgstr "No s'ha trobat el joc" #. %s name of a game #: ../src/pref.c:2285 #, c-format msgid "%s not found" msgstr "No s'ha trobat «%s»" #: ../src/pref.c:2333 #, c-format msgid "" "An entry already exists for the game %s.\n" "\n" "A default entry for this game will not be added.\n" "\n" "Delete the entry and try again." msgstr "" "Ja existeix una entrada per al joc %s.\n" "\n" "No s'afegirà una entrada per defecte per a aquest joc.\n" "\n" "Esborreu la entrada i proveu de nou." #: ../src/pref.c:2375 msgid "There are no defaults for this game" msgstr "No hi ha valors per defecte per a aquest joc" #: ../src/pref.c:2436 msgid "" "There is already an entry for this game.\n" "\n" "To modify it, select it from the list, modify it\n" "and then click Add/Update." msgstr "" "Ja hi ha una entrada per a aquest joc.\n" "\n" "Per a modificar-ho, seleccioneu-lo de la llista,\n" "modifiqueu-lo i després feu click en Afegir/Actualitzar." #: ../src/pref.c:2440 msgid "You must enter both a game and at least one argument." msgstr "Heu d'inserir un joc i al menys un argument." #: ../src/pref.c:2539 msgid "Invoking" msgstr "S'està executant" #: ../src/pref.c:2546 msgid "*** Not Implemented ***" msgstr "*** No implementat ***" #: ../src/pref.c:2558 msgid "Custom Args" msgstr "Args personalitzats" #: ../src/pref.c:2570 msgid "Command Line" msgstr "Línia d'ordres" #. translator: button for command suggestion #. translator: button for directory guess #: ../src/pref.c:2597 ../src/pref.c:2635 msgid "Suggest" msgstr "Suggeriment" #: ../src/pref.c:2603 msgid "Searches the path for the game executable" msgstr "Cerca l'executable del joc en el camí" #. /// #: ../src/pref.c:2610 msgid "Working Directory" msgstr "Directori de treball" #: ../src/pref.c:2640 msgid "Tries to guess the working directory based on the command line" msgstr "" "Tracta d'endevinar el directori de treball basant-se en la línia d'ordres" #: ../src/pref.c:2658 msgid "Custom CFG" msgstr "CFG personalitzada" #: ../src/pref.c:2763 ../src/xqf-ui.c:102 msgid "Game" msgstr "Joc" #: ../src/pref.c:2771 msgid "Arguments" msgstr "Arguments" #: ../src/pref.c:2779 msgid "Game and Arguments" msgstr "Joc i arguments" #: ../src/pref.c:2802 msgid "Enter the game name from the game column" msgstr "Introduïu el nom del joc des de la columna de jocs" #: ../src/pref.c:2811 msgid "Enter the arguments separated by spaces" msgstr "Introduïu els arguments separats per espais" #: ../src/pref.c:2837 msgid "Add Defaults" msgstr "Afegeix valors predeterminats" #: ../src/pref.c:2845 msgid "Add/Update" msgstr "Afegeix/Actualitza" #. Common Options #: ../src/pref.c:3000 msgid "Common Options" msgstr "Opcions comuns" #: ../src/pref.c:3011 msgid "Disable CD Audio" msgstr "Inhabilita el CD Audio" #. Disable Sound #: ../src/pref.c:3019 msgid "Disable Sound" msgstr "Inhabilita el so" #: ../src/pref.c:3043 msgid "Do not set (use game default)" msgstr "No estableix (utilitza el valor per defecte del joc)" #: ../src/pref.c:3044 msgid "Automatically calculate from server ping time" msgstr "Calcula automàticament del temps de resposta del servidor" #: ../src/pref.c:3045 msgid "Fixed value" msgstr "Valor fixe" #: ../src/pref.c:3113 msgid "Masterserver Protocol Version" msgstr "Versió de protocol del servidor mestre" #: ../src/pref.c:3136 msgid "set fs_game on connect" msgstr "estableix fs_game al connectar" #: ../src/pref.c:3145 msgid "set cl_punkbuster on connect" msgstr "estableix cl_punkbuster al connectar" #: ../src/pref.c:3154 msgid "enable console" msgstr "habilita la consola" #: ../src/pref.c:3216 msgid "Pass memory settings on command line" msgstr "Passa la configuració de memòria en la línia d'ordres" #. Mega Byte #: ../src/pref.c:3234 ../src/pref.c:3257 ../src/pref.c:3280 ../src/pref.c:3304 msgid "MB" msgstr "MiB" #: ../src/pref.c:3238 msgid "com_hunkmegs" msgstr "com_hunkmegs" #: ../src/pref.c:3261 msgid "com_zonemegs" msgstr "com_zonemegs" #: ../src/pref.c:3284 msgid "com_soundmegs" msgstr "com_soundmegs" #: ../src/pref.c:3308 msgid "cg_precachedmodels" msgstr "cg_precachedmodels" #: ../src/pref.c:3317 msgid "Preset values" msgstr "Valors predeterminats" #: ../src/pref.c:3324 msgid "Default" msgstr "Per defecte" #: ../src/pref.c:3330 msgid "128MB" msgstr "128MiB" #: ../src/pref.c:3336 msgid ">256MB" msgstr ">256MiB" #: ../src/pref.c:3355 ../src/pref.c:3584 ../src/pref.c:3590 msgid "Options" msgstr "Opcions" #: ../src/pref.c:3358 msgid "Memory" msgstr "Memòria" #. QW Specific Features #. 'w_switch' & 'b_switch' control #: ../src/pref.c:3387 msgid "The highest weapon that Quake should switch to..." msgstr "L'arma més alta a la qual hauria de canviar Quake..." #: ../src/pref.c:3400 msgid "upon a weapon pickup" msgstr "en recollir un arma" #: ../src/pref.c:3418 msgid "upon a backpack pickup" msgstr "en recollir una motxila" #: ../src/pref.c:3439 msgid "Disable auto-aiming" msgstr "Inhabilita l'autoapuntar" #: ../src/pref.c:3477 msgid "Skins" msgstr "Pells" #: ../src/pref.c:3499 msgid "Rate" msgstr "Valor" #. 'pushlatency' #: ../src/pref.c:3523 msgid "pushlatency" msgstr "pushlatency" #. Troubleshooting #: ../src/pref.c:3538 msgid "Troubleshooting" msgstr "Solució de problemes" #: ../src/pref.c:3551 msgid "Disable delta-compression (cl_nodelta)" msgstr "Inhabilita la compressió-delta (cl_nodelta)" #: ../src/pref.c:3565 msgid "Disable player/entity prediction (cl_predict_players)" msgstr "Inhabilita la predicció de jugadors/entitats (cl_predict_players)" #: ../src/pref.c:3583 msgid "Weapons" msgstr "Armes" #: ../src/pref.c:3585 ../src/pref.c:3591 ../src/pref.c:3596 ../src/pref.c:3601 msgid "Player Profile" msgstr "Perfil del jugador" #: ../src/pref.c:3677 msgid "Icons" msgstr "Icones" #: ../src/pref.c:3677 msgid "Text" msgstr "Text" #: ../src/pref.c:3677 msgid "Both" msgstr "Ambdós" #: ../src/pref.c:3683 msgid "Server List" msgstr "Llista de servidors" #: ../src/pref.c:3696 msgid "Show host names" msgstr "Mostra els noms dels servidors" #: ../src/pref.c:3701 msgid "Show hostnames instead of IP addresses if possible" msgstr "Mostra els noms dels servidors en comptes d'adreces IP si és possible" #: ../src/pref.c:3712 msgid "Show default port" msgstr "Mostra el port per defecte" #: ../src/pref.c:3727 msgid "Do not count bots as players" msgstr "No comptes els robots com jugadors" #: ../src/pref.c:3743 msgid "Sort servers real-time during refresh" msgstr "Ordena els servidors en temps real durant el refresc" #: ../src/pref.c:3758 msgid "Refresh on update" msgstr "Refresca a l'actualitzar" #: ../src/pref.c:3774 msgid "Resolve hostnames on update" msgstr "Resol els noms dels servidors en actualitzar" #: ../src/pref.c:3778 msgid "Enable or disable DNS resolution of IP addresses" msgstr "Habilita o inhabilita la resolució DNS d'adreces IP" #: ../src/pref.c:3792 msgid "Show only configured games" msgstr "Mostra només els jocs configurats" #: ../src/pref.c:3808 msgid "Use custom color settings" msgstr "Utilitza paràmetres de colors personalitzats" #: ../src/pref.c:3810 msgid "" "Use XQF's color settings instead of the system ones. You need to restart XQF " "for this setting to take effect. Note that you may need to install the gtk-" "engines package." msgstr "" "Utilitza els paràmetres de color de l'XQF en comptes dels del sistema. Heu " "de tornar a iniciar l'XQF per a que aquest paràmetre tinga efecte. Teniu en " "compte que és possible que necessiteu instal·lar el paquet gtk-engines." #. Toolbar #: ../src/pref.c:3831 msgid "Toolbar" msgstr "Barra d'eines" #. Toolbar Tips #: ../src/pref.c:3856 msgid "Tooltips" msgstr "Pistes d'eines" #. On Startup #: ../src/pref.c:3899 msgid "On Startup" msgstr "En iniciar" #: ../src/pref.c:3912 msgid "Refresh Favorites" msgstr "Refresca els favorits" #: ../src/pref.c:3925 msgid "Show splash screen" msgstr "Mostra la pantalla d'inici" #: ../src/pref.c:3939 msgid "Scan for maps" msgstr "Cerca mapes" #: ../src/pref.c:3944 msgid "" "Scan game directories for installed maps. xqf will take longer to start up " "when enabled." msgstr "" "Analitza els directoris del joc per a cercar mapes instal·lats. xqf tardarà " "més en iniciar-se quan està habilitat." #: ../src/pref.c:3951 msgid "scan now" msgstr "analitza ara" #: ../src/pref.c:3967 msgid "Minimize to system tray" msgstr "Minimitza a l'àrea de notificació" #: ../src/pref.c:3971 msgid "Enable xqf tray icon. You need to restart xqf for this to take effect." msgstr "" "Habilita la icona de notificació d'xqf. Heu de reiniciar xqf per a que tinga " "efecte." #. On Exit #: ../src/pref.c:3984 msgid "On Exit" msgstr "En sortir" #: ../src/pref.c:3997 msgid "Save server lists" msgstr "Desa les llistes de servidors" #: ../src/pref.c:4012 msgid "Save server information" msgstr "Desa la informació sobre els servidors" #: ../src/pref.c:4029 msgid "Save player information" msgstr "Desa la informació sobre els jugadors" #. When launching a Game #: ../src/pref.c:4045 msgid "When launching a game..." msgstr "En llançar un joc..." #: ../src/pref.c:4059 msgid "Terminate XQF" msgstr "Finalitza XQF" #: ../src/pref.c:4074 msgid "Iconify XQF window" msgstr "Iconifica la finestra d'XQF" #: ../src/pref.c:4089 msgid "Create LaunchInfo.txt" msgstr "Crea un LaunchInfo.txt" #: ../src/pref.c:4095 msgid "" "Creates the file ~/.qf/LaunchInfo.txt with: ping ip:port name map curplayers " "maxplayers" msgstr "" "Crea el fitxer ~/.qf/LaunchInfo.txt amb: ping ip:port nom mapa jugactuals " "jugmax" #: ../src/pref.c:4101 msgid "Execute prelaunch" msgstr "Executa prelaunch" #: ../src/pref.c:4107 msgid "Executes ~/.qf/PreLaunch (if it exists) before launching the game" msgstr "Executa ~/.qf/PreLaunch (si existeix) abans de llançar el joc" #: ../src/pref.c:4116 msgid "Stop current song in XMMS" msgstr "Atura la cançò actual a l'XMMS" #: ../src/pref.c:4119 msgid "" "Stopping XMMS will release /dev/dsp. Activate this option if you use XMMS " "and have a cheap soundcard that allows only one application to open /dev/dsp." msgstr "" "Aturar XMMS alliberarà /dev/dsp. Activeu aquesta opció si utilitzeu XMMS i " "teniu una targeta de so barata que només permet a una aplicació obrir /dev/" "dsp." #. QStat preferences -- maxsimultaneous & maxretries #: ../src/pref.c:4158 msgid "QStat Options" msgstr "Opcions de QStat" #. maxsimultaneous #: ../src/pref.c:4169 msgid "Number of simultaneous servers to query" msgstr "Nombre de servidors simultanis a consultar" #. maxretries #: ../src/pref.c:4193 msgid "Number of retries" msgstr "Nombre de reintents" #. srcip #: ../src/pref.c:4212 msgid "Source IP Address" msgstr "Adreça IP font" #: ../src/pref.c:4233 msgid "Source Port Range" msgstr "Rang de ports font" #. Translator: sound test button #: ../src/pref.c:4296 msgid "Test" msgstr "Prova" #. Sound Enable / Disable frame #. Sounds Enable / Disable #: ../src/pref.c:4313 msgid "Sound Enable / Disable" msgstr "Habilita / inhabilita el so" #: ../src/pref.c:4327 msgid "Enable Sound" msgstr "Habilita el so" #. Sound Player #: ../src/pref.c:4338 msgid "Player program" msgstr "Programa reproductor" #. Sound Files frame #. Sounds preferences -- player and various sounds #: ../src/pref.c:4366 msgid "Sound Files" msgstr "Fitxers de so" #. Sound XQF Start #: ../src/pref.c:4378 msgid "XQF Start" msgstr "Inici d'XQF" #. Sound XQF Quit #: ../src/pref.c:4410 msgid "XQF Quit" msgstr "Sortida d'XQF" #. Sound Update Done #: ../src/pref.c:4442 msgid "Update Done" msgstr "Actualització feta" #. Sound Refresh Done #: ../src/pref.c:4475 msgid "Refresh Done" msgstr "Refresc fet" #. Sound Stop #: ../src/pref.c:4508 ../src/xqf.c:3071 ../src/trayicon.c:462 msgid "Stop" msgstr "Para" #. Sound Server Connect #: ../src/pref.c:4541 msgid "Server Connect" msgstr "Connexió al servidor" #. Sound Redial Success Start #: ../src/pref.c:4574 msgid "Redial Success" msgstr "Èxit de la recrida" #: ../src/pref.c:4702 msgid "XQF: Preferences" msgstr "XQF: Preferències" #: ../src/pref.c:4722 msgid "General" msgstr "General" #: ../src/pref.c:4734 msgid "Games" msgstr "Jocs" #: ../src/pref.c:4739 msgid "Appearance" msgstr "Aparença" #: ../src/pref.c:4744 msgid "QStat" msgstr "QStat" #: ../src/pref.c:4749 msgid "Sounds" msgstr "Sons" #: ../src/pref.c:4754 msgid "Scripts" msgstr "Seqüències" #: ../src/pref.c:4895 msgid "Unable to get user name/home/tmpdir" msgstr "No s'ha pogut obtindre el nom/directori de l'usuari/directori temporal" #. translator: %s = game name, e.g. Quake 3 Arena #: ../src/pref.c:5227 #, c-format msgid "Searching for %s maps" msgstr "S'estan cercant mapes per a %s" #: ../src/pref.c:5281 msgid "Game Command Selection" msgstr "Selecció de l'ordre del joc" #: ../src/pref.c:5290 msgid "Game Directory Selection" msgstr "Selecció del directori del joc" #: ../src/pref.c:5295 msgid "Sound Player Selection" msgstr "Selecció del reproductor de so" #: ../src/pref.c:5300 msgid "XQF Start Sound Selection" msgstr "Selecció del so per a «inici d'XQF»" #: ../src/pref.c:5305 msgid "XQF Quit Sound Selection" msgstr "Selecció del so per a «sortida d'XQF»" #: ../src/pref.c:5310 msgid "Update Done Sound Selection" msgstr "Selecció del so per a «actualització feta»" #: ../src/pref.c:5315 msgid "Refresh Done Sound Selection" msgstr "Selecció del so per a «refresc fet»" #: ../src/pref.c:5320 msgid "Stop Sound Selection" msgstr "Selecció del so per a «para»" #: ../src/pref.c:5325 msgid "Server Connect Sound Selection" msgstr "Selecció de so per a «connexió al servidor»" #: ../src/pref.c:5330 msgid "Redial Success Sound Selection" msgstr "Selecció de so per a «èxit de la recrida»" #: ../src/psearch.c:51 msgid "Exact Match" msgstr "Coincidència exacta" #: ../src/psearch.c:52 msgid "Substring" msgstr "Subcadena" #: ../src/psearch.c:53 msgid "Regular Expression" msgstr "Expressió regular" #: ../src/psearch.c:174 msgid "Find Player" msgstr "Cerca el jugador" #. Pattern Entry #: ../src/psearch.c:185 msgid "Find Player:" msgstr "Cerca el jugador:" #: ../src/psearch.c:394 msgid "Player not found." msgstr "No s'ha trobat el jugador." #: ../src/psearch.c:398 msgid "XQF: End of server list reached" msgstr "XQF: S'ha arribat al final de la llista de servidors" #: ../src/psearch.c:399 msgid "Continue search from beginning?" msgstr "Voleu continuar la cerca des del principi?" #. Message #: ../src/rcon.c:550 msgid "Cmd:" msgstr "Ordre:" #. Send Button #: ../src/rcon.c:577 msgid "Send" msgstr "Envia" #. Status Button #: ../src/rcon.c:586 msgid "Status" msgstr "Estat" #. Clear Button #: ../src/rcon.c:595 msgid "Clear" msgstr "Neteja" #: ../src/rcon.c:617 ../src/statistics.c:849 msgid "Close" msgstr "Tanca" #: ../src/rcon.c:717 #, c-format msgid "Usage: %s [server type] \n" msgstr "Forma d'ús: %s [tipus de servidor] \n" #: ../src/rcon.c:718 #, c-format msgid " server type is either --qws, --hws, --hls or --dm3s.\n" msgstr " el tipus de servidor és --qws, --hws, --hls o --dm3s..\n" #: ../src/rcon.c:719 #, c-format msgid " If no server type is specified, Q3 style rcon is assumed.\n" msgstr "" " Si no s'especifica cap tipus de servidor, s'asumeix rcon d'estil Q3.\n" #. translator: readline prompt #: ../src/rcon.c:756 msgid "Password: " msgstr "Contrasenya: " #: ../src/redial.c:123 #, c-format msgid "" "Waiting for free slots on\n" "%s" msgstr "" "S'està esperant a que hi hagen llocs lliures en\n" "%s" #: ../src/redial.c:125 #, c-format msgid "" "Refreshing\n" "%s" msgstr "" "S'està refrescant\n" "%s" #. * window code modified from glade #: ../src/redial.c:179 ../src/redial.c:184 msgid "XQF: Redialing" msgstr "XQF: S'està tornant a marcar" #: ../src/redial.c:196 msgid "" "***\n" "***" msgstr "" "***\n" "***" #: ../src/redial.c:219 msgid "Launch now" msgstr "Llança ara" #: ../src/source.c:66 msgid "Standard" msgstr "Estàndard" #: ../src/source.c:67 msgid "Gamespy" msgstr "Gamespy" #: ../src/source.c:68 msgid "http" msgstr "http" #: ../src/source.c:70 msgid "File" msgstr "Fitxer" #: ../src/source.c:122 msgid "Retry" msgstr "Reintenta" #: ../src/source.c:122 msgid "Skip" msgstr "Omet" #: ../src/source.c:123 #, c-format msgid "" "Cannot write to file %s\n" "System Error: %s\n" msgstr "" "No es pot escriure en el fitxer %s\n" "Error del sistema: %s\n" #. translator: %s == url, eg gmaster://bla.blub.org #: ../src/source.c:891 #, c-format msgid "You have to specify a port number for %s." msgstr "Heu d'especificar un número de port per a %s." #: ../src/source.c:905 #, c-format msgid "'gsmtype' options missing for master %s." msgstr "Falten les opcions «gsmtype» per al mestre %s." #: ../src/source.c:1439 msgid "Favorites" msgstr "Favorits" #: ../src/srv-prop.c:423 msgid "IP Address:" msgstr "Adreces IP:" #: ../src/srv-prop.c:433 msgid "Port:" msgstr "Port:" #: ../src/srv-prop.c:447 msgid "Host Name:" msgstr "Nom del servidor:" #: ../src/srv-prop.c:461 msgid "Country:" msgstr "Estat:" #: ../src/srv-prop.c:489 msgid "Refreshed:" msgstr "Refrescat:" #. translator: last time and date the server answered the query #: ../src/srv-prop.c:507 msgid "Last answer:" msgstr "Última resposta:" #: ../src/srv-prop.c:564 msgid "Reserved Slots:" msgstr "Llocs reservats:" #. Sources #: ../src/srv-prop.c:583 msgid "Sources" msgstr "Fonts" #: ../src/srv-prop.c:635 msgid "Custom CFG:" msgstr "CFG personalitzada:" #: ../src/srv-prop.c:684 msgid "Server Password" msgstr "Contrasenya del servidor" #: ../src/srv-prop.c:690 msgid "Spectator Password" msgstr "Contrasenya d'espectador" #: ../src/srv-prop.c:697 msgid "RCon/Admin Password" msgstr "Contrasenya d'RCon/Admin" #: ../src/srv-prop.c:728 msgid "This server sucks" msgstr "Aquest servidor és dolent" #: ../src/srv-prop.c:771 ../src/xqf.c:2603 ../src/xqf.c:2741 msgid "Properties" msgstr "Propietats" #: ../src/srv-prop.c:816 msgid "Info" msgstr "Info" #: ../src/srv-prop.c:821 msgid "Passwords" msgstr "Contrasenyes" #: ../src/srv-prop.c:826 msgid "Comment" msgstr "Comentari" #: ../src/stat.c:728 msgid "Allies" msgstr "Aliats" #: ../src/stat.c:728 msgid "Axis" msgstr "Eix" #: ../src/stat.c:734 msgid "Red" msgstr "Roig" #: ../src/stat.c:734 msgid "Blue" msgstr "Blau" #: ../src/stat.c:1376 #, c-format msgid "" "UT2004 CD Key not found, cannot query master '%s'.\n" "Make sure the working directory is set correctly." msgstr "" "No s'ha trobat la clau del CD de l'UT2004, no es pot consultar el mestre «%" "s».\n" "Assegureu-vos que el directori de treball està establert correctament." #: ../src/stat.c:1559 #, c-format msgid "Failed to create a temporary file %s: %s" msgstr "No s'ha pogut crear un fitxer temporal %s: %s" #. The space behind up and down is to make the strings different from #. those in flt-player.c because their meaning is different in german #: ../src/statistics.c:82 ../src/statistics.c:93 msgid "Servers" msgstr "Servidors" #: ../src/statistics.c:82 msgid "Up " msgstr "Funcionals " #: ../src/statistics.c:82 msgid "Timeout" msgstr "Temps d'espera" #: ../src/statistics.c:82 msgid "Down " msgstr "Caiguts " #: ../src/statistics.c:82 msgid "Info n/a" msgstr "Info n/d" #: ../src/statistics.c:82 ../src/statistics.c:504 ../src/xqf-ui.c:88 msgid "Players" msgstr "Jugadors" #: ../src/statistics.c:86 ../src/statistics.c:90 msgid "unknown" msgstr "desconegut" #: ../src/statistics.c:94 msgid "OS/CPU" msgstr "SO/CPU" #: ../src/statistics.c:95 ../src/xqf-ui.c:65 msgid "Country" msgstr "País" #: ../src/statistics.c:450 ../src/statistics.c:498 ../src/statistics.c:503 msgid "Total" msgstr "Total" #: ../src/statistics.c:493 msgid "CPU \\ OS" msgstr "CPU \\ SO" #: ../src/statistics.c:721 msgid "All Games" msgstr "Tots els jocs" #: ../src/statistics.c:803 ../src/statistics.c:812 msgid "Statistics" msgstr "Estadístiques" #. error converting time to string representation, shouldn't happen #: ../src/utils.c:903 msgid "" msgstr "" #: ../src/utils.c:1126 msgid "Can't open source file for reading" msgstr "No es pot obrir el fitxer de font per a lectura" #: ../src/utils.c:1133 msgid "Can't open destination file for writing" msgstr "No es pot obrir el fitxer de destí per a escriptura" #: ../src/utils.c:1141 msgid "write error on destination file" msgstr "s'ha produït un error d'escriptura al fitxer de destinació" #: ../src/utils.c:1148 msgid "read error on source file" msgstr "s'ha produit un error de lectura al fitxer font" #: ../src/xqf-ui.c:58 msgid "Type" msgstr "Tipus" #: ../src/xqf-ui.c:61 msgid "Address" msgstr "Adreça" #: ../src/xqf-ui.c:68 ../src/xqf-ui.c:153 msgid "Ping" msgstr "Ping" #: ../src/xqf-ui.c:74 msgid "TO" msgstr "TO" #: ../src/xqf-ui.c:80 msgid "Priv" msgstr "Priv" #. Translator: "PunkBuster" #: ../src/xqf-ui.c:85 msgid "PB" msgstr "PB" #. Translator: Max as in max players #: ../src/xqf-ui.c:93 msgid "Max" msgstr "Màx" #: ../src/xqf-ui.c:96 msgid "Map" msgstr "Mapa" #: ../src/xqf-ui.c:108 msgid "GameType" msgstr "Tipus de joc" #: ../src/xqf-ui.c:135 msgid "Frags" msgstr "Frags" #: ../src/xqf-ui.c:147 msgid "Skin" msgstr "Pell" #: ../src/xqf-ui.c:159 msgid "Time" msgstr "Temps" #: ../src/xqf-ui.c:179 msgid "Rule" msgstr "Regla" #: ../src/xqf-ui.c:185 msgid "Value" msgstr "Valor" #: ../src/xqf-ui.c:575 msgid "Source" msgstr "Font" #: ../src/xqf.c:349 #, c-format msgid "%d server" msgstr "%d servidor" #: ../src/xqf.c:349 #, c-format msgid "%d servers" msgstr "%d servidors" #. server filter #: ../src/xqf.c:597 #, c-format msgid "None <--" msgstr "Cap <--" #: ../src/xqf.c:599 ../src/xqf.c:3201 ../src/xqf.c:3258 ../src/xqf.c:3403 #, c-format msgid "None" msgstr "Cap" #: ../src/xqf.c:613 #, c-format msgid "Filter %d <--" msgstr "Filtre %d <--" #: ../src/xqf.c:615 #, c-format msgid "Filter %d" msgstr "Filtre %d" #: ../src/xqf.c:637 #, c-format msgid "No Server Filter Active" msgstr "No hi ha filtres de servidors actius" #: ../src/xqf.c:644 #, c-format msgid "Server Filter: %s" msgstr "Filtre de servidor: %s" #: ../src/xqf.c:648 #, c-format msgid "Server Filter: %d" msgstr "Filtre de servidor: %d" #: ../src/xqf.c:815 msgid "Updating lists..." msgstr "S'estan actualitzant les llistes..." #: ../src/xqf.c:821 #, c-format msgid "Resolving host names: %d/%d" msgstr "S'estan resolguent els noms dels servidors: %d/%d" #: ../src/xqf.c:825 #, c-format msgid "Refreshing: %d/%d" msgstr "S'està refrescant: %d/%d" #: ../src/xqf.c:831 #, c-format msgid "Resolving host addresses: %d/%d" msgstr "S'estan resolguent les adreces dels servidors: %d/%d" #: ../src/xqf.c:958 msgid "" "You said this servers sucks.\n" "Do you want to risk a game this time?" msgstr "" "Heu dit que aquest servidor és dolent.\n" "Esteu segur de voler avorrir-vos de nou?" #: ../src/xqf.c:970 #, c-format msgid "" "This server is not compatible with the version of %s you have installed.\n" "Launch client anyway?" msgstr "" "Aquest servidor no és compatible amb la versió de %s que teniu instal·lada.\n" "Voleu executar el client de totes maneres?" #: ../src/xqf.c:982 #, c-format msgid "" "Server %s:%d is %s.\n" "\n" "Launch client anyway?" msgstr "" "El servidor %s:%d està %s.\n" "\n" "Voleu executar el client de totes maneres?" #: ../src/xqf.c:995 #, c-format msgid "" "Server %s:%d is full.\n" "\n" "Launch client anyway?" msgstr "" "El servidor %s:%d està ple.\n" "\n" "Voleu executar el client de totes maneres?" #: ../src/xqf.c:1108 ../src/xqf.c:1128 ../src/xqf.c:2003 msgid "Save Password" msgstr "Desa la contrasenya" #: ../src/xqf.c:1108 msgid "Spectator Password:" msgstr "Contrasenya d'espectador:" #: ../src/xqf.c:1128 ../src/xqf.c:2003 msgid "Server Password:" msgstr "Contrasenya del servidor:" #: ../src/xqf.c:1279 msgid "Spectator" msgstr "Espectador" #: ../src/xqf.c:1280 ../src/xqf.c:1283 msgid "Demo name:" msgstr "Nom de la demo:" #: ../src/xqf.c:1525 #, c-format msgid "Host %s not found" msgstr "No s'ha trobat el servidor %s" #: ../src/xqf.c:1545 ../src/xqf.c:3815 #, c-format msgid "\"%s\" is not valid host[:port] combination." msgstr "«%s» no és una combinació servidor[:port] vàlida." #: ../src/xqf.c:1646 msgid "Remove selected servers from all lists?" msgstr "Voleu suprimir els servidors seleccionats de totes les llistes?" #. translator: %s == url #: ../src/xqf.c:1791 #, c-format msgid "" "For Gslist support you must install the 'gslist' program available from\n" "%s\n" "Don't forget that you need to run 'gslist -u' before you can use it." msgstr "" "Per al suport de Gslist, heu d'instal·lar el programa «gslist» disponible " "en\n" "%s\n" "No oblideu que heu d'executar «gslist -u» abans de poder utilitzar-lo." #: ../src/xqf.c:1862 msgid "You have to select the server you want to delete" msgstr "Heu de seleccionar el servidor que voleu suprimir" #: ../src/xqf.c:1868 #, c-format msgid "" "Master%s to delete:\n" "\n" "%s" msgstr "" "Mestre%s a suprimir:\n" "\n" "%s" #: ../src/xqf.c:1891 #, c-format msgid "Find Player: %s" msgstr "Cerca jugador: %s" #: ../src/xqf.c:1983 msgid "Done." msgstr "Fet." #: ../src/xqf.c:2525 ../src/xqf.c:3081 msgid "Connect" msgstr "Connecta" #: ../src/xqf.c:2530 ../src/xqf.c:3090 msgid "Observe" msgstr "Observa" #: ../src/xqf.c:2535 ../src/xqf.c:3098 msgid "Record Demo" msgstr "Filma demo" #: ../src/xqf.c:2549 msgid "Add new Server" msgstr "Afegeix" #: ../src/xqf.c:2554 msgid "Add to Favorites" msgstr "Afegeix als favorits" #: ../src/xqf.c:2559 msgid "Remove" msgstr "Suprimeix" #: ../src/xqf.c:2564 ../src/xqf.c:2613 msgid "Copy" msgstr "Copia" #: ../src/xqf.c:2569 msgid "Copy+" msgstr "Copia+" #: ../src/xqf.c:2577 ../src/xqf.c:3055 ../src/trayicon.c:452 msgid "Refresh" msgstr "Refresca" #: ../src/xqf.c:2582 msgid "Refresh Selected" msgstr "Refresca els seleccionats" #: ../src/xqf.c:2590 msgid "DNS Lookup" msgstr "Consulta de DNS" #: ../src/xqf.c:2598 msgid "RCon" msgstr "RCon" #: ../src/xqf.c:2621 msgid "_Statistics" msgstr "E_stadístiques" #: ../src/xqf.c:2629 msgid "_Exit" msgstr "_Surt" #: ../src/xqf.c:2640 ../src/xqf.c:2705 msgid "Add _Master" msgstr "Afegeix un _mestre" #: ../src/xqf.c:2645 ../src/xqf.c:2710 msgid "_Rename Master" msgstr "_Reanomena el mestre" #: ../src/xqf.c:2650 ../src/xqf.c:2715 msgid "D_elete Master" msgstr "Suprim_eix el mestre" #: ../src/xqf.c:2655 ../src/xqf.c:2720 msgid "_Clear Servers" msgstr "_Neteja els servidors" #: ../src/xqf.c:2665 ../src/xqf.c:2825 msgid "_Add new Server" msgstr "_Afegeix un nou servidor" #: ../src/xqf.c:2670 ../src/xqf.c:2830 msgid "Add to _Favorites" msgstr "Afegeix a _favorits" #: ../src/xqf.c:2675 ../src/xqf.c:2835 msgid "_Remove" msgstr "_Suprimeix" #: ../src/xqf.c:2680 msgid "_Copy" msgstr "_Copia" #: ../src/xqf.c:2685 msgid "_Copy+" msgstr "_Copia+" #: ../src/xqf.c:2693 msgid "Add Default Masters" msgstr "Afegeix els mestres predeterminats" #: ../src/xqf.c:2699 msgid "Add Gslist Masters" msgstr "Afegeix els mestres Gslist" #: ../src/xqf.c:2728 msgid "_Find Player" msgstr "Cerca _jugador" #: ../src/xqf.c:2733 msgid "Find A_gain" msgstr "Cerca de _nou" #: ../src/xqf.c:2751 msgid "_Refresh" msgstr "_Refresca" #: ../src/xqf.c:2756 msgid "Refresh _Selected" msgstr "Refresca els _seleccionats" #: ../src/xqf.c:2761 msgid "_Update From Master" msgstr "_Actualitza des del mestre" #: ../src/xqf.c:2769 msgid "Show _Host Names" msgstr "Mostra els noms de ser_vidors" #: ../src/xqf.c:2774 msgid "Show Default _Port" msgstr "Mostra els _ports per defecte" #: ../src/xqf.c:2800 msgid "_Connect" msgstr "_Connecta" #: ../src/xqf.c:2805 msgid "_Observe" msgstr "_Observa" #: ../src/xqf.c:2810 msgid "Record _Demo" msgstr "Filma _demo" #: ../src/xqf.c:2841 msgid "DNS _Lookup" msgstr "Cerca de _DNS" #: ../src/xqf.c:2849 msgid "_RCon" msgstr "_Rcon" #: ../src/xqf.c:2854 msgid "_Properties" msgstr "_Propietats" #: ../src/xqf.c:2864 msgid "_General" msgstr "_General" #: ../src/xqf.c:2870 msgid "_Games" msgstr "_Jocs" #: ../src/xqf.c:2876 msgid "_Appearance" msgstr "_Aparença" #: ../src/xqf.c:2882 msgid "_QStat" msgstr "_QStat" #: ../src/xqf.c:2888 msgid "_Sounds" msgstr "_Sons" #: ../src/xqf.c:2894 msgid "S_cripts" msgstr "Se_qüències" #: ../src/xqf.c:2904 msgid "_Server Filter" msgstr "Filtre de _servidors" #: ../src/xqf.c:2909 msgid "Player _Filter" msgstr "_Filtres de jugadors" #: ../src/xqf.c:2919 msgid "_About" msgstr "_Quant a" #: ../src/xqf.c:2930 msgid "_File" msgstr "_Fitxer" #: ../src/xqf.c:2935 msgid "_Edit" msgstr "_Edita" #: ../src/xqf.c:2940 msgid "_View" msgstr "_Visualitza" #: ../src/xqf.c:2945 msgid "_Server" msgstr "_Servidor" #: ../src/xqf.c:2950 msgid "_Preferences" msgstr "_Preferències" #: ../src/xqf.c:2956 msgid "_Server Filters" msgstr "Filtres de _servidors" #: ../src/xqf.c:2962 msgid "_Help" msgstr "A_juda" #: ../src/xqf.c:3005 msgid "Mark as Red" msgstr "Marca en roig" #: ../src/xqf.c:3012 msgid "Mark as Green" msgstr "Marca en verd" #: ../src/xqf.c:3019 msgid "Mark as Blue" msgstr "Marca en blau" #: ../src/xqf.c:3026 msgid "Add to Player Filter" msgstr "Afegeix al filtre de jugadors" #: ../src/xqf.c:3047 ../src/trayicon.c:457 msgid "Update" msgstr "Actualitza" #: ../src/xqf.c:3047 msgid "Update from master" msgstr "Actualitza des del mestre" #: ../src/xqf.c:3055 msgid "Refresh current list" msgstr "Refresca la llista actual" #: ../src/xqf.c:3063 msgid "Ref.Sel." msgstr "Ref.Sel." #: ../src/xqf.c:3063 msgid "Refresh selected servers" msgstr "Refresca els servidors seleccionats" #: ../src/xqf.c:3098 msgid "Record" msgstr "Filma" #. Translators: e.g. Server Filter #: ../src/xqf.c:3116 #, c-format msgid "%s Filter Enable / Disable" msgstr "Habilita / inhabilita el filtre de %s" #. Translators: e.g. Server Filter Configuration #: ../src/xqf.c:3138 #, c-format msgid "%s Filter Configuration" msgstr "Configuració del filtre de %s" #: ../src/xqf.c:3240 msgid "Configure" msgstr "Configura" #: ../src/xqf.c:3383 msgid "Filters" msgstr "Filtres" #: ../src/xqf.c:3552 msgid "Quick Filter:" msgstr "Filtre ràpid:" #: ../src/xqf.c:3729 msgid "no sound player configured" msgstr "no hi ha cap reproductor de so configurat" #: ../src/xqf.c:3767 msgid "" "Usage:\n" "\txqf [OPTIONS]\n" "\n" "OPTIONS:\n" "\t--launch \"[SERVERTYPE] IP\"\tlaunch game on specified server\n" "\t--add \"[SERVERTYPE] IP\"\tadd specified server to favorites\n" "\t--debug \t\t\tset debug level\n" "\t--version\t\t\tprint version and exit\n" msgstr "" "Forma d'ús:\n" "\txqf [OPCIONS]:\n" "\n" "OPCIONS:\n" "\t--launch «[TIPUSDESERVIDOR] IP»\tllança el joc al servidor especificat\n" "\t--add «[TIPUSDESERVIDOR] IP»\tafegeix el servidor especificat als " "favorits\n" "\t--debug \t\t\testableix el nivell de depuració\n" "\t--version\t\t\tmostra la versió i surt\n" #: ../src/xqf.c:4019 msgid "Reading server lists" msgstr "S'estan llegint les llistes de servidors" #: ../src/xqf.c:4036 #, c-format msgid "You need at least qstat version %s for xqf to function properly" msgstr "" "Necessiteu al menys la versió %s de qstat per a que xqf funcione correctament" #: ../src/xqf.c:4040 msgid "Loading icons ..." msgstr "S'estan carregant les icones..." #: ../src/xqf.c:4046 msgid "Starting ..." msgstr "S'està iniciant..." #: ../src/splash.c:61 msgid "XQF: Loading" msgstr "XQF: S'està carregant" #: ../src/splash.c:90 msgid "Loading ..." msgstr "S'està carregant..." #. translator: %s = file name #: ../src/country-filter.c:220 ../src/loadpixmap.c:213 ../src/loadpixmap.c:226 #: ../src/loadpixmap.c:245 ../src/loadpixmap.c:257 #, c-format msgid "Error loading pixmap file: %s" msgstr "S'ha produït un error en carregar el fitxer de mapa de píxels: %s" #: ../src/trayicon.c:376 ../src/trayicon.c:382 ../src/trayicon.c:390 #: ../src/trayicon.c:396 ../src/trayicon.c:410 #, c-format msgid "Error in file: %s line: %d\n" msgstr "Hi ha un error al fitxer: %s línia: %d\n" #. translator: show main window #: ../src/trayicon.c:473 msgid "Show" msgstr "Mostra" #. translator: hide main window #: ../src/trayicon.c:479 msgid "Hide" msgstr "Amaga" #: ../src/trayicon.c:484 msgid "Exit" msgstr "Surt" #~ msgid "XQF" #~ msgstr "XQF" #~ msgid "vm_cgame fix" #~ msgstr "arreglament per a vm_cgame" #~ msgid "Rocketarena fix" #~ msgstr "arreglament per a rocketarena" #~ msgid "Remove from Favorites" #~ msgstr "Suprimeix dels favorits" #~ msgid "_Remove from Favorites" #~ msgstr "Sup_rimeix dels favorits" #~ msgid "QuakeForge workaround (uses base/ instead of id1/)" #~ msgstr "Alternativa per a QuakeForge (utilitza base/ en comptes de id1/)" #~ msgid "OS" #~ msgstr "SO" #~ msgid "_QStat Options" #~ msgstr "Opcions de _QStat" #~ msgid "_Sound Options" #~ msgstr "Opcio_ns de so" #~ msgid "nothing yet..." #~ msgstr "res encara..." #~ msgid "Generic Gamespy" #~ msgstr "Gamespy genèric" #~ msgid "Guess" #~ msgstr "Endevina" #~ msgid "Game browser for X" #~ msgstr "Navegador de jocs per X" #~ msgid "X11 Quake/QuakeWorld/Quake2/Quake3 Front-End\n" #~ msgstr "Interfície X11 per a Quake/QuakeWorld/Quake2/Quake3\n" #~ msgid "Significant Contributors:" #~ msgstr "Contribuïdors significants:" #~ msgid "" #~ "http://www.linuxgames.com/xqf\n" #~ "http://sourceforge.net/projects/xqf\n" #~ "\n" #~ msgstr "" #~ "http://www.linuxgames.com/xqf/\n" #~ "http://sourceforge.net/projects/xqf/\n" #~ msgid "" #~ "Significant Contributors:\n" #~ "\n" #~ "Bill Adams \n" #~ "Alex Burger \n" #~ "Jordi Mallach \n" #~ "Ludwig Nussel \n" #~ "\n" #~ msgstr "" #~ "Contribuïdors significatius:\n" #~ "\n" #~ "Bill Adams \n" #~ "Alex Burger \n" #~ "Jordi Mallach \n" #~ "Ludwig Nussel \n" #~ "\n" #~ msgid "" #~ "Other Contributors:\n" #~ "\n" #~ "Jochen Baier \n" #~ "\n" #~ msgstr "" #~ "Altres contribuïdors:\n" #~ "\n" #~ "Jochen Baier \n" #~ "\n" #~ msgid "" #~ "Bug reports:\n" #~ "\n" #~ "http://sourceforge.net/projects/xqf\n" #~ "\n" #~ msgstr "" #~ "Informes d'error:\n" #~ "\n" #~ "http://sourceforge.net/projects/xqf/\n" #~ "\n" #~ msgid "" #~ "Feature requests:\n" #~ "\n" #~ "http://www.linuxgames.com/xqf Forums section\n" #~ msgstr "" #~ "Peticions de millores:\n" #~ "\n" #~ "http://www.linuxgames.com/xqf Forums section\n" #~ msgid "Domain:" #~ msgstr "Domini:" #~ msgid "" #~ "Example:Domain \"US CA\" ->Show only server from United States and Canada" #~ msgstr "" #~ "Exemple:Domini «US CA» -> Només mostra servidors dels Estats Units i " #~ "Canadà" #~ msgid "Add" #~ msgstr "Afegeix" #~ msgid "Replace" #~ msgstr "Reemplaça" #~ msgid "%s Filter" #~ msgstr "Filtre de %s" #~ msgid "_Add Server" #~ msgstr "_Afegeix servidor" #~ msgid "_Delete" #~ msgstr "E_limina" #~ msgid "The Game Type Contains the String:" #~ msgstr "El tipus de joc conté la cadena" #~ msgid "Filter Name (For Menu):" #~ msgstr "Nom del filtre (per al menú):" xqf-1.0.5/po/da.po0000644002404400000620000012672210520643117010603 00000000000000# Danish translation of XQF. # Copyright (C) 2002-2005 Free Software Foundation, Inc. # Morten Brix Pedersen , 2002-2005. # msgid "" msgstr "" "Project-Id-Version: xqf 1.0.2\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2006-10-28 13:56+0200\n" "PO-Revision-Date: 2005-02-03 14:09+0200\n" "Last-Translator: Morten Brix Pedersen \n" "Language-Team: Danish \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../xqf.desktop.in.h:1 #, fuzzy msgid "Game Server Browser" msgstr "XQF spilserver browser" #: ../xqf.desktop.in.h:2 msgid "Locate and connect to game servers" msgstr "Find og forbind til spilservere" #: ../xqf.desktop.in.h:3 ../src/dialogs.c:492 msgid "XQF Game Server Browser" msgstr "XQF spilserver browser" #: ../src/addmaster.c:111 msgid "You have to specify a name and an address." msgstr "Du skal angive et navn og en adresse." #: ../src/addmaster.c:118 #, c-format msgid "Master address \"%s\" is not valid." msgstr "Master adresse \"%s\" er ikke gyldig." #: ../src/addmaster.c:174 ../src/source.c:69 msgid "LAN" msgstr "LAN" #: ../src/addmaster.c:245 msgid "Rename Master" msgstr "Omdøb master" #: ../src/addmaster.c:249 msgid "Add Master" msgstr "Tilføj master" #. Master Name (Description) #: ../src/addmaster.c:263 msgid "Master Name" msgstr "Master navn" #. Master Address #: ../src/addmaster.c:319 msgid "Master Address" msgstr "Master adresse" #. Cancel Button #: ../src/addmaster.c:409 ../src/addserver.c:152 ../src/dialogs.c:421 #: ../src/filter.c:1619 ../src/filter.c:2122 ../src/game.c:1819 #: ../src/launch.c:339 ../src/pref.c:4784 ../src/psearch.c:224 #: ../src/redial.c:227 ../src/srv-prop.c:841 ../src/xqf.c:981 ../src/xqf.c:994 #: ../src/xqf.c:1867 msgid "Cancel" msgstr "Annullér" #: ../src/addserver.c:91 ../src/addserver.c:188 msgid "Add Server" msgstr "Tilføj server" #. Server Entry #: ../src/addserver.c:102 msgid "Server:" msgstr "Server:" #: ../src/dialogs.c:124 ../src/dialogs.c:199 ../src/dialogs.c:279 msgid "XQF: Warning!" msgstr "XQF: Advarsel!" #. OK Button #. gtk_button_box_set_child_size(GTK_BUTTON_BOX(hbuttonbox1), 79, 38); #. OK Button #: ../src/dialogs.c:149 ../src/dialogs.c:410 ../src/dialogs.c:600 #: ../src/filter.c:1630 ../src/filter.c:2110 ../src/pref.c:4792 #: ../src/psearch.c:213 ../src/srv-prop.c:849 msgid "OK" msgstr "OK" #: ../src/dialogs.c:224 ../src/dialogs.c:304 ../src/filter.c:1050 #: ../src/psearch.c:398 ../src/xqf.c:957 ../src/xqf.c:969 ../src/xqf.c:1645 msgid "Yes" msgstr "Ja" #: ../src/dialogs.c:236 ../src/dialogs.c:316 ../src/filter.c:1051 #: ../src/psearch.c:398 ../src/xqf.c:957 ../src/xqf.c:969 ../src/xqf.c:1645 msgid "No" msgstr "Nej" #: ../src/dialogs.c:326 ../src/xqf.c:994 msgid "Redial" msgstr "Ring op igen" #: ../src/dialogs.c:493 #, c-format msgid "Version %s" msgstr "Version %s" #. translators can use the copyright symbol instead of (C) #: ../src/dialogs.c:496 msgid "Copyright (C) 1998-2002 Roman Pozlevich" msgstr "Ophavsret (C) 1998-2002 Roman Pozlevich" #: ../src/dialogs.c:499 msgid "Maintainers:" msgstr "Vedligeholdere:" #: ../src/dialogs.c:505 msgid "Contributors:" msgstr "Bidragsydere:" #: ../src/dialogs.c:509 msgid "Bug reports and feature requests:" msgstr "Fejlrapporter og feature forslag:" #: ../src/dialogs.c:556 msgid "About XQF" msgstr "Om XQF" #: ../src/dialogs.c:583 msgid "[placeholder, do not translate]" msgstr "[placeholder, do not translate]" #: ../src/filter.c:97 msgid "Server" msgstr "Server" #: ../src/filter.c:98 msgid "S Filter" msgstr "S Filter" #: ../src/filter.c:99 msgid "SF Cfg" msgstr "SF Cfg" #: ../src/filter.c:111 msgid "Player" msgstr "Spiller" #: ../src/filter.c:112 msgid "P Filter" msgstr "P Filter" #: ../src/filter.c:113 msgid "PF Cfg" msgstr "PF Cfg" #: ../src/filter.c:1011 msgid "Enter filter name" msgstr "Indtast filter navn" #: ../src/filter.c:1049 msgid "Delete server filter" msgstr "Slet server filter" #: ../src/filter.c:1052 #, c-format msgid "Really delete server filter \"%s\"?" msgstr "Vil du virkelig slette server filter \"%s\"?" #: ../src/filter.c:1257 msgid "Server Filter" msgstr "Server filter" #: ../src/filter.c:1271 ../src/flt-player.c:821 ../src/pref.c:2821 msgid "New" msgstr "Ny" #: ../src/filter.c:1278 msgid "Rename" msgstr "Omdøb" #. FIXME: plural #: ../src/filter.c:1285 ../src/flt-player.c:827 ../src/pref.c:2829 #: ../src/xqf.c:1867 msgid "Delete" msgstr "Slet" #: ../src/filter.c:1292 msgid "Server would pass filter if" msgstr "Server vil passere filter hvis" #. row=0..1 #. max ping #: ../src/filter.c:1313 msgid "ping is less than" msgstr "ping er mindre end" #. GAMECONTAINS Filter -- baa #. http://developer.gnome.org/doc/API/gtk/gtktable.html #: ../src/filter.c:1334 msgid "the game contains the string" msgstr "spillet indeholder strengen" #. row=1..2 #. max timeouts #: ../src/filter.c:1352 msgid "the number of retries is fewer than" msgstr "antallet af forsøg er mindre end" #. GAMETYPE Filter -- baa #. http://developer.gnome.org/doc/API/gtk/gtktable.html #: ../src/filter.c:1371 msgid "the game type contains the string" msgstr "spil typen indeholder strengen" #. row=2..3 #. not full #: ../src/filter.c:1388 msgid "it is not full" msgstr "er ikke fuld" #. Version Filter -- baa #: ../src/filter.c:1395 msgid "the version contains the string" msgstr "versions nummeret indeholder strengen" #: ../src/filter.c:1414 msgid "it is not empty" msgstr "er ikke tom" #. Map filter #: ../src/filter.c:1423 msgid "the map contains the string" msgstr "banen indeholder strengen" #: ../src/filter.c:1441 msgid "cheats are not allowed" msgstr "snydekoder er ikke tilladt" #. Server name filter #: ../src/filter.c:1450 msgid "the server name contains the string" msgstr "server navnet indeholder strengen" #: ../src/filter.c:1468 msgid "no password required" msgstr "ingen adgangskode krævet" #: ../src/filter.c:1479 ../src/filter.c:1958 msgid "Country filter:" msgstr "Landefilter:" #: ../src/filter.c:1520 msgid "select..." msgstr "vælg..." #: ../src/filter.c:1533 msgid "clear" msgstr "ryd" #: ../src/filter.c:1591 msgid "XQF: Filters" msgstr "XQF: Filtre" #. window caption for country filter #: ../src/filter.c:1949 msgid "Configure Country Filter" msgstr "Opsæt landefilter" #: ../src/filter.c:2091 msgid "Show all countries" msgstr "Vis alle lande" #: ../src/flt-player.c:69 ../src/flt-player.c:75 msgid "string" msgstr "streng" #: ../src/flt-player.c:70 msgid "substr" msgstr "del af streng" #: ../src/flt-player.c:71 msgid "regexp" msgstr "regulært udtryk" #: ../src/flt-player.c:76 msgid "substring" msgstr "del af streng" #: ../src/flt-player.c:77 msgid "regular expression" msgstr "regulært udtryk" #: ../src/flt-player.c:448 ../src/psearch.c:116 msgid "XQF: Error" msgstr "XQF: Fejl" #: ../src/flt-player.c:448 ../src/psearch.c:117 #, c-format msgid "" "Regular Expression Error!\n" "\n" "%s\n" "\n" "%s." msgstr "" "Fejl i Regulært Udtryk!\n" "\n" "%s\n" "\n" "%s." #. Pattern Entry #: ../src/flt-player.c:666 ../src/flt-player.c:754 msgid "Pattern" msgstr "Mønster" #. Comment #: ../src/flt-player.c:701 msgid "Pattern Comment" msgstr "Mønster Kommentar" #: ../src/flt-player.c:754 msgid "Mode" msgstr "Mode" #: ../src/flt-player.c:760 msgid "Player Filter" msgstr "Spiller Filter" #: ../src/flt-player.c:839 msgid "Up" msgstr "Op" #: ../src/flt-player.c:845 msgid "Down" msgstr "Ned" #: ../src/game.c:212 msgid "" "Note: Soldier of Fortune will not connect to a server correctly\n" "without creating a startup script for the game. Please see the\n" "XQF documentation for more information." msgstr "" "Bemærk: Soldier of Fortune vil ikke forbinde til en server korrekt\n" "før du opretter et opstarts skript til spillet. Se XQF dokumentationen\n" "for flere oplysninger." #: ../src/game.c:216 msgid "" "Note: Unreal Tournament will not launch correctly without\n" "modifications to the game's startup script. Please see the\n" "XQF documentation for more information." msgstr "" "Bemærk: Unreal Tournament vil ikke starte korrekt uden\n" "ændringer i spillets opstarts skript. Se XQF dokumentationen\n" "for flere oplysninger." #: ../src/game.c:220 msgid "Sample Command Line: wine hl.exe -- hl.exe -console" msgstr "Eksempel på kommandolinje: wine hl.exe -- hl.exe -console" #: ../src/game.c:223 msgid "" "Note: Savage will not launch correctly without\n" "modifications to the game's startup script. Please see the\n" "XQF documentation for more information." msgstr "" "Bemærk: Savage Tournament vil ikke starte korrekt uden\n" "ændringer i spillets opstarts skript. Se XQF dokumentationen\n" "for flere oplysninger." #. %s = game name e.g. QuakeWorld #: ../src/game.c:1691 #, c-format msgid "%s command line is empty." msgstr "%s kommando linje er tom." #. directory name, game name #. %s directory, game name #: ../src/game.c:1698 ../src/game.c:1807 #, c-format msgid "" "\"%s\" is not a directory\n" "Please specify correct %s working directory." msgstr "" "\"%s\" er ikke en mappe\n" "Venligst specificer en korrekt %s arbejdsmappe." #. game name #: ../src/game.c:1710 #, c-format msgid "Please specify correct %s working directory." msgstr "Venligst specificer en korrekt %s arbejdsmappe." #. directory, subdirectory, game name #: ../src/game.c:1716 #, c-format msgid "" "Directory \"%s\" doesn't contain \"%s\" subdirectory.\n" "Please specify correct %s working directory." msgstr "" "Mappe \"%s\" indeholder ikke \"%s\" undermappe.\n" "Venligst specificer en korrekt %s arbejdsmappe." #. %s Quake3 #: ../src/game.c:1773 #, c-format msgid "" "~/.q3a directory doesn't exist or doesn't contain\n" "\"baseq3\" (\"demoq3\") subdirectory.\n" "Please run %s client at least once before running XQF\n" "or specify correct %s working directory." msgstr "" "~/.q3a mappen eksisterer ikke eller indeholder ikke\n" "\"baseq3\" (\"demoq3\") undermappen.\n" "Kør %s klient mindst en gang før du kører XQF\n" "eller angiv en korrekt %s arbejdsmappe" #. %s directory, Quake3 #: ../src/game.c:1782 #, c-format msgid "" "\"%s\" directory doesn't exist or doesn't contain \"baseq3\" (\"demoq3\") " "subdirectory.\n" "Please specify correct %s working directory\n" "or leave it empty (~/.q3a is used by default)" msgstr "" "\"%s\" eksisterer ikke, eller indeholder ikke \"baseq3\" (\"demoq3\") " "undermappen.\n" "Angiv en korrekt %s arbejdsmappe\n" "eller lad den være tom (~/.q3a) er brugt som standard)" #: ../src/game.c:1819 ../src/launch.c:339 ../src/xqf.c:981 ../src/xqf.c:994 msgid "Launch" msgstr "Kør" #. %s frontend.cfg #: ../src/game.c:1821 #, c-format msgid "" "Cannot write to file \"%s\".\n" "\n" "Launch client anyway?" msgstr "" "Kan ikke skrive til fil \"%s\".\n" "\n" "Kør klient alligevel?" #: ../src/game.c:2448 msgid "" "The server has Punkbuster enabled but it is not going\n" "to be set on the command line.\n" "You may have problems connecting.\n" "You can fix this in the game preferences." msgstr "" "Serveren har Punkbuster sat til, men det bliver ikke sat på kommandolinjen\n" "Du vil måske opleve problemer.\n" "Du kan rette dette i spillets præferencer." #: ../src/launch.c:70 ../src/launch.c:195 msgid "XQF: ERROR!" msgstr "XQF: Fejl!" #: ../src/launch.c:70 #, c-format msgid "" "ERROR!\n" "\n" "%s(%s) failed: %s" msgstr "" "FEJL!\n" "\n" "%s(%s) fejlede: %s" #: ../src/launch.c:195 #, c-format msgid "" "ERROR!\n" "\n" "%s" msgstr "" "FEJL!\n" "\n" "%s" #: ../src/launch.c:340 #, c-format msgid "" "There is %s client running.\n" "\n" "Launch %s client?" msgstr "" "Der er %s klienter kørende.\n" "\n" "Kør %s klient?" #: ../src/pref.c:646 msgid "com_soundmegs and com_zonemegs must be lower than com_hunkmegs" msgstr "com_soundmegs og com_zonemegs skal være lavere end com_hunkmegs" #: ../src/pref.c:1232 msgid "Invalid source IP address" msgstr "Ugyldig kilde IP-adresse" #: ../src/pref.c:1244 msgid "Invalid source port range" msgstr "Ugyldig kilde port område" #. Top (Shirt) Color #: ../src/pref.c:1592 ../src/pref.c:1691 msgid "Top" msgstr "Top" #. Bottom (Pants) Color #: ../src/pref.c:1608 ../src/pref.c:1707 msgid "Bottom" msgstr "Bund" #. Player Name #: ../src/pref.c:1854 ../src/pref.c:1965 ../src/pref.c:2025 ../src/pref.c:2077 #: ../src/xqf-ui.c:54 ../src/xqf-ui.c:129 msgid "Name" msgstr "Navn" #: ../src/pref.c:1875 ../src/xqf-ui.c:141 msgid "Colors" msgstr "Farver" #: ../src/pref.c:1908 msgid "Login name" msgstr "Login navn" #: ../src/pref.c:1950 msgid "Skin/Colors" msgstr "Skin/Farver" #: ../src/pref.c:1986 msgid "Team" msgstr "Hold" #: ../src/pref.c:2044 msgid "Model/Skin" msgstr "Model/Skin" #: ../src/pref.c:2131 msgid "--- Anything ---" msgstr "--- Hvad som helst ---" #: ../src/pref.c:2132 msgid "Axe" msgstr "Økse" #: ../src/pref.c:2133 msgid "Shotgun" msgstr "Haglgevær" #: ../src/pref.c:2134 msgid "Super Shotgun" msgstr "Super haglgevær" #: ../src/pref.c:2135 msgid "Nailgun" msgstr "" #: ../src/pref.c:2136 msgid "Super Nailgun" msgstr "" #: ../src/pref.c:2137 msgid "Grenade Launcher" msgstr "Granat kaster" #: ../src/pref.c:2138 msgid "Rocket Launcher" msgstr "Raket kaster" #: ../src/pref.c:2139 msgid "ThunderBolt" msgstr "" #: ../src/pref.c:2187 msgid "Use skins" msgstr "Brug skins" #: ../src/pref.c:2193 msgid "Don't use skins" msgstr "Brug ikke skins" #: ../src/pref.c:2199 msgid "Don't download new skins" msgstr "Hent ikke nye skins" #: ../src/pref.c:2241 msgid "You must configure a command line first" msgstr "Du skal sætte en kommandolinje op først" #: ../src/pref.c:2283 msgid "Game not found" msgstr "Spil ikke fundet" #. %s name of a game #: ../src/pref.c:2285 #, c-format msgid "%s not found" msgstr "%s ikke fundet" #: ../src/pref.c:2333 #, c-format msgid "" "An entry already exists for the game %s.\n" "\n" "A default entry for this game will not be added.\n" "\n" "Delete the entry and try again." msgstr "" "En post eksisterer allerede for spillet %s.\n" "\n" "En standard post kunne ikke blive tilføjet.\n" "\n" "Slet posten og prøv igen." #: ../src/pref.c:2375 msgid "There are no defaults for this game" msgstr "Der er ingen standard værdier for dette spil" #: ../src/pref.c:2436 msgid "" "There is already an entry for this game.\n" "\n" "To modify it, select it from the list, modify it\n" "and then click Add/Update." msgstr "" "Der er allerede en post for dette spil.\n" "\n" "For at redigere det, så vælg det fra listen, rediger det256MB" msgstr ">256MB" #: ../src/pref.c:3355 ../src/pref.c:3584 ../src/pref.c:3590 msgid "Options" msgstr "Indstillinger" #: ../src/pref.c:3358 msgid "Memory" msgstr "Hukommelse" #. QW Specific Features #. 'w_switch' & 'b_switch' control #: ../src/pref.c:3387 msgid "The highest weapon that Quake should switch to..." msgstr "Det højeste våben som Quake skal skifte til..." #: ../src/pref.c:3400 msgid "upon a weapon pickup" msgstr "ved våbenopsamling" #: ../src/pref.c:3418 msgid "upon a backpack pickup" msgstr "ved rygtaskeopsamling" #: ../src/pref.c:3439 msgid "Disable auto-aiming" msgstr "Deaktivér automatisk-sigte" #: ../src/pref.c:3477 msgid "Skins" msgstr "" #: ../src/pref.c:3499 msgid "Rate" msgstr "" #. 'pushlatency' #: ../src/pref.c:3523 msgid "pushlatency" msgstr "pushlatency" #. Troubleshooting #: ../src/pref.c:3538 msgid "Troubleshooting" msgstr "Fejlfinding" #: ../src/pref.c:3551 msgid "Disable delta-compression (cl_nodelta)" msgstr "Deaktivér delta-kompression (cl_nodelta)" #: ../src/pref.c:3565 msgid "Disable player/entity prediction (cl_predict_players)" msgstr "Deaktivér spiller/enheds forudsigelse (cl_predict_players)" #: ../src/pref.c:3583 msgid "Weapons" msgstr "Våben" #: ../src/pref.c:3585 ../src/pref.c:3591 ../src/pref.c:3596 ../src/pref.c:3601 msgid "Player Profile" msgstr "Spiller profil" #: ../src/pref.c:3677 msgid "Icons" msgstr "Ikoner" #: ../src/pref.c:3677 msgid "Text" msgstr "Tekst" #: ../src/pref.c:3677 msgid "Both" msgstr "Begge" #: ../src/pref.c:3683 msgid "Server List" msgstr "Serverliste" #: ../src/pref.c:3696 msgid "Show host names" msgstr "Vis værtsnavne" #: ../src/pref.c:3701 msgid "Show hostnames instead of IP addresses if possible" msgstr "Vis værtsnavne istedet for IP-adresser hvis muligt" #: ../src/pref.c:3712 msgid "Show default port" msgstr "Vis standard port" #: ../src/pref.c:3727 msgid "Do not count bots as players" msgstr "Tæl ikke bots som spillere" #: ../src/pref.c:3743 msgid "Sort servers real-time during refresh" msgstr "Sortér servere i reel-tid når der opdateres" #: ../src/pref.c:3758 msgid "Refresh on update" msgstr "Genopfrisk ved opdatering" #: ../src/pref.c:3774 msgid "Resolve hostnames on update" msgstr "Slå værtsnavne op ved opdatering" #: ../src/pref.c:3778 msgid "Enable or disable DNS resolution of IP addresses" msgstr "Aktiver eller deaktiver DNS opslag af IP adresser" #: ../src/pref.c:3792 msgid "Show only configured games" msgstr "Vis kun konfigurerede spil" #: ../src/pref.c:3808 msgid "Use custom color settings" msgstr "" #: ../src/pref.c:3810 msgid "" "Use XQF's color settings instead of the system ones. You need to restart XQF " "for this setting to take effect. Note that you may need to install the gtk-" "engines package." msgstr "" #. Toolbar #: ../src/pref.c:3831 msgid "Toolbar" msgstr "Værktøjslinje" #. Toolbar Tips #: ../src/pref.c:3856 msgid "Tooltips" msgstr "Værktøjstips" #. On Startup #: ../src/pref.c:3899 msgid "On Startup" msgstr "Ved Programmets Opstart" #: ../src/pref.c:3912 msgid "Refresh Favorites" msgstr "Opdater Favoritter" #: ../src/pref.c:3925 msgid "Show splash screen" msgstr "Vis opstartsskærm" #: ../src/pref.c:3939 msgid "Scan for maps" msgstr "Skan efter kort/baner" #: ../src/pref.c:3944 msgid "" "Scan game directories for installed maps. xqf will take longer to start up " "when enabled." msgstr "" "Skan spil mapperne efter installerede kort/baner. xqf vil tage længere tid " "om at starte op, når denne er slået til" #: ../src/pref.c:3951 msgid "scan now" msgstr "skan nu" #: ../src/pref.c:3967 msgid "Minimize to system tray" msgstr "" #: ../src/pref.c:3971 msgid "Enable xqf tray icon. You need to restart xqf for this to take effect." msgstr "" #. On Exit #: ../src/pref.c:3984 msgid "On Exit" msgstr "Ved Afslutning" #: ../src/pref.c:3997 msgid "Save server lists" msgstr "Gem server lister" #: ../src/pref.c:4012 msgid "Save server information" msgstr "Gem server information" #: ../src/pref.c:4029 msgid "Save player information" msgstr "Gem spiller information" #. When launching a Game #: ../src/pref.c:4045 msgid "When launching a game..." msgstr "Når et spil startes..." #: ../src/pref.c:4059 msgid "Terminate XQF" msgstr "Afslut XQF" #: ../src/pref.c:4074 msgid "Iconify XQF window" msgstr "Minimer XQF vindue" #: ../src/pref.c:4089 msgid "Create LaunchInfo.txt" msgstr "Opret LaunchInfo.txt" #: ../src/pref.c:4095 msgid "" "Creates the file ~/.qf/LaunchInfo.txt with: ping ip:port name map curplayers " "maxplayers" msgstr "" "Opretter filen ~/.qf/LaunchInfo.txt med: ping ip:port name map curplayers " "maxplayers" #: ../src/pref.c:4101 msgid "Execute prelaunch" msgstr "Eksekver pre-start fil" #: ../src/pref.c:4107 msgid "Executes ~/.qf/PreLaunch (if it exists) before launching the game" msgstr "Eksekverer ~/.qf/PreLaunch (hvis eksisterer) før spillet starter" #: ../src/pref.c:4116 msgid "Stop current song in XMMS" msgstr "Stop nuværende sang i XMMS" #: ../src/pref.c:4119 msgid "" "Stopping XMMS will release /dev/dsp. Activate this option if you use XMMS " "and have a cheap soundcard that allows only one application to open /dev/dsp." msgstr "" "Ved at stoppe XMMS, vil /dev/dsp blive frigivet. Aktiver denne indstilling " "hvis du bruger XMMS og har et billigt lydkort der kun tillader ét program at " "åbne /dev/dsp." #. QStat preferences -- maxsimultaneous & maxretries #: ../src/pref.c:4158 msgid "QStat Options" msgstr "QStat Indstillinger" #. maxsimultaneous #: ../src/pref.c:4169 msgid "Number of simultaneous servers to query" msgstr "Antal servere at sende forespørgsler til samtidig" #. maxretries #: ../src/pref.c:4193 msgid "Number of retries" msgstr "Antal forsøg" #. srcip #: ../src/pref.c:4212 msgid "Source IP Address" msgstr "Kilde IP Adresse:" #: ../src/pref.c:4233 msgid "Source Port Range" msgstr "Kilde Port område" #. Translator: sound test button #: ../src/pref.c:4296 msgid "Test" msgstr "Test" #. Sound Enable / Disable frame #. Sounds Enable / Disable #: ../src/pref.c:4313 msgid "Sound Enable / Disable" msgstr "Lydaktivering / deaktivering" #: ../src/pref.c:4327 msgid "Enable Sound" msgstr "Aktiver lyd" #. Sound Player #: ../src/pref.c:4338 msgid "Player program" msgstr "Afspilnings program" #. Sound Files frame #. Sounds preferences -- player and various sounds #: ../src/pref.c:4366 msgid "Sound Files" msgstr "Lyd filer" #. Sound XQF Start #: ../src/pref.c:4378 msgid "XQF Start" msgstr "XQF start" #. Sound XQF Quit #: ../src/pref.c:4410 msgid "XQF Quit" msgstr "XQF afslut" #. Sound Update Done #: ../src/pref.c:4442 msgid "Update Done" msgstr "Opdatering færdig" #. Sound Refresh Done #: ../src/pref.c:4475 msgid "Refresh Done" msgstr "Opdatering færdig" #. Sound Stop #: ../src/pref.c:4508 ../src/xqf.c:3071 ../src/trayicon.c:462 msgid "Stop" msgstr "Stop" #. Sound Server Connect #: ../src/pref.c:4541 msgid "Server Connect" msgstr "Server forbindelse" #. Sound Redial Success Start #: ../src/pref.c:4574 msgid "Redial Success" msgstr "Genopkald succes" #: ../src/pref.c:4702 msgid "XQF: Preferences" msgstr "XQF: Præferencer" #: ../src/pref.c:4722 msgid "General" msgstr "Generelt" #: ../src/pref.c:4734 msgid "Games" msgstr "Spil" #: ../src/pref.c:4739 msgid "Appearance" msgstr "Udseende" #: ../src/pref.c:4744 msgid "QStat" msgstr "QStat" #: ../src/pref.c:4749 msgid "Sounds" msgstr "Lyde" #: ../src/pref.c:4754 msgid "Scripts" msgstr "" #: ../src/pref.c:4895 msgid "Unable to get user name/home/tmpdir" msgstr "Kunne ikke få bruger navn/hjemmemappe/tmpmappe" #. translator: %s = game name, e.g. Quake 3 Arena #: ../src/pref.c:5227 #, c-format msgid "Searching for %s maps" msgstr "Skan efter %s baner" #: ../src/pref.c:5281 msgid "Game Command Selection" msgstr "Spil kommandovalg" #: ../src/pref.c:5290 msgid "Game Directory Selection" msgstr "Spil mappevalg" #: ../src/pref.c:5295 msgid "Sound Player Selection" msgstr "Lyd spillervalg" #: ../src/pref.c:5300 msgid "XQF Start Sound Selection" msgstr "XQF startlyd valg" #: ../src/pref.c:5305 msgid "XQF Quit Sound Selection" msgstr "XQF afslutningslyd valg" #: ../src/pref.c:5310 msgid "Update Done Sound Selection" msgstr "Opdatering færdig lydvalg" #: ../src/pref.c:5315 msgid "Refresh Done Sound Selection" msgstr "Opdatering færdig lydvalg" #: ../src/pref.c:5320 msgid "Stop Sound Selection" msgstr "Stop lydvalg" #: ../src/pref.c:5325 msgid "Server Connect Sound Selection" msgstr "Serverforbindelse lydvalg" #: ../src/pref.c:5330 msgid "Redial Success Sound Selection" msgstr "Genopkald succes lydvalg" #: ../src/psearch.c:51 msgid "Exact Match" msgstr "Præcist match" #: ../src/psearch.c:52 msgid "Substring" msgstr "Delstreng" #: ../src/psearch.c:53 msgid "Regular Expression" msgstr "Regulært udtryk" #: ../src/psearch.c:174 msgid "Find Player" msgstr "Find spiller" #. Pattern Entry #: ../src/psearch.c:185 msgid "Find Player:" msgstr "Find spiller:" #: ../src/psearch.c:394 msgid "Player not found." msgstr "Spiller ikke fundet." #: ../src/psearch.c:398 msgid "XQF: End of server list reached" msgstr "XQF: Slutningen af serverlisten blev nået" #: ../src/psearch.c:399 msgid "Continue search from beginning?" msgstr "Fortsæt søgning fra begyndelsen?" #. Message #: ../src/rcon.c:550 msgid "Cmd:" msgstr "Kommando:" #. Send Button #: ../src/rcon.c:577 msgid "Send" msgstr "Send" #. Status Button #: ../src/rcon.c:586 msgid "Status" msgstr "Status" #. Clear Button #: ../src/rcon.c:595 msgid "Clear" msgstr "Ryd" #: ../src/rcon.c:617 ../src/statistics.c:849 msgid "Close" msgstr "Luk" #: ../src/rcon.c:717 #, c-format msgid "Usage: %s [server type] \n" msgstr "Brug: %s [server type] \n" #: ../src/rcon.c:718 #, fuzzy, c-format msgid " server type is either --qws, --hws, --hls or --dm3s.\n" msgstr " server type er enten --qwes, --hws eller --hls\n" #: ../src/rcon.c:719 #, c-format msgid " If no server type is specified, Q3 style rcon is assumed.\n" msgstr " Hvis ingen server type er angivet, vil Q3-stil rcon blive antaget.\n" #. translator: readline prompt #: ../src/rcon.c:756 msgid "Password: " msgstr "Adgangskode: " #: ../src/redial.c:123 #, c-format msgid "" "Waiting for free slots on\n" "%s" msgstr "" "Venter på frie plads på\n" "%s" #: ../src/redial.c:125 #, c-format msgid "" "Refreshing\n" "%s" msgstr "" "Opdaterer\n" "%s" #. * window code modified from glade #: ../src/redial.c:179 ../src/redial.c:184 msgid "XQF: Redialing" msgstr "XQF: Ringer op igen" #: ../src/redial.c:196 msgid "" "***\n" "***" msgstr "" "***\n" "***" #: ../src/redial.c:219 msgid "Launch now" msgstr "Kør nu" #: ../src/source.c:66 msgid "Standard" msgstr "Standard" #: ../src/source.c:67 msgid "Gamespy" msgstr "Gamespy" #: ../src/source.c:68 msgid "http" msgstr "http" #: ../src/source.c:70 msgid "File" msgstr "Fil" #: ../src/source.c:122 msgid "Retry" msgstr "Forsøg" #: ../src/source.c:122 msgid "Skip" msgstr "Spring over" #: ../src/source.c:123 #, c-format msgid "" "Cannot write to file %s\n" "System Error: %s\n" msgstr "" "Kan ikke skrive til fil %s\n" "System Fejl: %s\n" #. translator: %s == url, eg gmaster://bla.blub.org #: ../src/source.c:891 #, c-format msgid "You have to specify a port number for %s." msgstr "Du skal specificere et port nummer for %s." #: ../src/source.c:905 #, c-format msgid "'gsmtype' options missing for master %s." msgstr "'gsmtype' indstillinger mangler for master %s." #: ../src/source.c:1439 msgid "Favorites" msgstr "Favoritter" #: ../src/srv-prop.c:423 msgid "IP Address:" msgstr "IP Adresse:" #: ../src/srv-prop.c:433 msgid "Port:" msgstr "Port:" #: ../src/srv-prop.c:447 msgid "Host Name:" msgstr "Værtsnavn:" #: ../src/srv-prop.c:461 msgid "Country:" msgstr "Land:" #: ../src/srv-prop.c:489 msgid "Refreshed:" msgstr "Opdateret:" #. translator: last time and date the server answered the query #: ../src/srv-prop.c:507 msgid "Last answer:" msgstr "Sidste svar:" #: ../src/srv-prop.c:564 msgid "Reserved Slots:" msgstr "Reserverede Pladser:" #. Sources #: ../src/srv-prop.c:583 msgid "Sources" msgstr "Kilder" #: ../src/srv-prop.c:635 msgid "Custom CFG:" msgstr "Brugerdefineret CFG:" #: ../src/srv-prop.c:684 msgid "Server Password" msgstr "Server adgangskode" #: ../src/srv-prop.c:690 msgid "Spectator Password" msgstr "Tilskuer adgangskode" #: ../src/srv-prop.c:697 msgid "RCon/Admin Password" msgstr "RCon/Admin adgangskode" #: ../src/srv-prop.c:728 msgid "This server sucks" msgstr "Denne server stinker" #: ../src/srv-prop.c:771 ../src/xqf.c:2603 ../src/xqf.c:2741 msgid "Properties" msgstr "Egenskaber" #: ../src/srv-prop.c:816 msgid "Info" msgstr "Info" #: ../src/srv-prop.c:821 msgid "Passwords" msgstr "Adgangskoder" #: ../src/srv-prop.c:826 msgid "Comment" msgstr "Kommentar" #: ../src/stat.c:728 msgid "Allies" msgstr "Allierede" #: ../src/stat.c:728 msgid "Axis" msgstr "Akse" #: ../src/stat.c:734 msgid "Red" msgstr "Rød" #: ../src/stat.c:734 msgid "Blue" msgstr "Blå" #: ../src/stat.c:1376 #, c-format msgid "" "UT2004 CD Key not found, cannot query master '%s'.\n" "Make sure the working directory is set correctly." msgstr "" "UT2004 CD Key ikke fundet, kan ikke forespørge master '%s'.\n" "Sørg for at arbejdsmappen er sat korrekt." #: ../src/stat.c:1559 #, c-format msgid "Failed to create a temporary file %s: %s" msgstr "Fejlede ved oprettelse af midlertidig fil %s: %s" #. The space behind up and down is to make the strings different from #. those in flt-player.c because their meaning is different in german #: ../src/statistics.c:82 ../src/statistics.c:93 msgid "Servers" msgstr "Servere" #: ../src/statistics.c:82 msgid "Up " msgstr "Op " #: ../src/statistics.c:82 msgid "Timeout" msgstr "Tidsudløb" #: ../src/statistics.c:82 msgid "Down " msgstr "Ned " #: ../src/statistics.c:82 msgid "Info n/a" msgstr "Info ikke tilgængelig" #: ../src/statistics.c:82 ../src/statistics.c:504 ../src/xqf-ui.c:88 msgid "Players" msgstr "Spillere" #: ../src/statistics.c:86 ../src/statistics.c:90 msgid "unknown" msgstr "ukendt" #: ../src/statistics.c:94 msgid "OS/CPU" msgstr "OS/CPU" #: ../src/statistics.c:95 ../src/xqf-ui.c:65 msgid "Country" msgstr "Land" #: ../src/statistics.c:450 ../src/statistics.c:498 ../src/statistics.c:503 msgid "Total" msgstr "Total" #: ../src/statistics.c:493 msgid "CPU \\ OS" msgstr "CPU \\ OS" #: ../src/statistics.c:721 msgid "All Games" msgstr "Alle spil" #: ../src/statistics.c:803 ../src/statistics.c:812 msgid "Statistics" msgstr "Statistikker" #. error converting time to string representation, shouldn't happen #: ../src/utils.c:903 msgid "" msgstr "" #: ../src/utils.c:1126 msgid "Can't open source file for reading" msgstr "" #: ../src/utils.c:1133 msgid "Can't open destination file for writing" msgstr "" #: ../src/utils.c:1141 msgid "write error on destination file" msgstr "" #: ../src/utils.c:1148 msgid "read error on source file" msgstr "" #: ../src/xqf-ui.c:58 #, fuzzy msgid "Type" msgstr "Spiltype" #: ../src/xqf-ui.c:61 msgid "Address" msgstr "Adresse" #: ../src/xqf-ui.c:68 ../src/xqf-ui.c:153 msgid "Ping" msgstr "Ping" #: ../src/xqf-ui.c:74 msgid "TO" msgstr "Til" #: ../src/xqf-ui.c:80 msgid "Priv" msgstr "Priv" #. Translator: "PunkBuster" #: ../src/xqf-ui.c:85 msgid "PB" msgstr "" #. Translator: Max as in max players #: ../src/xqf-ui.c:93 #, fuzzy msgid "Max" msgstr "Bane" #: ../src/xqf-ui.c:96 msgid "Map" msgstr "Bane" #: ../src/xqf-ui.c:108 msgid "GameType" msgstr "Spiltype" #: ../src/xqf-ui.c:135 msgid "Frags" msgstr "" #: ../src/xqf-ui.c:147 msgid "Skin" msgstr "" #: ../src/xqf-ui.c:159 msgid "Time" msgstr "Tid" #: ../src/xqf-ui.c:179 msgid "Rule" msgstr "Regel" #: ../src/xqf-ui.c:185 msgid "Value" msgstr "Værdi" #: ../src/xqf-ui.c:575 msgid "Source" msgstr "Kilde" #: ../src/xqf.c:349 #, c-format msgid "%d server" msgstr "%d server" #: ../src/xqf.c:349 #, c-format msgid "%d servers" msgstr "%d servere" #. server filter #: ../src/xqf.c:597 #, c-format msgid "None <--" msgstr "Ingen <--" #: ../src/xqf.c:599 ../src/xqf.c:3201 ../src/xqf.c:3258 ../src/xqf.c:3403 #, c-format msgid "None" msgstr "Ingen" #: ../src/xqf.c:613 #, c-format msgid "Filter %d <--" msgstr "Filter %d <--" #: ../src/xqf.c:615 #, c-format msgid "Filter %d" msgstr "Filter %d" #: ../src/xqf.c:637 #, c-format msgid "No Server Filter Active" msgstr "Ingen Server Filtre Aktive" #: ../src/xqf.c:644 #, c-format msgid "Server Filter: %s" msgstr "Server Filter: %s" #: ../src/xqf.c:648 #, c-format msgid "Server Filter: %d" msgstr "Server Filter: %d" #: ../src/xqf.c:815 msgid "Updating lists..." msgstr "Opdaterer lister..." #: ../src/xqf.c:821 #, c-format msgid "Resolving host names: %d/%d" msgstr "Finder værtsnavne: %d/%d" #: ../src/xqf.c:825 #, c-format msgid "Refreshing: %d/%d" msgstr "Opdaterer: %d/%d" #: ../src/xqf.c:831 #, c-format msgid "Resolving host addresses: %d/%d" msgstr "Finder værtsnavne: %d/%d" #: ../src/xqf.c:958 msgid "" "You said this servers sucks.\n" "Do you want to risk a game this time?" msgstr "" "Du sagde at denne server stinker.\n" "Vil du risikere et spil nu?" #: ../src/xqf.c:970 #, c-format msgid "" "This server is not compatible with the version of %s you have installed.\n" "Launch client anyway?" msgstr "" #: ../src/xqf.c:982 #, c-format msgid "" "Server %s:%d is %s.\n" "\n" "Launch client anyway?" msgstr "" "Server %s:%d er %s.\n" "\n" "Kør klient alligevel?" #: ../src/xqf.c:995 #, c-format msgid "" "Server %s:%d is full.\n" "\n" "Launch client anyway?" msgstr "" "Server %s:%d er fuld.\n" "\n" "Kør klient alligevel?" #: ../src/xqf.c:1108 ../src/xqf.c:1128 ../src/xqf.c:2003 msgid "Save Password" msgstr "Gem adgangskode" #: ../src/xqf.c:1108 msgid "Spectator Password:" msgstr "Tilskuer adgangskode::" #: ../src/xqf.c:1128 ../src/xqf.c:2003 msgid "Server Password:" msgstr "Server adgangskode:" #: ../src/xqf.c:1279 msgid "Spectator" msgstr "Tilskuer" #: ../src/xqf.c:1280 ../src/xqf.c:1283 msgid "Demo name:" msgstr "Demo navn:" #: ../src/xqf.c:1525 #, c-format msgid "Host %s not found" msgstr "Værtsnavn %s blev ikke fundet" #: ../src/xqf.c:1545 ../src/xqf.c:3815 #, c-format msgid "\"%s\" is not valid host[:port] combination." msgstr "\"%s\" er ikke en gyldig værtsnavn[:port] kombination." #: ../src/xqf.c:1646 #, fuzzy msgid "Remove selected servers from all lists?" msgstr "Opdater valgte servere" #. translator: %s == url #: ../src/xqf.c:1791 #, c-format msgid "" "For Gslist support you must install the 'gslist' program available from\n" "%s\n" "Don't forget that you need to run 'gslist -u' before you can use it." msgstr "" #: ../src/xqf.c:1862 msgid "You have to select the server you want to delete" msgstr "Du skal vælge en server du vil slette" #: ../src/xqf.c:1868 #, c-format msgid "" "Master%s to delete:\n" "\n" "%s" msgstr "" "Master%s der skal slettes:\n" "\n" "%s" #: ../src/xqf.c:1891 #, c-format msgid "Find Player: %s" msgstr "Find spiller: %s" #: ../src/xqf.c:1983 msgid "Done." msgstr "Færdig." #: ../src/xqf.c:2525 ../src/xqf.c:3081 msgid "Connect" msgstr "Forbind" #: ../src/xqf.c:2530 ../src/xqf.c:3090 msgid "Observe" msgstr "Observer" #: ../src/xqf.c:2535 ../src/xqf.c:3098 msgid "Record Demo" msgstr "Optag demo" #: ../src/xqf.c:2549 msgid "Add new Server" msgstr "Tilføj ny server" #: ../src/xqf.c:2554 msgid "Add to Favorites" msgstr "Tilføj til favoritter" #: ../src/xqf.c:2559 #, fuzzy msgid "Remove" msgstr "Omdøb" #: ../src/xqf.c:2564 ../src/xqf.c:2613 msgid "Copy" msgstr "Kopiér" #: ../src/xqf.c:2569 msgid "Copy+" msgstr "Kopiér+" #: ../src/xqf.c:2577 ../src/xqf.c:3055 ../src/trayicon.c:452 msgid "Refresh" msgstr "Genindlæs" #: ../src/xqf.c:2582 msgid "Refresh Selected" msgstr "Opdatér valgte" #: ../src/xqf.c:2590 msgid "DNS Lookup" msgstr "DNS opslag" #: ../src/xqf.c:2598 msgid "RCon" msgstr "RCon" #: ../src/xqf.c:2621 msgid "_Statistics" msgstr "_Statistikker" #: ../src/xqf.c:2629 msgid "_Exit" msgstr "_Afslut" #: ../src/xqf.c:2640 ../src/xqf.c:2705 msgid "Add _Master" msgstr "Tilføj master" #: ../src/xqf.c:2645 ../src/xqf.c:2710 msgid "_Rename Master" msgstr "Omdøb master" #: ../src/xqf.c:2650 ../src/xqf.c:2715 msgid "D_elete Master" msgstr "Sl_et master" #: ../src/xqf.c:2655 ../src/xqf.c:2720 msgid "_Clear Servers" msgstr "_Ryd servere" #: ../src/xqf.c:2665 ../src/xqf.c:2825 msgid "_Add new Server" msgstr "_Tilføj ny server" #: ../src/xqf.c:2670 ../src/xqf.c:2830 msgid "Add to _Favorites" msgstr "Tilføj til _favoritter" #: ../src/xqf.c:2675 ../src/xqf.c:2835 #, fuzzy msgid "_Remove" msgstr "Omdøb" #: ../src/xqf.c:2680 msgid "_Copy" msgstr "_Kopiér" #: ../src/xqf.c:2685 msgid "_Copy+" msgstr "_Kopiér+" #: ../src/xqf.c:2693 msgid "Add Default Masters" msgstr "Tilføj standard masters" #: ../src/xqf.c:2699 msgid "Add Gslist Masters" msgstr "Tilføj Gslist masters" #: ../src/xqf.c:2728 msgid "_Find Player" msgstr "_Find spiller" #: ../src/xqf.c:2733 msgid "Find A_gain" msgstr "Find i_gen" #: ../src/xqf.c:2751 msgid "_Refresh" msgstr "_Opdatér" #: ../src/xqf.c:2756 msgid "Refresh _Selected" msgstr "Opdater _valgte" #: ../src/xqf.c:2761 msgid "_Update From Master" msgstr "_Opdatér fra master" #: ../src/xqf.c:2769 msgid "Show _Host Names" msgstr "Vis værtsnavne" #: ../src/xqf.c:2774 msgid "Show Default _Port" msgstr "Vis standard _port" #: ../src/xqf.c:2800 msgid "_Connect" msgstr "_Forbind" #: ../src/xqf.c:2805 msgid "_Observe" msgstr "_Observer" #: ../src/xqf.c:2810 msgid "Record _Demo" msgstr "Optag _demo" #: ../src/xqf.c:2841 msgid "DNS _Lookup" msgstr "DNS _opslag" #: ../src/xqf.c:2849 msgid "_RCon" msgstr "_RCon" #: ../src/xqf.c:2854 msgid "_Properties" msgstr "_Egenskaber" #: ../src/xqf.c:2864 msgid "_General" msgstr "_Generelt" #: ../src/xqf.c:2870 msgid "_Games" msgstr "_Spil" #: ../src/xqf.c:2876 msgid "_Appearance" msgstr "_Udseende" #: ../src/xqf.c:2882 #, fuzzy msgid "_QStat" msgstr "QStat" #: ../src/xqf.c:2888 #, fuzzy msgid "_Sounds" msgstr "Lyde" #: ../src/xqf.c:2894 msgid "S_cripts" msgstr "" #: ../src/xqf.c:2904 msgid "_Server Filter" msgstr "_Server filter" #: ../src/xqf.c:2909 msgid "Player _Filter" msgstr "Spiller _filter" #: ../src/xqf.c:2919 msgid "_About" msgstr "_Om" #: ../src/xqf.c:2930 msgid "_File" msgstr "_Fil" #: ../src/xqf.c:2935 msgid "_Edit" msgstr "_Redigér" #: ../src/xqf.c:2940 msgid "_View" msgstr "_Vis" #: ../src/xqf.c:2945 msgid "_Server" msgstr "_Server" #: ../src/xqf.c:2950 msgid "_Preferences" msgstr "_Præferencer" #: ../src/xqf.c:2956 msgid "_Server Filters" msgstr "_Server Filtre" #: ../src/xqf.c:2962 msgid "_Help" msgstr "_Hjælp" #: ../src/xqf.c:3005 msgid "Mark as Red" msgstr "Markér som rød" #: ../src/xqf.c:3012 msgid "Mark as Green" msgstr "Markér som grøn" #: ../src/xqf.c:3019 msgid "Mark as Blue" msgstr "Markér som blå" #: ../src/xqf.c:3026 msgid "Add to Player Filter" msgstr "Tilføj til spiller filter" #: ../src/xqf.c:3047 ../src/trayicon.c:457 msgid "Update" msgstr "Opdatér" #: ../src/xqf.c:3047 msgid "Update from master" msgstr "Opdater fra master" #: ../src/xqf.c:3055 msgid "Refresh current list" msgstr "Opdater nuværende liste" #: ../src/xqf.c:3063 msgid "Ref.Sel." msgstr "Opd. valg." #: ../src/xqf.c:3063 msgid "Refresh selected servers" msgstr "Opdater valgte servere" #: ../src/xqf.c:3098 msgid "Record" msgstr "Optag" #. Translators: e.g. Server Filter #: ../src/xqf.c:3116 #, c-format msgid "%s Filter Enable / Disable" msgstr "%s Filter Aktiver / Deaktiver" #. Translators: e.g. Server Filter Configuration #: ../src/xqf.c:3138 #, c-format msgid "%s Filter Configuration" msgstr "%s filter opsætning" #: ../src/xqf.c:3240 msgid "Configure" msgstr "Konfigurér" #: ../src/xqf.c:3383 msgid "Filters" msgstr "Filtre" #: ../src/xqf.c:3552 msgid "Quick Filter:" msgstr "Hurtigt filter:" #: ../src/xqf.c:3729 msgid "no sound player configured" msgstr "ingen lydspiller konfigureret" #: ../src/xqf.c:3767 msgid "" "Usage:\n" "\txqf [OPTIONS]\n" "\n" "OPTIONS:\n" "\t--launch \"[SERVERTYPE] IP\"\tlaunch game on specified server\n" "\t--add \"[SERVERTYPE] IP\"\tadd specified server to favorites\n" "\t--debug \t\t\tset debug level\n" "\t--version\t\t\tprint version and exit\n" msgstr "" "Brug:\n" "\txqf [TILVALG]\n" "\n" "TILVALG:\n" "\t--launch \"[SERVERTYPE] IP\"\tstart spil på angivet server\n" "\t--add \"[SERVERTYPE] IP\"\ttilføj angivet server til favoritter\n" "\t--debug \t\t\tsæt fejlsøgnings niveau\n" "\t--version\t\t\tudskriv version og afslut\n" #: ../src/xqf.c:4019 msgid "Reading server lists" msgstr "Læser server lister" #: ../src/xqf.c:4036 #, c-format msgid "You need at least qstat version %s for xqf to function properly" msgstr "Du skal have mindst qstat version %s før at xqf virker ordentligt" #: ../src/xqf.c:4040 #, fuzzy msgid "Loading icons ..." msgstr "Indlæser ..." #: ../src/xqf.c:4046 msgid "Starting ..." msgstr "Starter ..." #: ../src/splash.c:61 msgid "XQF: Loading" msgstr "XQF: Indlæser" #: ../src/splash.c:90 msgid "Loading ..." msgstr "Indlæser ..." #. translator: %s = file name #: ../src/country-filter.c:220 ../src/loadpixmap.c:213 ../src/loadpixmap.c:226 #: ../src/loadpixmap.c:245 ../src/loadpixmap.c:257 #, c-format msgid "Error loading pixmap file: %s" msgstr "Fejl ved indlæsning af pixmap fil: %s" #: ../src/trayicon.c:376 ../src/trayicon.c:382 ../src/trayicon.c:390 #: ../src/trayicon.c:396 ../src/trayicon.c:410 #, c-format msgid "Error in file: %s line: %d\n" msgstr "Fejl i fil: %s linje %d\n" #. translator: show main window #: ../src/trayicon.c:473 msgid "Show" msgstr "Vis" #. translator: hide main window #: ../src/trayicon.c:479 msgid "Hide" msgstr "Skjul" #: ../src/trayicon.c:484 msgid "Exit" msgstr "Afslut" #~ msgid "XQF" #~ msgstr "XQF" #~ msgid "vm_cgame fix" #~ msgstr "vm_cgame fix" #~ msgid "Rocketarena fix" #~ msgstr "Rocketarena fix" #~ msgid "OS" #~ msgstr "Styresystem" #~ msgid "Remove from Favorites" #~ msgstr "Fjern fra favoritter" #~ msgid "_Remove from Favorites" #~ msgstr "_Fjern fra favoritter" #~ msgid "_QStat Options" #~ msgstr "_QStat indstillinger" #~ msgid "_Sound Options" #~ msgstr "Lyd indstillinger" #~ msgid "" #~ "Note: You need to create a qstat config file for this game to work.\n" #~ "Please see the XQF documentation for more information." #~ msgstr "" #~ "Bemærk: Du skal oprette en qstat opsætningsfil for at få dette spil \n" #~ "til at virke. Se XQF dokumentationen for flere oplysninger." #~ msgid "QuakeForge workaround (uses base/ instead of id1/)" #~ msgstr "QuakeForge \"workaround\" (bruger base/ istedet for id1/)" xqf-1.0.5/po/de.po0000644002404400000620000013622710520643117010610 00000000000000# translation of de.po to Deutsch # Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. # Ludwig Nussel >, 2003, 2004, 2005. # msgid "" msgstr "" "Project-Id-Version: de\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2006-10-28 13:56+0200\n" "PO-Revision-Date: 2005-08-07 19:11GMT\n" "Last-Translator: Ludwig Nussel >\n" "Language-Team: Deutsch \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: KBabel 1.10\n" #: ../xqf.desktop.in.h:1 #, fuzzy msgid "Game Server Browser" msgstr "XQF Spieleserver Browser" #: ../xqf.desktop.in.h:2 msgid "Locate and connect to game servers" msgstr "Spieleserver finden und mit ihnen verbinden" #: ../xqf.desktop.in.h:3 ../src/dialogs.c:492 msgid "XQF Game Server Browser" msgstr "XQF Spieleserver Browser" #: ../src/addmaster.c:111 msgid "You have to specify a name and an address." msgstr "Sie müssen einen Namen und eine Adresse angeben." #: ../src/addmaster.c:118 #, c-format msgid "Master address \"%s\" is not valid." msgstr "Master Adresse \"%s\" ist nicht zulässig." #: ../src/addmaster.c:174 ../src/source.c:69 msgid "LAN" msgstr "LAN" #: ../src/addmaster.c:245 msgid "Rename Master" msgstr "Master umbenennen" #: ../src/addmaster.c:249 msgid "Add Master" msgstr "Master hinzufügen" #. Master Name (Description) #: ../src/addmaster.c:263 msgid "Master Name" msgstr "Master Name" #. Master Address #: ../src/addmaster.c:319 msgid "Master Address" msgstr "Master Adresse" #. Cancel Button #: ../src/addmaster.c:409 ../src/addserver.c:152 ../src/dialogs.c:421 #: ../src/filter.c:1619 ../src/filter.c:2122 ../src/game.c:1819 #: ../src/launch.c:339 ../src/pref.c:4784 ../src/psearch.c:224 #: ../src/redial.c:227 ../src/srv-prop.c:841 ../src/xqf.c:981 ../src/xqf.c:994 #: ../src/xqf.c:1867 msgid "Cancel" msgstr "Abbrechen" #: ../src/addserver.c:91 ../src/addserver.c:188 msgid "Add Server" msgstr "Server hinzufügen" #. Server Entry #: ../src/addserver.c:102 msgid "Server:" msgstr "Server:" #: ../src/dialogs.c:124 ../src/dialogs.c:199 ../src/dialogs.c:279 msgid "XQF: Warning!" msgstr "XQF: Warnung!" #. OK Button #. gtk_button_box_set_child_size(GTK_BUTTON_BOX(hbuttonbox1), 79, 38); #. OK Button #: ../src/dialogs.c:149 ../src/dialogs.c:410 ../src/dialogs.c:600 #: ../src/filter.c:1630 ../src/filter.c:2110 ../src/pref.c:4792 #: ../src/psearch.c:213 ../src/srv-prop.c:849 msgid "OK" msgstr "OK" #: ../src/dialogs.c:224 ../src/dialogs.c:304 ../src/filter.c:1050 #: ../src/psearch.c:398 ../src/xqf.c:957 ../src/xqf.c:969 ../src/xqf.c:1645 msgid "Yes" msgstr "Ja" #: ../src/dialogs.c:236 ../src/dialogs.c:316 ../src/filter.c:1051 #: ../src/psearch.c:398 ../src/xqf.c:957 ../src/xqf.c:969 ../src/xqf.c:1645 msgid "No" msgstr "Nein" #: ../src/dialogs.c:326 ../src/xqf.c:994 msgid "Redial" msgstr "Wahlwiederholung" #: ../src/dialogs.c:493 #, c-format msgid "Version %s" msgstr "Version %s" #. translators can use the copyright symbol instead of (C) #: ../src/dialogs.c:496 msgid "Copyright (C) 1998-2002 Roman Pozlevich" msgstr "Copyright © 1998-2002 Roman Pozlevich" #: ../src/dialogs.c:499 msgid "Maintainers:" msgstr "Verantwortliche:" #: ../src/dialogs.c:505 msgid "Contributors:" msgstr "Mitwirkende:" #: ../src/dialogs.c:509 msgid "Bug reports and feature requests:" msgstr "Fehlerberichte und Wünsche:" #: ../src/dialogs.c:556 msgid "About XQF" msgstr "Über XQF" #: ../src/dialogs.c:583 msgid "[placeholder, do not translate]" msgstr "[placeholder, do not translate]" #: ../src/filter.c:97 msgid "Server" msgstr "Server" #: ../src/filter.c:98 msgid "S Filter" msgstr "S Filter" #: ../src/filter.c:99 msgid "SF Cfg" msgstr "SF Konf." #: ../src/filter.c:111 msgid "Player" msgstr "Spieler" #: ../src/filter.c:112 msgid "P Filter" msgstr "Sp Filter" #: ../src/filter.c:113 msgid "PF Cfg" msgstr "SpF Konf." #: ../src/filter.c:1011 msgid "Enter filter name" msgstr "Filter Name eingeben" #: ../src/filter.c:1049 msgid "Delete server filter" msgstr "Server Filter löschen" #: ../src/filter.c:1052 #, c-format msgid "Really delete server filter \"%s\"?" msgstr "Server Filter \"%s\" wirklich löschen?" #: ../src/filter.c:1257 msgid "Server Filter" msgstr "Server Filter" #: ../src/filter.c:1271 ../src/flt-player.c:821 ../src/pref.c:2821 msgid "New" msgstr "Neu" #: ../src/filter.c:1278 msgid "Rename" msgstr "Umbenennen" #. FIXME: plural #: ../src/filter.c:1285 ../src/flt-player.c:827 ../src/pref.c:2829 #: ../src/xqf.c:1867 msgid "Delete" msgstr "Löschen" #: ../src/filter.c:1292 msgid "Server would pass filter if" msgstr "Server trifft zu wenn" #. row=0..1 #. max ping #: ../src/filter.c:1313 msgid "ping is less than" msgstr "sein Ping kleiner ist als" #. GAMECONTAINS Filter -- baa #. http://developer.gnome.org/doc/API/gtk/gtktable.html #: ../src/filter.c:1334 msgid "the game contains the string" msgstr "das Spiel diese Zeichenkette enthält" #. row=1..2 #. max timeouts #: ../src/filter.c:1352 msgid "the number of retries is fewer than" msgstr "Neuversuche weniger sind als" #. GAMETYPE Filter -- baa #. http://developer.gnome.org/doc/API/gtk/gtktable.html #: ../src/filter.c:1371 msgid "the game type contains the string" msgstr "der Spieltyp diese Zeichenkette enthält" #. row=2..3 #. not full #: ../src/filter.c:1388 msgid "it is not full" msgstr "er nicht voll ist" #. Version Filter -- baa #: ../src/filter.c:1395 msgid "the version contains the string" msgstr "die Version diese Zeichenkette enthält" #: ../src/filter.c:1414 msgid "it is not empty" msgstr "er nicht leer ist" #. Map filter #: ../src/filter.c:1423 msgid "the map contains the string" msgstr "das Karte diese Zeichenkette enthält" #: ../src/filter.c:1441 msgid "cheats are not allowed" msgstr "Cheats nicht erlaubt sind" #. Server name filter #: ../src/filter.c:1450 msgid "the server name contains the string" msgstr "der Servername diese Zeichenkette enthält" #: ../src/filter.c:1468 msgid "no password required" msgstr "kein Passwort benötigt wird" #: ../src/filter.c:1479 ../src/filter.c:1958 msgid "Country filter:" msgstr "Landesfiler:" #: ../src/filter.c:1520 msgid "select..." msgstr "Auswählen..." #: ../src/filter.c:1533 msgid "clear" msgstr "Löschen" #: ../src/filter.c:1591 msgid "XQF: Filters" msgstr "XQF: Filter" #. window caption for country filter #: ../src/filter.c:1949 msgid "Configure Country Filter" msgstr "Landesfiler konfigurieren" #: ../src/filter.c:2091 msgid "Show all countries" msgstr "Alle Länder anzeigen" #: ../src/flt-player.c:69 ../src/flt-player.c:75 msgid "string" msgstr "String" #: ../src/flt-player.c:70 msgid "substr" msgstr "Substring" #: ../src/flt-player.c:71 msgid "regexp" msgstr "Regulärer Ausdruck" #: ../src/flt-player.c:76 msgid "substring" msgstr "Substring" #: ../src/flt-player.c:77 msgid "regular expression" msgstr "Regulärer Ausdruck" #: ../src/flt-player.c:448 ../src/psearch.c:116 msgid "XQF: Error" msgstr "XQF: Fehler" #: ../src/flt-player.c:448 ../src/psearch.c:117 #, c-format msgid "" "Regular Expression Error!\n" "\n" "%s\n" "\n" "%s." msgstr "" "Fehler in Regulärem Ausdruck!\n" "\n" "%s\n" "\n" "%s." #. Pattern Entry #: ../src/flt-player.c:666 ../src/flt-player.c:754 msgid "Pattern" msgstr "Muster" #. Comment #: ../src/flt-player.c:701 msgid "Pattern Comment" msgstr "Kommentar" #: ../src/flt-player.c:754 msgid "Mode" msgstr "Modus" #: ../src/flt-player.c:760 msgid "Player Filter" msgstr "Spieler Filter" #: ../src/flt-player.c:839 msgid "Up" msgstr "Hoch" #: ../src/flt-player.c:845 msgid "Down" msgstr "Runter" #: ../src/game.c:212 msgid "" "Note: Soldier of Fortune will not connect to a server correctly\n" "without creating a startup script for the game. Please see the\n" "XQF documentation for more information." msgstr "" "Hinweis: Damit Soldier of Fortune sich richtig mit Servern verbindet\n" "müssen Sie ein Startskript erstellen. In der XQF Dokumentation\n" "erhalten Sie mehr Information." #: ../src/game.c:216 msgid "" "Note: Unreal Tournament will not launch correctly without\n" "modifications to the game's startup script. Please see the\n" "XQF documentation for more information." msgstr "" "Hinweis: Damit Unreal Tournament ordnungsgemäß startet,\n" "müssen Sie sein Startskript modifizieren. In der XQF Dokumentation\n" "erhalten Sie mehr Information." #: ../src/game.c:220 msgid "Sample Command Line: wine hl.exe -- hl.exe -console" msgstr "Beispiel für Kommandozeile: wine hl.exe -- hl.exe -console" #: ../src/game.c:223 msgid "" "Note: Savage will not launch correctly without\n" "modifications to the game's startup script. Please see the\n" "XQF documentation for more information." msgstr "" "Hinweis: Damit Savage ordnungsgemäß startet, müssen\n" "Sie sein Startskript modifizieren. In der XQF Dokumentation\n" "erhalten Sie mehr Information." #. %s = game name e.g. QuakeWorld #: ../src/game.c:1691 #, c-format msgid "%s command line is empty." msgstr "Die %s Kommandozeile ist leer" #. directory name, game name #. %s directory, game name #: ../src/game.c:1698 ../src/game.c:1807 #, c-format msgid "" "\"%s\" is not a directory\n" "Please specify correct %s working directory." msgstr "" "\"%s\" ist kein Verzeichnis.\n" "Bitte korrektes Arbeitsverzeichnis für %s angeben." #. game name #: ../src/game.c:1710 #, c-format msgid "Please specify correct %s working directory." msgstr "Bitte korrektes Arbeitsverzeichnis für %s angeben." #. directory, subdirectory, game name #: ../src/game.c:1716 #, c-format msgid "" "Directory \"%s\" doesn't contain \"%s\" subdirectory.\n" "Please specify correct %s working directory." msgstr "" "\"%s\" enthält kein \"%s\" Unterverzeichnis.\n" "Bitte korrektes Arbeitsverzeichnis für %s angeben." #. %s Quake3 #: ../src/game.c:1773 #, c-format msgid "" "~/.q3a directory doesn't exist or doesn't contain\n" "\"baseq3\" (\"demoq3\") subdirectory.\n" "Please run %s client at least once before running XQF\n" "or specify correct %s working directory." msgstr "" "Das Verzeichnis ~/.q3a existiert nicht oder enthält\n" "kein \"baseq3\" (\"demoq3\") Unterverzeichnis\n" "Bitte rufen Sie %s mindestens einmal auf bevor Sie XQF aufrufen,\n" "oder geben Sie ein korrektes Arbeitsverzeichnis für %s an." #. %s directory, Quake3 #: ../src/game.c:1782 #, c-format msgid "" "\"%s\" directory doesn't exist or doesn't contain \"baseq3\" (\"demoq3\") " "subdirectory.\n" "Please specify correct %s working directory\n" "or leave it empty (~/.q3a is used by default)" msgstr "" "Das Verzeichnis \"%s\" existiert nicht oder enthält kein \"baseq3\" (\"demoq3" "\") Unterverzeichnis\n" "Bitte geben Sie ein korrektes Arbeitsverzeichnis für %s an,\n" "oder lassen Sie es leer (~/.q3a wird Standardmäßig benutzt)" #: ../src/game.c:1819 ../src/launch.c:339 ../src/xqf.c:981 ../src/xqf.c:994 msgid "Launch" msgstr "Starten" #. %s frontend.cfg #: ../src/game.c:1821 #, c-format msgid "" "Cannot write to file \"%s\".\n" "\n" "Launch client anyway?" msgstr "" "Kann die Datei \"%s\" nicht schreiben.\n" "\n" "Client trotzdem starten?" #: ../src/game.c:2448 msgid "" "The server has Punkbuster enabled but it is not going\n" "to be set on the command line.\n" "You may have problems connecting.\n" "You can fix this in the game preferences." msgstr "" "Der Server hat Punkbuster aktiviert, jedoch wird dies nicht\n" "auf der Kommandozeile gesetzt.\n" "Es können Probleme beim Verbinden auftreten.\n" "In den Einstellungen findet sich eine Option um dies zu beheben." #: ../src/launch.c:70 ../src/launch.c:195 msgid "XQF: ERROR!" msgstr "XQF: Fehler!" #: ../src/launch.c:70 #, c-format msgid "" "ERROR!\n" "\n" "%s(%s) failed: %s" msgstr "" "Fehler!\n" "\n" "%s(%s) fehlgeschlagen: %s" #: ../src/launch.c:195 #, c-format msgid "" "ERROR!\n" "\n" "%s" msgstr "" "Fehler!\n" "\n" "%s" #: ../src/launch.c:340 #, c-format msgid "" "There is %s client running.\n" "\n" "Launch %s client?" msgstr "" "%s läuft bereits.\n" "\n" "%s starten?" #: ../src/pref.c:646 msgid "com_soundmegs and com_zonemegs must be lower than com_hunkmegs" msgstr "com_soundmegs und com_zonemegs müssen weniger sein als com_hunkmegs" #: ../src/pref.c:1232 msgid "Invalid source IP address" msgstr "Ungültige Quell-IP-Adresse" #: ../src/pref.c:1244 msgid "Invalid source port range" msgstr "Ungültiger Quellport-Bereich" #. Top (Shirt) Color #: ../src/pref.c:1592 ../src/pref.c:1691 msgid "Top" msgstr "Oberteil" #. Bottom (Pants) Color #: ../src/pref.c:1608 ../src/pref.c:1707 msgid "Bottom" msgstr "Unterteil" #. Player Name #: ../src/pref.c:1854 ../src/pref.c:1965 ../src/pref.c:2025 ../src/pref.c:2077 #: ../src/xqf-ui.c:54 ../src/xqf-ui.c:129 msgid "Name" msgstr "Name" #: ../src/pref.c:1875 ../src/xqf-ui.c:141 msgid "Colors" msgstr "Farben" #: ../src/pref.c:1908 msgid "Login name" msgstr "Login Name" #: ../src/pref.c:1950 msgid "Skin/Colors" msgstr "Skin/Farben" #: ../src/pref.c:1986 msgid "Team" msgstr "Team" #: ../src/pref.c:2044 msgid "Model/Skin" msgstr "Model/Skin" #: ../src/pref.c:2131 msgid "--- Anything ---" msgstr "--- Beliebig ---" #: ../src/pref.c:2132 msgid "Axe" msgstr "Axe" #: ../src/pref.c:2133 msgid "Shotgun" msgstr "Shotgun" #: ../src/pref.c:2134 msgid "Super Shotgun" msgstr "Super Shotgun" #: ../src/pref.c:2135 msgid "Nailgun" msgstr "Nailgun" #: ../src/pref.c:2136 msgid "Super Nailgun" msgstr "Super Nailgun" #: ../src/pref.c:2137 msgid "Grenade Launcher" msgstr "Grenade Launcher" #: ../src/pref.c:2138 msgid "Rocket Launcher" msgstr "Rocket Launcher" #: ../src/pref.c:2139 msgid "ThunderBolt" msgstr "ThunderBolt" #: ../src/pref.c:2187 msgid "Use skins" msgstr "Skins benutzen" #: ../src/pref.c:2193 msgid "Don't use skins" msgstr "Skins nicht benutzen" #: ../src/pref.c:2199 msgid "Don't download new skins" msgstr "Keine neuen Skins runterladen" #: ../src/pref.c:2241 msgid "You must configure a command line first" msgstr "Sie müssen zuerst eine Kommandozeile eingeben" #: ../src/pref.c:2283 msgid "Game not found" msgstr "Spiel nicht gefunden" #. %s name of a game #: ../src/pref.c:2285 #, c-format msgid "%s not found" msgstr "%s nicht gefunden" #: ../src/pref.c:2333 #, c-format msgid "" "An entry already exists for the game %s.\n" "\n" "A default entry for this game will not be added.\n" "\n" "Delete the entry and try again." msgstr "" "Ein Eintrag für das Spiel %s existiert bereits.\n" "\n" "Der Standardwert wird nicht hinzugefügt.\n" "\n" "Löschen Sie den Eintrag und versuchen Sie es nochmal." #: ../src/pref.c:2375 msgid "There are no defaults for this game" msgstr "Es gibt keine Standardwerte für dieses Spiel" #: ../src/pref.c:2436 msgid "" "There is already an entry for this game.\n" "\n" "To modify it, select it from the list, modify it\n" "and then click Add/Update." msgstr "" "Es gibt bereits einen Eintrag für dieses Spiel.\n" "\n" "Um diesen zu verändern müssen Sie ihn auswählen, ändern\n" "und dann \"Hinzufügen\" klicken." #: ../src/pref.c:2440 msgid "You must enter both a game and at least one argument." msgstr "" "Sie müssen sowohl ein Spiel als auch mindestens ein Argument eintragen." #: ../src/pref.c:2539 msgid "Invoking" msgstr "Aufruf" #: ../src/pref.c:2546 msgid "*** Not Implemented ***" msgstr "*** Nicht Implementiert ***" #: ../src/pref.c:2558 msgid "Custom Args" msgstr "Eigene Argumente" #: ../src/pref.c:2570 msgid "Command Line" msgstr "Kommandozeile" #. translator: button for command suggestion #. translator: button for directory guess #: ../src/pref.c:2597 ../src/pref.c:2635 msgid "Suggest" msgstr "Vorschlagen" #: ../src/pref.c:2603 msgid "Searches the path for the game executable" msgstr "Durchsucht den Pfad nach der ausführbaren Datei des Spiels" #. /// #: ../src/pref.c:2610 msgid "Working Directory" msgstr "Arbeitsverzeichnis" #: ../src/pref.c:2640 msgid "Tries to guess the working directory based on the command line" msgstr "Versucht das Arbeitsverzeichnis anhand der Kommandozeile zu erraten" #: ../src/pref.c:2658 msgid "Custom CFG" msgstr "Eigene Config" #: ../src/pref.c:2763 ../src/xqf-ui.c:102 msgid "Game" msgstr "Spiel" #: ../src/pref.c:2771 msgid "Arguments" msgstr "Argumente" #: ../src/pref.c:2779 msgid "Game and Arguments" msgstr "Spiel und Argumente" #: ../src/pref.c:2802 msgid "Enter the game name from the game column" msgstr "Geben Sie das Spiel aus der \"Spiel\"-Spalte ein" #: ../src/pref.c:2811 msgid "Enter the arguments separated by spaces" msgstr "Geben Sie die Argumente getrennt durch Leerzeichen ein" #: ../src/pref.c:2837 msgid "Add Defaults" msgstr "Standards hinzufügen" #: ../src/pref.c:2845 msgid "Add/Update" msgstr "Hinzufügen" #. Common Options #: ../src/pref.c:3000 msgid "Common Options" msgstr "Gemeinsame Optionen" #: ../src/pref.c:3011 msgid "Disable CD Audio" msgstr "CD Audio deaktivieren" #. Disable Sound #: ../src/pref.c:3019 msgid "Disable Sound" msgstr "Sound deaktivieren" #: ../src/pref.c:3043 msgid "Do not set (use game default)" msgstr "Nicht setzen (Standard benutzen)" #: ../src/pref.c:3044 msgid "Automatically calculate from server ping time" msgstr "Automatisch aus dem Ping des Servers berechnen" #: ../src/pref.c:3045 msgid "Fixed value" msgstr "Fester Wert" #: ../src/pref.c:3113 msgid "Masterserver Protocol Version" msgstr "Masterserver Protokoll Version" #: ../src/pref.c:3136 msgid "set fs_game on connect" msgstr "fs_game beim Verbinden setzen" #: ../src/pref.c:3145 msgid "set cl_punkbuster on connect" msgstr "cl_punkbuster beim Verbinden setzen" #: ../src/pref.c:3154 #, fuzzy msgid "enable console" msgstr "Sound aktivieren" #: ../src/pref.c:3216 msgid "Pass memory settings on command line" msgstr "Speichereinstellungen auf der Kommandozeile übergeben" #. Mega Byte #: ../src/pref.c:3234 ../src/pref.c:3257 ../src/pref.c:3280 ../src/pref.c:3304 msgid "MB" msgstr "MB" #: ../src/pref.c:3238 msgid "com_hunkmegs" msgstr "com_hunkmegs" #: ../src/pref.c:3261 msgid "com_zonemegs" msgstr "com_zonemegs" #: ../src/pref.c:3284 msgid "com_soundmegs" msgstr "com_soundmegs" #: ../src/pref.c:3308 msgid "cg_precachedmodels" msgstr "cg_precachedmodels" #: ../src/pref.c:3317 msgid "Preset values" msgstr "Vordefinierte Werte" #: ../src/pref.c:3324 msgid "Default" msgstr "Standard" #: ../src/pref.c:3330 msgid "128MB" msgstr "128MB" #: ../src/pref.c:3336 msgid ">256MB" msgstr ">256MB" #: ../src/pref.c:3355 ../src/pref.c:3584 ../src/pref.c:3590 msgid "Options" msgstr "Optionen" #: ../src/pref.c:3358 msgid "Memory" msgstr "Speicher" #. QW Specific Features #. 'w_switch' & 'b_switch' control #: ../src/pref.c:3387 msgid "The highest weapon that Quake should switch to..." msgstr "Die höchste Waffe zu der Quake wechseln soll..." #: ../src/pref.c:3400 msgid "upon a weapon pickup" msgstr "beim Waffe aufheben" #: ../src/pref.c:3418 msgid "upon a backpack pickup" msgstr "beim Rucksack aufheben" #: ../src/pref.c:3439 msgid "Disable auto-aiming" msgstr "auto-aiming deaktivieren" #: ../src/pref.c:3477 msgid "Skins" msgstr "Skins" #: ../src/pref.c:3499 msgid "Rate" msgstr "Rate" #. 'pushlatency' #: ../src/pref.c:3523 msgid "pushlatency" msgstr "pushlatency" #. Troubleshooting #: ../src/pref.c:3538 msgid "Troubleshooting" msgstr "Fehlersuche" #: ../src/pref.c:3551 msgid "Disable delta-compression (cl_nodelta)" msgstr "delta-Kompression deaktivieren (cl_nodelta)" #: ../src/pref.c:3565 msgid "Disable player/entity prediction (cl_predict_players)" msgstr "Spieler/entity Vorhersage deaktivieren (cl_predict_players)" #: ../src/pref.c:3583 msgid "Weapons" msgstr "Waffen" #: ../src/pref.c:3585 ../src/pref.c:3591 ../src/pref.c:3596 ../src/pref.c:3601 msgid "Player Profile" msgstr "Spieler Profil" #: ../src/pref.c:3677 msgid "Icons" msgstr "Icons" #: ../src/pref.c:3677 msgid "Text" msgstr "Text" #: ../src/pref.c:3677 msgid "Both" msgstr "Beides" # src/pref.c: #: ../src/pref.c:3683 msgid "Server List" msgstr "Server Liste" #: ../src/pref.c:3696 msgid "Show host names" msgstr "Hostnamen anzeigen" #: ../src/pref.c:3701 msgid "Show hostnames instead of IP addresses if possible" msgstr "Hostnamen statt IP Adressen anzeigen wenn möglich" #: ../src/pref.c:3712 msgid "Show default port" msgstr "Standard Port anzeigen" #: ../src/pref.c:3727 msgid "Do not count bots as players" msgstr "Bots nicht als Spieler zählen" #: ../src/pref.c:3743 msgid "Sort servers real-time during refresh" msgstr "Server in Echtzeit während der Auffrischung sortieren" #: ../src/pref.c:3758 msgid "Refresh on update" msgstr "Beim Aktualisieren auffrischen" #: ../src/pref.c:3774 msgid "Resolve hostnames on update" msgstr "Hostnamen bei Update auflösen" #: ../src/pref.c:3778 msgid "Enable or disable DNS resolution of IP addresses" msgstr "(De)Aktivieren der DNS Auflösung von IP-Adressen" #: ../src/pref.c:3792 msgid "Show only configured games" msgstr "Nur konfigurierte Spiele anzeigen" #: ../src/pref.c:3808 msgid "Use custom color settings" msgstr "Eigene Farbeinstellungen verwenden" #: ../src/pref.c:3810 msgid "" "Use XQF's color settings instead of the system ones. You need to restart XQF " "for this setting to take effect. Note that you may need to install the gtk-" "engines package." msgstr "" "XQF Farbeinstellungen statt Systemeinstellungen verwenden. Sie müssen XQF " "neu starten damit diese Option wirkt. Beachten Sie, daß das gtk-engines " "Paket evtl installiert sein muß." #. Toolbar #: ../src/pref.c:3831 msgid "Toolbar" msgstr "Werkzeugleiste" #. Toolbar Tips #: ../src/pref.c:3856 msgid "Tooltips" msgstr "Werkzeugtips" #. On Startup #: ../src/pref.c:3899 msgid "On Startup" msgstr "Beim Starten" #: ../src/pref.c:3912 msgid "Refresh Favorites" msgstr "Favoriten auffrischen" #: ../src/pref.c:3925 msgid "Show splash screen" msgstr "Begrüßungsbildschirm zeigen" #: ../src/pref.c:3939 msgid "Scan for maps" msgstr "Nach Karten suchen" #: ../src/pref.c:3944 msgid "" "Scan game directories for installed maps. xqf will take longer to start up " "when enabled." msgstr "" "Spielverzeichnisse nach Karten durchsuchen. Der Start von xqf dauert länger " "wenn diese Option angeschaltet ist." #: ../src/pref.c:3951 msgid "scan now" msgstr "Jetzt suchen" #: ../src/pref.c:3967 msgid "Minimize to system tray" msgstr "In die Systemablage minimieren" #: ../src/pref.c:3971 msgid "Enable xqf tray icon. You need to restart xqf for this to take effect." msgstr "" "Icon in der Systemablage aktivieren. XQF muß neu gestartet werden damit dies " "funktioniert." #. On Exit #: ../src/pref.c:3984 msgid "On Exit" msgstr "Beim Beenden" #: ../src/pref.c:3997 msgid "Save server lists" msgstr "Serverlisten speichern" #: ../src/pref.c:4012 msgid "Save server information" msgstr "Serverinformationen speichern" #: ../src/pref.c:4029 msgid "Save player information" msgstr "Spielerinformationen speichern" #. When launching a Game #: ../src/pref.c:4045 msgid "When launching a game..." msgstr "Beim Spielstart..." #: ../src/pref.c:4059 msgid "Terminate XQF" msgstr "XQF beenden" #: ../src/pref.c:4074 msgid "Iconify XQF window" msgstr "XQF minimieren" #: ../src/pref.c:4089 msgid "Create LaunchInfo.txt" msgstr "LaunchInfo.txt anlegen" #: ../src/pref.c:4095 msgid "" "Creates the file ~/.qf/LaunchInfo.txt with: ping ip:port name map curplayers " "maxplayers" msgstr "" "Erstellt die Datei ~/.qf/LaunchInfo.txt mit: Ping IP:Port Name Karte Spieler " "Max.Spieler" #: ../src/pref.c:4101 msgid "Execute prelaunch" msgstr "'prelaunch' ausführen" #: ../src/pref.c:4107 msgid "Executes ~/.qf/PreLaunch (if it exists) before launching the game" msgstr "" "Führt ~/.qf/PreLaunch vor dem Start eines Spiels aus (wenn es existiert)" #: ../src/pref.c:4116 msgid "Stop current song in XMMS" msgstr "Aktuelles Lied in XMMS stoppen" #: ../src/pref.c:4119 msgid "" "Stopping XMMS will release /dev/dsp. Activate this option if you use XMMS " "and have a cheap soundcard that allows only one application to open /dev/dsp." msgstr "" "Das Stoppen von XMMS gibt /dev/dsp frei. Aktivieren Sie diese Option, wenn " "Sie XMMS benutzen und eine billige Soundkarte haben, die nur einer Anwendung " "gleichzeitig erlaubt /dev/dsp zu öffnen." #. QStat preferences -- maxsimultaneous & maxretries #: ../src/pref.c:4158 msgid "QStat Options" msgstr "QStat Optionen" #. maxsimultaneous #: ../src/pref.c:4169 msgid "Number of simultaneous servers to query" msgstr "Anzahl gleichzeitig abzufragender Server" #. maxretries #: ../src/pref.c:4193 msgid "Number of retries" msgstr "Anzahl Versuche" #. srcip #: ../src/pref.c:4212 msgid "Source IP Address" msgstr "Quell-IP-Adresse:" #: ../src/pref.c:4233 msgid "Source Port Range" msgstr "Quellport Bereich" #. Translator: sound test button #: ../src/pref.c:4296 msgid "Test" msgstr "Test" #. Sound Enable / Disable frame #. Sounds Enable / Disable #: ../src/pref.c:4313 msgid "Sound Enable / Disable" msgstr "Sound (De)Aktivieren" #: ../src/pref.c:4327 msgid "Enable Sound" msgstr "Sound aktivieren" #. Sound Player #: ../src/pref.c:4338 msgid "Player program" msgstr "Abspielprogramm" #. Sound Files frame #. Sounds preferences -- player and various sounds #: ../src/pref.c:4366 msgid "Sound Files" msgstr "Sound Dateien" #. Sound XQF Start #: ../src/pref.c:4378 msgid "XQF Start" msgstr "XQF Start" #. Sound XQF Quit #: ../src/pref.c:4410 msgid "XQF Quit" msgstr "XQF Beenden" #. Sound Update Done #: ../src/pref.c:4442 msgid "Update Done" msgstr "Aktualisieren fertig" #. Sound Refresh Done #: ../src/pref.c:4475 msgid "Refresh Done" msgstr "Auffrischen fertig" #. Sound Stop #: ../src/pref.c:4508 ../src/xqf.c:3071 ../src/trayicon.c:462 msgid "Stop" msgstr "Stop" #. Sound Server Connect #: ../src/pref.c:4541 msgid "Server Connect" msgstr "Verbinden" #. Sound Redial Success Start #: ../src/pref.c:4574 msgid "Redial Success" msgstr "Wahlwiederholung geglückt" #: ../src/pref.c:4702 msgid "XQF: Preferences" msgstr "XQF: Einstellungen" # src/pref.c #: ../src/pref.c:4722 msgid "General" msgstr "Allgemein" #: ../src/pref.c:4734 msgid "Games" msgstr "Spiele" #: ../src/pref.c:4739 msgid "Appearance" msgstr "Erscheinungsbild" #: ../src/pref.c:4744 msgid "QStat" msgstr "QStat" #: ../src/pref.c:4749 msgid "Sounds" msgstr "Sounds" #: ../src/pref.c:4754 msgid "Scripts" msgstr "Skripte" #: ../src/pref.c:4895 msgid "Unable to get user name/home/tmpdir" msgstr "Konnte Benutzername, Heimatverzeichnis oder tmpdir nicht ermitteln" #. translator: %s = game name, e.g. Quake 3 Arena #: ../src/pref.c:5227 #, c-format msgid "Searching for %s maps" msgstr "Suche nach Karten für %s" #: ../src/pref.c:5281 msgid "Game Command Selection" msgstr "Kommando Auswählen" #: ../src/pref.c:5290 msgid "Game Directory Selection" msgstr "Verzeichnis auswählen" #: ../src/pref.c:5295 msgid "Sound Player Selection" msgstr "Soundspieler auswählen" #: ../src/pref.c:5300 msgid "XQF Start Sound Selection" msgstr "XQF Start Sound Auswahl" #: ../src/pref.c:5305 msgid "XQF Quit Sound Selection" msgstr "XQF Beenden Sound Auswahl" #: ../src/pref.c:5310 msgid "Update Done Sound Selection" msgstr "Aktualisieren fertig Sound Auswahl" #: ../src/pref.c:5315 msgid "Refresh Done Sound Selection" msgstr "Auffrischen fertig Sound Auswahl" #: ../src/pref.c:5320 msgid "Stop Sound Selection" msgstr "Stop Sound Auswahl" #: ../src/pref.c:5325 msgid "Server Connect Sound Selection" msgstr "Verbinden Sound Auswahl" #: ../src/pref.c:5330 msgid "Redial Success Sound Selection" msgstr "Wahlwiederholung geglückt Sound Auswahl" #: ../src/psearch.c:51 msgid "Exact Match" msgstr "Genaue Übereinstimmung" #: ../src/psearch.c:52 msgid "Substring" msgstr "Substring" #: ../src/psearch.c:53 msgid "Regular Expression" msgstr "Regulärer Ausdruck" #: ../src/psearch.c:174 msgid "Find Player" msgstr "Spieler suchen" #. Pattern Entry #: ../src/psearch.c:185 msgid "Find Player:" msgstr "Spieler suchen:" #: ../src/psearch.c:394 msgid "Player not found." msgstr "Spieler nicht gefunden" #: ../src/psearch.c:398 msgid "XQF: End of server list reached" msgstr "XQF: Ende der Serverliste erreicht" #: ../src/psearch.c:399 msgid "Continue search from beginning?" msgstr "Suche von vorne beginnen?" #. Message #: ../src/rcon.c:550 msgid "Cmd:" msgstr "Kommando:" #. Send Button #: ../src/rcon.c:577 msgid "Send" msgstr "Senden" #. Status Button #: ../src/rcon.c:586 msgid "Status" msgstr "Status" #. Clear Button #: ../src/rcon.c:595 msgid "Clear" msgstr "Löschen" #: ../src/rcon.c:617 ../src/statistics.c:849 msgid "Close" msgstr "Schließen" #: ../src/rcon.c:717 #, c-format msgid "Usage: %s [server type] \n" msgstr "Verwendung: %s [Servertyp] \n" #: ../src/rcon.c:718 #, fuzzy, c-format msgid " server type is either --qws, --hws, --hls or --dm3s.\n" msgstr " Servertyp ist entweder --qws, --hws oder --hls.\n" #: ../src/rcon.c:719 #, c-format msgid " If no server type is specified, Q3 style rcon is assumed.\n" msgstr " Wenn kein Servertyp angegeben ist, wird Q3-Stil angenommen.\n" #. translator: readline prompt #: ../src/rcon.c:756 msgid "Password: " msgstr "Passwort: " #: ../src/redial.c:123 #, c-format msgid "" "Waiting for free slots on\n" "%s" msgstr "" "Warte auf freien Platz auf\n" "%s" #: ../src/redial.c:125 #, c-format msgid "" "Refreshing\n" "%s" msgstr "" "Aktualisiere\n" "%s" #. * window code modified from glade #: ../src/redial.c:179 ../src/redial.c:184 msgid "XQF: Redialing" msgstr "XQF: Wahlwiederholung" #: ../src/redial.c:196 msgid "" "***\n" "***" msgstr "" "***\n" "***" #: ../src/redial.c:219 msgid "Launch now" msgstr "Jetzt starten" #: ../src/source.c:66 msgid "Standard" msgstr "Standard" #: ../src/source.c:67 msgid "Gamespy" msgstr "Gamespy" #: ../src/source.c:68 msgid "http" msgstr "http" #: ../src/source.c:70 msgid "File" msgstr "Datei" #: ../src/source.c:122 msgid "Retry" msgstr "Wiederholen" #: ../src/source.c:122 msgid "Skip" msgstr "Überspringen" #: ../src/source.c:123 #, c-format msgid "" "Cannot write to file %s\n" "System Error: %s\n" msgstr "" "In Datei %s kann nicht geschrieben werden\n" "Fehler: %s\n" #. translator: %s == url, eg gmaster://bla.blub.org #: ../src/source.c:891 #, c-format msgid "You have to specify a port number for %s." msgstr "Sie müssen eine Portnummer für %s angeben" #: ../src/source.c:905 #, c-format msgid "'gsmtype' options missing for master %s." msgstr "'gsmtype' Optionen fehlen für Master %s." #: ../src/source.c:1439 msgid "Favorites" msgstr "Favoriten" #: ../src/srv-prop.c:423 msgid "IP Address:" msgstr "IP Adresse:" #: ../src/srv-prop.c:433 msgid "Port:" msgstr "Port:" #: ../src/srv-prop.c:447 msgid "Host Name:" msgstr "Hostname:" #: ../src/srv-prop.c:461 msgid "Country:" msgstr "Land:" #: ../src/srv-prop.c:489 msgid "Refreshed:" msgstr "Aufgefrischt:" #. translator: last time and date the server answered the query #: ../src/srv-prop.c:507 msgid "Last answer:" msgstr "Letzte Antwort:" #: ../src/srv-prop.c:564 msgid "Reserved Slots:" msgstr "Reservierte Plätze:" #. Sources #: ../src/srv-prop.c:583 msgid "Sources" msgstr "Quellen" #: ../src/srv-prop.c:635 msgid "Custom CFG:" msgstr "Eigene Config:" #: ../src/srv-prop.c:684 msgid "Server Password" msgstr "Server Passwort" #: ../src/srv-prop.c:690 msgid "Spectator Password" msgstr "Zuschauer Passwort" #: ../src/srv-prop.c:697 msgid "RCon/Admin Password" msgstr "RCon/Admin Passwort" #: ../src/srv-prop.c:728 msgid "This server sucks" msgstr "Dieser Server stinkt" #: ../src/srv-prop.c:771 ../src/xqf.c:2603 ../src/xqf.c:2741 msgid "Properties" msgstr "Einstellungen" #: ../src/srv-prop.c:816 msgid "Info" msgstr "Info" #: ../src/srv-prop.c:821 msgid "Passwords" msgstr "Passwörter" #: ../src/srv-prop.c:826 msgid "Comment" msgstr "Kommentar" #: ../src/stat.c:728 msgid "Allies" msgstr "Alliierte" #: ../src/stat.c:728 msgid "Axis" msgstr "Achse" #: ../src/stat.c:734 msgid "Red" msgstr "Rot" #: ../src/stat.c:734 msgid "Blue" msgstr "Blau" #: ../src/stat.c:1376 #, c-format msgid "" "UT2004 CD Key not found, cannot query master '%s'.\n" "Make sure the working directory is set correctly." msgstr "" "UT2004 CD Key nicht gefunden, kann master '%s' nicht abfragen.\n" "Stellen Sie sicher, daß das Arbeitsverzeichnis richtig eingestellt ist." #: ../src/stat.c:1559 #, c-format msgid "Failed to create a temporary file %s: %s" msgstr "Temporäre Datei %s kann nicht erzeugt werden: %s" #. The space behind up and down is to make the strings different from #. those in flt-player.c because their meaning is different in german #: ../src/statistics.c:82 ../src/statistics.c:93 msgid "Servers" msgstr "Server" #: ../src/statistics.c:82 msgid "Up " msgstr "Up " #: ../src/statistics.c:82 msgid "Timeout" msgstr "Timeout" #: ../src/statistics.c:82 msgid "Down " msgstr "Down " #: ../src/statistics.c:82 msgid "Info n/a" msgstr "Unbekannt" #: ../src/statistics.c:82 ../src/statistics.c:504 ../src/xqf-ui.c:88 msgid "Players" msgstr "Spieler" #: ../src/statistics.c:86 ../src/statistics.c:90 msgid "unknown" msgstr "unbekannt" #: ../src/statistics.c:94 msgid "OS/CPU" msgstr "OS/CPU" #: ../src/statistics.c:95 ../src/xqf-ui.c:65 msgid "Country" msgstr "Land" #: ../src/statistics.c:450 ../src/statistics.c:498 ../src/statistics.c:503 msgid "Total" msgstr "Gesamt" #: ../src/statistics.c:493 msgid "CPU \\ OS" msgstr "CPU \\ OS" #: ../src/statistics.c:721 msgid "All Games" msgstr "Alle Spiele" #: ../src/statistics.c:803 ../src/statistics.c:812 msgid "Statistics" msgstr "Statistiken" #. error converting time to string representation, shouldn't happen #: ../src/utils.c:903 msgid "" msgstr "" #: ../src/utils.c:1126 msgid "Can't open source file for reading" msgstr "Kann Quelldatei nicht zum Lesen öffnen" #: ../src/utils.c:1133 msgid "Can't open destination file for writing" msgstr "Kann Zieldatei nicht zum Schreiben öffnen" #: ../src/utils.c:1141 msgid "write error on destination file" msgstr "Schreibfehler auf Zieldatei" #: ../src/utils.c:1148 msgid "read error on source file" msgstr "Lesefehler auf Quelldatei" #: ../src/xqf-ui.c:58 msgid "Type" msgstr "Typ" #: ../src/xqf-ui.c:61 msgid "Address" msgstr "Adresse" #: ../src/xqf-ui.c:68 ../src/xqf-ui.c:153 msgid "Ping" msgstr "Ping" #: ../src/xqf-ui.c:74 msgid "TO" msgstr "TO" #: ../src/xqf-ui.c:80 msgid "Priv" msgstr "Priv" #. Translator: "PunkBuster" #: ../src/xqf-ui.c:85 msgid "PB" msgstr "PB" #. Translator: Max as in max players #: ../src/xqf-ui.c:93 msgid "Max" msgstr "Max" #: ../src/xqf-ui.c:96 msgid "Map" msgstr "Karte" #: ../src/xqf-ui.c:108 msgid "GameType" msgstr "Spiel Typ" #: ../src/xqf-ui.c:135 msgid "Frags" msgstr "Frags" #: ../src/xqf-ui.c:147 msgid "Skin" msgstr "Skin" #: ../src/xqf-ui.c:159 msgid "Time" msgstr "Zeit" #: ../src/xqf-ui.c:179 msgid "Rule" msgstr "Regel" #: ../src/xqf-ui.c:185 msgid "Value" msgstr "Wert" #: ../src/xqf-ui.c:575 msgid "Source" msgstr "Quelle" #: ../src/xqf.c:349 #, c-format msgid "%d server" msgstr "%d Server" #: ../src/xqf.c:349 #, c-format msgid "%d servers" msgstr "%d Server" #. server filter #: ../src/xqf.c:597 #, c-format msgid "None <--" msgstr "Keiner <--" #: ../src/xqf.c:599 ../src/xqf.c:3201 ../src/xqf.c:3258 ../src/xqf.c:3403 #, c-format msgid "None" msgstr "Keiner" #: ../src/xqf.c:613 #, c-format msgid "Filter %d <--" msgstr "Filter %d <--" #: ../src/xqf.c:615 #, c-format msgid "Filter %d" msgstr "Filter %d" #: ../src/xqf.c:637 #, c-format msgid "No Server Filter Active" msgstr "Kein Server Filter aktiv" #: ../src/xqf.c:644 #, c-format msgid "Server Filter: %s" msgstr "Server Filter: %s" #: ../src/xqf.c:648 #, c-format msgid "Server Filter: %d" msgstr "Server Filter: %d" #: ../src/xqf.c:815 msgid "Updating lists..." msgstr "Aktualisiere Listen ..." #: ../src/xqf.c:821 #, c-format msgid "Resolving host names: %d/%d" msgstr "Löse Hostnamen auf: %d/%d" #: ../src/xqf.c:825 #, c-format msgid "Refreshing: %d/%d" msgstr "Aktualisiere: %d/%d" #: ../src/xqf.c:831 #, c-format msgid "Resolving host addresses: %d/%d" msgstr "Löse Hostnamen auf: %d/%d" #: ../src/xqf.c:958 msgid "" "You said this servers sucks.\n" "Do you want to risk a game this time?" msgstr "" "Sie sagten dieser Server stinkt.\n" "Wollen Sie trotzdem ein Spiel riskieren?" #: ../src/xqf.c:970 #, c-format msgid "" "This server is not compatible with the version of %s you have installed.\n" "Launch client anyway?" msgstr "" "Dieser Server ist nicht kompatibel mit der installierten %s Version.\n" "Spiel trotzdem starten?" #: ../src/xqf.c:982 #, c-format msgid "" "Server %s:%d is %s.\n" "\n" "Launch client anyway?" msgstr "" "Server %s:%d ist %s.\n" "\n" "Spiel trotzdem starten?" #: ../src/xqf.c:995 #, c-format msgid "" "Server %s:%d is full.\n" "\n" "Launch client anyway?" msgstr "" "Server %s:%d ist voll.\n" "\n" "Spiel trotzdem starten?" #: ../src/xqf.c:1108 ../src/xqf.c:1128 ../src/xqf.c:2003 msgid "Save Password" msgstr "Passwort Speichern" #: ../src/xqf.c:1108 msgid "Spectator Password:" msgstr "Zuschauer Passwort:" #: ../src/xqf.c:1128 ../src/xqf.c:2003 msgid "Server Password:" msgstr "Server Passwort:" #: ../src/xqf.c:1279 msgid "Spectator" msgstr "Zuschauer" #: ../src/xqf.c:1280 ../src/xqf.c:1283 msgid "Demo name:" msgstr "Demo Name:" #: ../src/xqf.c:1525 #, c-format msgid "Host %s not found" msgstr "Host %s nicht gefunden" #: ../src/xqf.c:1545 ../src/xqf.c:3815 #, c-format msgid "\"%s\" is not valid host[:port] combination." msgstr "\"%s\" ist keine zulässige host[:port] Kombination" #: ../src/xqf.c:1646 #, fuzzy msgid "Remove selected servers from all lists?" msgstr "Ausgewählte Server auffrischen" #. translator: %s == url #: ../src/xqf.c:1791 #, c-format msgid "" "For Gslist support you must install the 'gslist' program available from\n" "%s\n" "Don't forget that you need to run 'gslist -u' before you can use it." msgstr "" "Für Gslist-Unterstützung müssen sie das 'gslist' Programm installieren.\n" "Sie erhalten es unter\n" "%s\n" "Vergessen Sie nicht, daß Sie 'gslist -u' aufrufen müssen, bevor Sie es " "benutzen können." #: ../src/xqf.c:1862 msgid "You have to select the server you want to delete" msgstr "Sie müssen den Server auswählen den sie löschen möchten" #: ../src/xqf.c:1868 #, c-format msgid "" "Master%s to delete:\n" "\n" "%s" msgstr "" "Master%s löschen:\n" "\n" "%s" #: ../src/xqf.c:1891 #, c-format msgid "Find Player: %s" msgstr "Spieler suchen: %s" #: ../src/xqf.c:1983 msgid "Done." msgstr "Fertig." #: ../src/xqf.c:2525 ../src/xqf.c:3081 msgid "Connect" msgstr "Verbinden" #: ../src/xqf.c:2530 ../src/xqf.c:3090 msgid "Observe" msgstr "Beobachten" #: ../src/xqf.c:2535 ../src/xqf.c:3098 msgid "Record Demo" msgstr "Demo aufnehmen" #: ../src/xqf.c:2549 msgid "Add new Server" msgstr "Hinzufügen" #: ../src/xqf.c:2554 msgid "Add to Favorites" msgstr "Zu Favoriten hinzufügen" #: ../src/xqf.c:2559 #, fuzzy msgid "Remove" msgstr "Umbenennen" #: ../src/xqf.c:2564 ../src/xqf.c:2613 msgid "Copy" msgstr "Kopieren" #: ../src/xqf.c:2569 msgid "Copy+" msgstr "Kopieren+" #: ../src/xqf.c:2577 ../src/xqf.c:3055 ../src/trayicon.c:452 msgid "Refresh" msgstr "Auffrischen" #: ../src/xqf.c:2582 msgid "Refresh Selected" msgstr "Ausgewählten auffrischen" #: ../src/xqf.c:2590 msgid "DNS Lookup" msgstr "DNS auflösen" #: ../src/xqf.c:2598 msgid "RCon" msgstr "RCon" #: ../src/xqf.c:2621 msgid "_Statistics" msgstr "_Statistiken" #: ../src/xqf.c:2629 msgid "_Exit" msgstr "Be_enden" #: ../src/xqf.c:2640 ../src/xqf.c:2705 msgid "Add _Master" msgstr "_Master hinzufügen " #: ../src/xqf.c:2645 ../src/xqf.c:2710 msgid "_Rename Master" msgstr "Master _umbenennen " #: ../src/xqf.c:2650 ../src/xqf.c:2715 msgid "D_elete Master" msgstr "_Master löschen" #: ../src/xqf.c:2655 ../src/xqf.c:2720 msgid "_Clear Servers" msgstr "Server _aufräumen" #: ../src/xqf.c:2665 ../src/xqf.c:2825 msgid "_Add new Server" msgstr "_Neuen Server hinzufügen" #: ../src/xqf.c:2670 ../src/xqf.c:2830 msgid "Add to _Favorites" msgstr "Zu Favoriten hin_zufügen" #: ../src/xqf.c:2675 ../src/xqf.c:2835 #, fuzzy msgid "_Remove" msgstr "Umbenennen" #: ../src/xqf.c:2680 msgid "_Copy" msgstr "_Kopieren" #: ../src/xqf.c:2685 msgid "_Copy+" msgstr "Kopieren+" #: ../src/xqf.c:2693 msgid "Add Default Masters" msgstr "Standard Master hinzufügen" #: ../src/xqf.c:2699 msgid "Add Gslist Masters" msgstr "Gslist Master hinzufügen" #: ../src/xqf.c:2728 msgid "_Find Player" msgstr "S_pieler suchen" #: ../src/xqf.c:2733 msgid "Find A_gain" msgstr "_Nochmal suchen" #: ../src/xqf.c:2751 msgid "_Refresh" msgstr "_Auffrischen" #: ../src/xqf.c:2756 msgid "Refresh _Selected" msgstr "A_usgewählte auffrischen" #: ../src/xqf.c:2761 msgid "_Update From Master" msgstr "Vom Master a_ktualisieren" #: ../src/xqf.c:2769 msgid "Show _Host Names" msgstr "_Hostnamen anzeigen" #: ../src/xqf.c:2774 msgid "Show Default _Port" msgstr "Standard_port anzeigen" #: ../src/xqf.c:2800 msgid "_Connect" msgstr "_Verbinden" #: ../src/xqf.c:2805 msgid "_Observe" msgstr "_Beobachten" #: ../src/xqf.c:2810 msgid "Record _Demo" msgstr "_Demo aufnehmen" #: ../src/xqf.c:2841 msgid "DNS _Lookup" msgstr "DNS _auflösen" #: ../src/xqf.c:2849 msgid "_RCon" msgstr "_RCon" #: ../src/xqf.c:2854 msgid "_Properties" msgstr "_Eigenschaften" # src/xqf.c #: ../src/xqf.c:2864 msgid "_General" msgstr "_Allgemein" #: ../src/xqf.c:2870 msgid "_Games" msgstr "_Spiele " #: ../src/xqf.c:2876 msgid "_Appearance" msgstr "Erscheinungs_bild" #: ../src/xqf.c:2882 msgid "_QStat" msgstr "_QStat" #: ../src/xqf.c:2888 msgid "_Sounds" msgstr "_Sounds" #: ../src/xqf.c:2894 msgid "S_cripts" msgstr "S_kripte" #: ../src/xqf.c:2904 msgid "_Server Filter" msgstr "_Server Filter" #: ../src/xqf.c:2909 msgid "Player _Filter" msgstr "Spieler _Filter" #: ../src/xqf.c:2919 msgid "_About" msgstr "_Über " #: ../src/xqf.c:2930 msgid "_File" msgstr "_Datei" #: ../src/xqf.c:2935 msgid "_Edit" msgstr "_Bearbeiten" #: ../src/xqf.c:2940 msgid "_View" msgstr "_Ansicht" #: ../src/xqf.c:2945 msgid "_Server" msgstr "_Server" #: ../src/xqf.c:2950 msgid "_Preferences" msgstr "_Einstellungen" #: ../src/xqf.c:2956 msgid "_Server Filters" msgstr "Server_filter" #: ../src/xqf.c:2962 msgid "_Help" msgstr "_Hilfe" #: ../src/xqf.c:3005 msgid "Mark as Red" msgstr "Rot Markieren" #: ../src/xqf.c:3012 msgid "Mark as Green" msgstr "Grün Markieren" #: ../src/xqf.c:3019 msgid "Mark as Blue" msgstr "Blau Markieren" #: ../src/xqf.c:3026 msgid "Add to Player Filter" msgstr "Zu Spielerfilter hinzufügen" #: ../src/xqf.c:3047 ../src/trayicon.c:457 msgid "Update" msgstr "Aktualisieren" #: ../src/xqf.c:3047 msgid "Update from master" msgstr "Vom Master aktualisieren" #: ../src/xqf.c:3055 msgid "Refresh current list" msgstr "Aktuelle Liste auffrischen" #: ../src/xqf.c:3063 msgid "Ref.Sel." msgstr "Ausg.Auffr." #: ../src/xqf.c:3063 msgid "Refresh selected servers" msgstr "Ausgewählte Server auffrischen" #: ../src/xqf.c:3098 msgid "Record" msgstr "Aufnehmen" #. Translators: e.g. Server Filter #: ../src/xqf.c:3116 #, c-format msgid "%s Filter Enable / Disable" msgstr "%s Filter (De)Aktivieren" #. Translators: e.g. Server Filter Configuration #: ../src/xqf.c:3138 #, c-format msgid "%s Filter Configuration" msgstr "%s Filter Konfiguration" #: ../src/xqf.c:3240 msgid "Configure" msgstr "Konfigurieren" #: ../src/xqf.c:3383 msgid "Filters" msgstr "Filter" #: ../src/xqf.c:3552 msgid "Quick Filter:" msgstr "Schnellfilter:" #: ../src/xqf.c:3729 msgid "no sound player configured" msgstr "Kein Soundspieler konfiguriert" #: ../src/xqf.c:3767 msgid "" "Usage:\n" "\txqf [OPTIONS]\n" "\n" "OPTIONS:\n" "\t--launch \"[SERVERTYPE] IP\"\tlaunch game on specified server\n" "\t--add \"[SERVERTYPE] IP\"\tadd specified server to favorites\n" "\t--debug \t\t\tset debug level\n" "\t--version\t\t\tprint version and exit\n" msgstr "" "Verwendung:\n" "\txqf [OPTIONEN]\n" "\n" "OPTIONEN:\n" "\t--launch \"[SERVERTYP] IP\"\tSpiel auf angegebenem Server starten\n" "\t--add \"[SERVERTYP] IP\"\tAngegebenen Server zu Favoriten hinzufügen\n" "\t--debug \t\t\tdebug level setzen\n" "\t--version\t\t\tVersion anzeigen und Beenden\n" #: ../src/xqf.c:4019 msgid "Reading server lists" msgstr "Lese Serverlisten" #: ../src/xqf.c:4036 #, c-format msgid "You need at least qstat version %s for xqf to function properly" msgstr "" "Sie benötigen mindestens qstat Version %s damit xqf richtig funktioniert" #: ../src/xqf.c:4040 msgid "Loading icons ..." msgstr "Lade Icons ..." #: ../src/xqf.c:4046 msgid "Starting ..." msgstr "Starten ..." #: ../src/splash.c:61 msgid "XQF: Loading" msgstr "XQF: Lade" #: ../src/splash.c:90 msgid "Loading ..." msgstr "Lade ..." #. translator: %s = file name #: ../src/country-filter.c:220 ../src/loadpixmap.c:213 ../src/loadpixmap.c:226 #: ../src/loadpixmap.c:245 ../src/loadpixmap.c:257 #, c-format msgid "Error loading pixmap file: %s" msgstr "Fehler beim Laden von Pixmapdatei %s" #: ../src/trayicon.c:376 ../src/trayicon.c:382 ../src/trayicon.c:390 #: ../src/trayicon.c:396 ../src/trayicon.c:410 #, c-format msgid "Error in file: %s line: %d\n" msgstr "Fehler in Datei %s, Zeile %d\n" #. translator: show main window #: ../src/trayicon.c:473 msgid "Show" msgstr "Anzeigen" #. translator: hide main window #: ../src/trayicon.c:479 msgid "Hide" msgstr "Verstecken" #: ../src/trayicon.c:484 msgid "Exit" msgstr "Beenden" #~ msgid "XQF" #~ msgstr "XQF" #~ msgid "vm_cgame fix" #~ msgstr "vm_cgame fix" #~ msgid "Rocketarena fix" #~ msgstr "Rocketarena fix" #~ msgid "Remove from Favorites" #~ msgstr "Aus Favoriten löschen" #~ msgid "_Remove from Favorites" #~ msgstr "Aus Favoriten _löschen" #~ msgid "OS" #~ msgstr "BS" #~ msgid "_QStat Options" #~ msgstr "_QStat Optionen" #~ msgid "_Sound Options" #~ msgstr "_Sound Optionen" #~ msgid "" #~ "Note: You need to create a qstat config file for this game to work.\n" #~ "Please see the XQF documentation for more information." #~ msgstr "" #~ "Hinweis: Sie müssen eine Konfigurationsdatei für qstat anlegen damit\n" #~ "dieses Spiel funktioniert. In der XQF Dokumentation erhalten Sie\n" #~ "mehr Information." #~ msgid "QuakeForge workaround (uses base/ instead of id1/)" #~ msgstr "QuakeForge Workaround (benutzt base/ statt id1/)" #, fuzzy #~ msgid "Q Filter" #~ msgstr "S Filter" #, fuzzy #~ msgid "nothing yet..." #~ msgstr "Lade ..." #~ msgid "Generic Gamespy" #~ msgstr "Allgemein Gamespy" #~ msgid "Guess" #~ msgstr "Raten" #~ msgid "X11 Quake/QuakeWorld/Quake2/Quake3 Front-End\n" #~ msgstr "X11 Quake/QuakeWorld/Quake2/Quake3 Front-End\n" #~ msgid "Significant Contributors:" #~ msgstr "wesentlich Mitwirkende:" #~ msgid "Bug reports:" #~ msgstr "Fehlerberichte:" #~ msgid "" #~ "Feature requests:\n" #~ "\n" #~ "http://www.linuxgames.com/xqf Forums section\n" #~ msgstr "" #~ "Wünsche melden:\n" #~ "\n" #~ "http://www.linuxgames.com/xqf in den Foren\n" #~ msgid "" #~ "http://www.linuxgames.com/xqf\n" #~ "http://sourceforge.net/projects/xqf\n" #~ "\n" #~ msgstr "" #~ "http://www.linuxgames.com/xqf/\n" #~ "http://sourceforge.net/projects/xqf/\n" #~ "\n" #~ msgid "" #~ "Significant Contributors:\n" #~ "\n" #~ "Bill Adams \n" #~ "Alex Burger \n" #~ "Jordi Mallach \n" #~ "Ludwig Nussel \n" #~ "\n" #~ msgstr "" #~ "Wesentliche Beiträge von:\n" #~ "\n" #~ "Bill Adams \n" #~ "Alex Burger \n" #~ "Jordi Mallach \n" #~ "Ludwig Nussel \n" #~ "\n" #~ msgid "" #~ "Other Contributors:\n" #~ "\n" #~ "Jochen Baier \n" #~ "\n" #~ msgstr "" #~ "Weitere Beiträge von:\n" #~ "\n" #~ "Jochen Baier \n" #~ "\n" #~ msgid "" #~ "Bug reports:\n" #~ "\n" #~ "http://sourceforge.net/projects/xqf\n" #~ "\n" #~ msgstr "" #~ "Bug Reports:\n" #~ "\n" #~ "http://sourceforge.net/projects/xqf\n" #~ "\n" #~ msgid "Domain:" #~ msgstr "Domain:" #~ msgid "XQF Version " #~ msgstr " XQF Version" #~ msgid "%s Filter" #~ msgstr "%s Filter" #~ msgid "_Add Server" #~ msgstr "Server _hinzufügen" xqf-1.0.5/po/es.po0000644002404400000620000014005210520643117010616 00000000000000# Spanish catalogs for XQF. # Copyright © 2001, 2002, 2003, 2004 Free Software Foundation, Inc. # This file is distributed under the same license as the xqf package. # Jordi Mallach , 2001, 2002, 2003, 2004. # msgid "" msgstr "" "Project-Id-Version: xqf 1.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2006-10-28 13:56+0200\n" "PO-Revision-Date: 2004-11-22 01:07+0100\n" "Last-Translator: Jordi Mallach \n" "Language-Team: Spanish \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../xqf.desktop.in.h:1 #, fuzzy msgid "Game Server Browser" msgstr "Navegador de servidores de juegos XQF" #: ../xqf.desktop.in.h:2 msgid "Locate and connect to game servers" msgstr "Localiza y connecta a servidores de juegos" #: ../xqf.desktop.in.h:3 ../src/dialogs.c:492 msgid "XQF Game Server Browser" msgstr "Navegador de servidores de juegos XQF" #: ../src/addmaster.c:111 msgid "You have to specify a name and an address." msgstr "Tienes que especificar un nombre y una dirección." #: ../src/addmaster.c:118 #, c-format msgid "Master address \"%s\" is not valid." msgstr "La dirección de maestro \"%s\" no es válida." #: ../src/addmaster.c:174 ../src/source.c:69 msgid "LAN" msgstr "Red Local" #: ../src/addmaster.c:245 msgid "Rename Master" msgstr "Renombrar Maestro" #: ../src/addmaster.c:249 msgid "Add Master" msgstr "Añadir Maestro" #. Master Name (Description) #: ../src/addmaster.c:263 msgid "Master Name" msgstr "Nombre del Maestro" #. Master Address #: ../src/addmaster.c:319 msgid "Master Address" msgstr "Dirección del Maestro" #. Cancel Button #: ../src/addmaster.c:409 ../src/addserver.c:152 ../src/dialogs.c:421 #: ../src/filter.c:1619 ../src/filter.c:2122 ../src/game.c:1819 #: ../src/launch.c:339 ../src/pref.c:4784 ../src/psearch.c:224 #: ../src/redial.c:227 ../src/srv-prop.c:841 ../src/xqf.c:981 ../src/xqf.c:994 #: ../src/xqf.c:1867 msgid "Cancel" msgstr "Cancelar" #: ../src/addserver.c:91 ../src/addserver.c:188 msgid "Add Server" msgstr "Añadir Servidor" #. Server Entry #: ../src/addserver.c:102 msgid "Server:" msgstr "Servidor:" #: ../src/dialogs.c:124 ../src/dialogs.c:199 ../src/dialogs.c:279 msgid "XQF: Warning!" msgstr "XQF: Atención!" #. OK Button #. gtk_button_box_set_child_size(GTK_BUTTON_BOX(hbuttonbox1), 79, 38); #. OK Button #: ../src/dialogs.c:149 ../src/dialogs.c:410 ../src/dialogs.c:600 #: ../src/filter.c:1630 ../src/filter.c:2110 ../src/pref.c:4792 #: ../src/psearch.c:213 ../src/srv-prop.c:849 msgid "OK" msgstr "Aceptar" #: ../src/dialogs.c:224 ../src/dialogs.c:304 ../src/filter.c:1050 #: ../src/psearch.c:398 ../src/xqf.c:957 ../src/xqf.c:969 ../src/xqf.c:1645 msgid "Yes" msgstr "Sí" #: ../src/dialogs.c:236 ../src/dialogs.c:316 ../src/filter.c:1051 #: ../src/psearch.c:398 ../src/xqf.c:957 ../src/xqf.c:969 ../src/xqf.c:1645 msgid "No" msgstr "No" #: ../src/dialogs.c:326 ../src/xqf.c:994 msgid "Redial" msgstr "Rellamar" #: ../src/dialogs.c:493 #, c-format msgid "Version %s" msgstr "Versión %s" #. translators can use the copyright symbol instead of (C) #: ../src/dialogs.c:496 msgid "Copyright (C) 1998-2002 Roman Pozlevich" msgstr "Copyright © 1998-2002 Roman Pozlevich" #: ../src/dialogs.c:499 msgid "Maintainers:" msgstr "Mantenedores:" #: ../src/dialogs.c:505 msgid "Contributors:" msgstr "Contribuidores:" #: ../src/dialogs.c:509 msgid "Bug reports and feature requests:" msgstr "Informes de error y peticiones de mejora:" #: ../src/dialogs.c:556 msgid "About XQF" msgstr "Acerca de XQF" #: ../src/dialogs.c:583 msgid "[placeholder, do not translate]" msgstr "[placeholder, do not translate]" #: ../src/filter.c:97 msgid "Server" msgstr "Servidor" #: ../src/filter.c:98 msgid "S Filter" msgstr "Filtro S" #: ../src/filter.c:99 msgid "SF Cfg" msgstr "Cfg FS" #: ../src/filter.c:111 msgid "Player" msgstr "Jugador" #: ../src/filter.c:112 msgid "P Filter" msgstr "Filtro J" #: ../src/filter.c:113 msgid "PF Cfg" msgstr "Cfg FJ" #: ../src/filter.c:1011 msgid "Enter filter name" msgstr "Introduce el nombre del filtro" #: ../src/filter.c:1049 msgid "Delete server filter" msgstr "Eliminar el filtro de servidor" #: ../src/filter.c:1052 #, c-format msgid "Really delete server filter \"%s\"?" msgstr "De verdad quieres borrar el filtro de servidor \"%s\"?" #: ../src/filter.c:1257 msgid "Server Filter" msgstr "Filtro de Servidor" #: ../src/filter.c:1271 ../src/flt-player.c:821 ../src/pref.c:2821 msgid "New" msgstr "Nuevo" #: ../src/filter.c:1278 msgid "Rename" msgstr "Renombrar" #. FIXME: plural #: ../src/filter.c:1285 ../src/flt-player.c:827 ../src/pref.c:2829 #: ../src/xqf.c:1867 msgid "Delete" msgstr "Borrar" #: ../src/filter.c:1292 msgid "Server would pass filter if" msgstr "El servidor pasaría el filtro si" #. row=0..1 #. max ping #: ../src/filter.c:1313 msgid "ping is less than" msgstr "el ping es menor que" #. GAMECONTAINS Filter -- baa #. http://developer.gnome.org/doc/API/gtk/gtktable.html #: ../src/filter.c:1334 msgid "the game contains the string" msgstr "el juego contiene la cadena" #. row=1..2 #. max timeouts #: ../src/filter.c:1352 msgid "the number of retries is fewer than" msgstr "el número de reintentos es menor que" #. GAMETYPE Filter -- baa #. http://developer.gnome.org/doc/API/gtk/gtktable.html #: ../src/filter.c:1371 msgid "the game type contains the string" msgstr "el tipo de juego contiene la cadena" #. row=2..3 #. not full #: ../src/filter.c:1388 msgid "it is not full" msgstr "no está lleno" #. Version Filter -- baa #: ../src/filter.c:1395 msgid "the version contains the string" msgstr "la versión contiene la cadena" #: ../src/filter.c:1414 msgid "it is not empty" msgstr "no está vacío" #. Map filter #: ../src/filter.c:1423 msgid "the map contains the string" msgstr "el mapa contiene la cadena" #: ../src/filter.c:1441 msgid "cheats are not allowed" msgstr "no se admiten trampas" #. Server name filter #: ../src/filter.c:1450 msgid "the server name contains the string" msgstr "el nombre del servidor contiene la cadena" #: ../src/filter.c:1468 msgid "no password required" msgstr "no se requiere contraseña" #: ../src/filter.c:1479 ../src/filter.c:1958 msgid "Country filter:" msgstr "Filtro de país:" #: ../src/filter.c:1520 msgid "select..." msgstr "seleccionar..." #: ../src/filter.c:1533 msgid "clear" msgstr "limpiar" #: ../src/filter.c:1591 msgid "XQF: Filters" msgstr "XQF: Filtros" #. window caption for country filter #: ../src/filter.c:1949 msgid "Configure Country Filter" msgstr "Configurar el filtro de país" #: ../src/filter.c:2091 msgid "Show all countries" msgstr "Mostrar todos los paises" #: ../src/flt-player.c:69 ../src/flt-player.c:75 msgid "string" msgstr "cadena" #: ../src/flt-player.c:70 msgid "substr" msgstr "subcad" #: ../src/flt-player.c:71 msgid "regexp" msgstr "expreg" #: ../src/flt-player.c:76 msgid "substring" msgstr "subcadena" #: ../src/flt-player.c:77 msgid "regular expression" msgstr "expresión regular" #: ../src/flt-player.c:448 ../src/psearch.c:116 msgid "XQF: Error" msgstr "XQF: Error" #: ../src/flt-player.c:448 ../src/psearch.c:117 #, c-format msgid "" "Regular Expression Error!\n" "\n" "%s\n" "\n" "%s." msgstr "" "Error en expresión regular!\n" "\n" "%s\n" "\n" "%s." #. Pattern Entry #: ../src/flt-player.c:666 ../src/flt-player.c:754 msgid "Pattern" msgstr "Patrón" #. Comment #: ../src/flt-player.c:701 msgid "Pattern Comment" msgstr "Comentario de patrón" #: ../src/flt-player.c:754 msgid "Mode" msgstr "Modo" #: ../src/flt-player.c:760 msgid "Player Filter" msgstr "Filtro de Jugadores" #: ../src/flt-player.c:839 msgid "Up" msgstr "Arriba" #: ../src/flt-player.c:845 msgid "Down" msgstr "Abajo" #: ../src/game.c:212 msgid "" "Note: Soldier of Fortune will not connect to a server correctly\n" "without creating a startup script for the game. Please see the\n" "XQF documentation for more information." msgstr "" "Nota: Soldier of Fortune no se conectará correctamente a un servidor\n" "sin antes crear un script de arranque para el juego. Mira la\n" "documentación de XQF para más información." #: ../src/game.c:216 msgid "" "Note: Unreal Tournament will not launch correctly without\n" "modifications to the game's startup script. Please see the\n" "XQF documentation for more information." msgstr "" "Nota: Unreal Tournament no se lanzará correctamente sin\n" "modificaciones al script de arranque del juego. Mira la\n" "documentación de XQF para más información." #: ../src/game.c:220 msgid "Sample Command Line: wine hl.exe -- hl.exe -console" msgstr "Ejemplo de línea de comando: wine hl.exe -- hl.exe -console" #: ../src/game.c:223 msgid "" "Note: Savage will not launch correctly without\n" "modifications to the game's startup script. Please see the\n" "XQF documentation for more information." msgstr "" "Nota: Savage no se lanzará correctamente sin\n" "modificaciones al script de arranque del juego. Mira la\n" "documentación de XQF para más información." #. %s = game name e.g. QuakeWorld #: ../src/game.c:1691 #, c-format msgid "%s command line is empty." msgstr "La línea de comando de %s está vacía." #. directory name, game name #. %s directory, game name #: ../src/game.c:1698 ../src/game.c:1807 #, c-format msgid "" "\"%s\" is not a directory\n" "Please specify correct %s working directory." msgstr "" "\"%s\" no es un directorio\n" "Por favor, especifica un directorio de trabajo para %s correcto." #. game name #: ../src/game.c:1710 #, c-format msgid "Please specify correct %s working directory." msgstr "Por favor especifica un directorio de trabajo para %s correcto." #. directory, subdirectory, game name #: ../src/game.c:1716 #, c-format msgid "" "Directory \"%s\" doesn't contain \"%s\" subdirectory.\n" "Please specify correct %s working directory." msgstr "" "El directorio \"%s\" no contiene el subdirectorio \"%s\".\n" "Por favor especifica un directorio de trabajo para %s correcto." #. %s Quake3 #: ../src/game.c:1773 #, c-format msgid "" "~/.q3a directory doesn't exist or doesn't contain\n" "\"baseq3\" (\"demoq3\") subdirectory.\n" "Please run %s client at least once before running XQF\n" "or specify correct %s working directory." msgstr "" "El directorio ~/.q3a no existe o no contiene\n" "el subdirectorio \"baseq3\" (\"deboq3\").\n" "Por favor, ejecuta el cliente %s al menos una vez antes de\n" "usar XQF o especifica un directorio de trabajo para %s correcto." #. %s directory, Quake3 #: ../src/game.c:1782 #, c-format msgid "" "\"%s\" directory doesn't exist or doesn't contain \"baseq3\" (\"demoq3\") " "subdirectory.\n" "Please specify correct %s working directory\n" "or leave it empty (~/.q3a is used by default)" msgstr "" "El directorio \"%s\" no existe o no contiene el subdirectorio \"baseq3" "\" (\"deboq3\").\n" "Por favor, especifica un directorio de trabajo para %s correcto\n" "o déjalo vacío (se usa ~/.q3a por defecto)" #: ../src/game.c:1819 ../src/launch.c:339 ../src/xqf.c:981 ../src/xqf.c:994 msgid "Launch" msgstr "Lanzar" #. %s frontend.cfg #: ../src/game.c:1821 #, c-format msgid "" "Cannot write to file \"%s\".\n" "\n" "Launch client anyway?" msgstr "" "No se puede escribir en el fichero \"%s\".\n" "\n" "¿Lanzar cliente igualmente?" #: ../src/game.c:2448 msgid "" "The server has Punkbuster enabled but it is not going\n" "to be set on the command line.\n" "You may have problems connecting.\n" "You can fix this in the game preferences." msgstr "" "El servidor tiene Punkbuster habilitado, pero no\n" "se va a establecer en la línea de comandos.\n" "Quizás tengas problemas para conectar.\n" "Puedes solucionar esto en las preferencias del juego." #: ../src/launch.c:70 ../src/launch.c:195 msgid "XQF: ERROR!" msgstr "XQF: ERROR!" #: ../src/launch.c:70 #, c-format msgid "" "ERROR!\n" "\n" "%s(%s) failed: %s" msgstr "" "ERROR!\n" "\n" "%s(%s) ha fallado: %s" #: ../src/launch.c:195 #, c-format msgid "" "ERROR!\n" "\n" "%s" msgstr "" "ERROR!\n" "\n" "%s" #: ../src/launch.c:340 #, c-format msgid "" "There is %s client running.\n" "\n" "Launch %s client?" msgstr "" "Hay un cliente de %s ejecutándose.\n" "\n" "¿Quieres lanzar el cliente de %s?" #: ../src/pref.c:646 msgid "com_soundmegs and com_zonemegs must be lower than com_hunkmegs" msgstr "com_soundmegs y com_zonemegs han de ser más bajos que com_hunkmegs" #: ../src/pref.c:1232 msgid "Invalid source IP address" msgstr "Dirección IP fuente invàlida" #: ../src/pref.c:1244 msgid "Invalid source port range" msgstr "Rango de puertos fuente invàlido" #. Top (Shirt) Color #: ../src/pref.c:1592 ../src/pref.c:1691 msgid "Top" msgstr "Superior" #. Bottom (Pants) Color #: ../src/pref.c:1608 ../src/pref.c:1707 msgid "Bottom" msgstr "Inferior" #. Player Name #: ../src/pref.c:1854 ../src/pref.c:1965 ../src/pref.c:2025 ../src/pref.c:2077 #: ../src/xqf-ui.c:54 ../src/xqf-ui.c:129 msgid "Name" msgstr "Nombre" #: ../src/pref.c:1875 ../src/xqf-ui.c:141 msgid "Colors" msgstr "Colores" #: ../src/pref.c:1908 msgid "Login name" msgstr "Nombre de usuario" #: ../src/pref.c:1950 msgid "Skin/Colors" msgstr "Piel/Colores" #: ../src/pref.c:1986 msgid "Team" msgstr "Equipo" #: ../src/pref.c:2044 msgid "Model/Skin" msgstr "Modelo/Piel" #: ../src/pref.c:2131 msgid "--- Anything ---" msgstr "--- Cualquiera ---" #: ../src/pref.c:2132 msgid "Axe" msgstr "Hacha" #: ../src/pref.c:2133 msgid "Shotgun" msgstr "Escopeta" #: ../src/pref.c:2134 msgid "Super Shotgun" msgstr "Súper Escopeta" #: ../src/pref.c:2135 msgid "Nailgun" msgstr "Pistola de Clavos" #: ../src/pref.c:2136 msgid "Super Nailgun" msgstr "Súper Pistola de Clavos" #: ../src/pref.c:2137 msgid "Grenade Launcher" msgstr "Lanza Granadas" #: ../src/pref.c:2138 msgid "Rocket Launcher" msgstr "Lanza Cohetes" #: ../src/pref.c:2139 msgid "ThunderBolt" msgstr "Lanza Descargas" #: ../src/pref.c:2187 msgid "Use skins" msgstr "Usar pieles" #: ../src/pref.c:2193 msgid "Don't use skins" msgstr "No usar pieles" #: ../src/pref.c:2199 msgid "Don't download new skins" msgstr "No descargar nuevas pieles" #: ../src/pref.c:2241 msgid "You must configure a command line first" msgstr "Tienes que configurar una línea de comando antes" #: ../src/pref.c:2283 msgid "Game not found" msgstr "Juego no encontrado" #. %s name of a game #: ../src/pref.c:2285 #, c-format msgid "%s not found" msgstr "%s no encontrado" #: ../src/pref.c:2333 #, c-format msgid "" "An entry already exists for the game %s.\n" "\n" "A default entry for this game will not be added.\n" "\n" "Delete the entry and try again." msgstr "" "Ya existe una entrada para el juego %s.\n" "\n" "No se añadirá una entrada por defecto.\n" "\n" "Borra la entrada y vuelve a intentarlo." #: ../src/pref.c:2375 msgid "There are no defaults for this game" msgstr "No hay valores por defecto para este juego" #: ../src/pref.c:2436 msgid "" "There is already an entry for this game.\n" "\n" "To modify it, select it from the list, modify it\n" "and then click Add/Update." msgstr "" "Ya hay una entrada para este juego.\n" "\n" "Para modificarla, seleccionala de la lista, modifícala\n" "y haz clic en Añadir/Actualizar." #: ../src/pref.c:2440 msgid "You must enter both a game and at least one argument." msgstr "Tienes que introducir un juego y al menos un argumento." #: ../src/pref.c:2539 msgid "Invoking" msgstr "Ejecución" #: ../src/pref.c:2546 msgid "*** Not Implemented ***" msgstr "*** No implementado ***" #: ../src/pref.c:2558 msgid "Custom Args" msgstr "Args propios" #: ../src/pref.c:2570 msgid "Command Line" msgstr "Línea de comando" #. translator: button for command suggestion #. translator: button for directory guess #: ../src/pref.c:2597 ../src/pref.c:2635 msgid "Suggest" msgstr "Sugerencia" #: ../src/pref.c:2603 msgid "Searches the path for the game executable" msgstr "Busca el ejecutable del juego en el path" #. /// #: ../src/pref.c:2610 msgid "Working Directory" msgstr "Directorio de trabajo" #: ../src/pref.c:2640 msgid "Tries to guess the working directory based on the command line" msgstr "" "Intenta adivinar el directorio de trabajo basándose en la línea de comandos" #: ../src/pref.c:2658 msgid "Custom CFG" msgstr "CFG propia" #: ../src/pref.c:2763 ../src/xqf-ui.c:102 msgid "Game" msgstr "Juego" #: ../src/pref.c:2771 msgid "Arguments" msgstr "Argumentos" #: ../src/pref.c:2779 msgid "Game and Arguments" msgstr "Juego y argumentos" #: ../src/pref.c:2802 msgid "Enter the game name from the game column" msgstr "Introduce el nombre del juego desde la columna de juegos" #: ../src/pref.c:2811 msgid "Enter the arguments separated by spaces" msgstr "Introduce los argumentos separados por espacios" #: ../src/pref.c:2837 msgid "Add Defaults" msgstr "Añadir valores por defecto" #: ../src/pref.c:2845 msgid "Add/Update" msgstr "Añadir/Actualizar" #. Common Options #: ../src/pref.c:3000 msgid "Common Options" msgstr "Opciones comunes" #: ../src/pref.c:3011 msgid "Disable CD Audio" msgstr "Deshabilitar audio CD" #. Disable Sound #: ../src/pref.c:3019 msgid "Disable Sound" msgstr "Deshabilitar sonido" #: ../src/pref.c:3043 msgid "Do not set (use game default)" msgstr "No establecer (usar el valor por defecto)" #: ../src/pref.c:3044 msgid "Automatically calculate from server ping time" msgstr "Calcular automáticamente por el tiempo de ping del servidor" #: ../src/pref.c:3045 msgid "Fixed value" msgstr "Valor fijo" #: ../src/pref.c:3113 msgid "Masterserver Protocol Version" msgstr "Versión del protocolo del servidor maestro" #: ../src/pref.c:3136 msgid "set fs_game on connect" msgstr "establecer fs_game al conectar" #: ../src/pref.c:3145 msgid "set cl_punkbuster on connect" msgstr "establecer cl_punkbuster al conectar" #: ../src/pref.c:3154 #, fuzzy msgid "enable console" msgstr "Habilitar el sonido" #: ../src/pref.c:3216 msgid "Pass memory settings on command line" msgstr "Fijar la configuración de la memoria en la línea de comandos" #. Mega Byte #: ../src/pref.c:3234 ../src/pref.c:3257 ../src/pref.c:3280 ../src/pref.c:3304 msgid "MB" msgstr "MiB" #: ../src/pref.c:3238 msgid "com_hunkmegs" msgstr "com_hunkmegs" #: ../src/pref.c:3261 msgid "com_zonemegs" msgstr "com_zonemegs" #: ../src/pref.c:3284 msgid "com_soundmegs" msgstr "com_soundmegs" #: ../src/pref.c:3308 msgid "cg_precachedmodels" msgstr "cg_precachedmodels" #: ../src/pref.c:3317 msgid "Preset values" msgstr "Valores preestablecidos" #: ../src/pref.c:3324 msgid "Default" msgstr "Por defecto" #: ../src/pref.c:3330 msgid "128MB" msgstr "128MiB" #: ../src/pref.c:3336 msgid ">256MB" msgstr ">256MiB" #: ../src/pref.c:3355 ../src/pref.c:3584 ../src/pref.c:3590 msgid "Options" msgstr "Opciones" #: ../src/pref.c:3358 msgid "Memory" msgstr "Memoria" #. QW Specific Features #. 'w_switch' & 'b_switch' control #: ../src/pref.c:3387 msgid "The highest weapon that Quake should switch to..." msgstr "El arma más alta a la que Quake debería cambiar..." #: ../src/pref.c:3400 msgid "upon a weapon pickup" msgstr "al coger un arma" #: ../src/pref.c:3418 msgid "upon a backpack pickup" msgstr "al coger una mochila" #: ../src/pref.c:3439 msgid "Disable auto-aiming" msgstr "Deshabilitar autoapuntar" #: ../src/pref.c:3477 msgid "Skins" msgstr "Pieles" #: ../src/pref.c:3499 msgid "Rate" msgstr "Valor" #. 'pushlatency' #: ../src/pref.c:3523 msgid "pushlatency" msgstr "pushlatency" #. Troubleshooting #: ../src/pref.c:3538 msgid "Troubleshooting" msgstr "Solución de problemas" #: ../src/pref.c:3551 msgid "Disable delta-compression (cl_nodelta)" msgstr "Deshabilitar compresión-delta (cl_nodelta)" #: ../src/pref.c:3565 msgid "Disable player/entity prediction (cl_predict_players)" msgstr "Deshabilitar predicción de jugadores/objetos (cl_predict_players)" #: ../src/pref.c:3583 msgid "Weapons" msgstr "Armas" #: ../src/pref.c:3585 ../src/pref.c:3591 ../src/pref.c:3596 ../src/pref.c:3601 msgid "Player Profile" msgstr "Ficha de jugador" #: ../src/pref.c:3677 msgid "Icons" msgstr "Iconos" #: ../src/pref.c:3677 msgid "Text" msgstr "Texto" #: ../src/pref.c:3677 msgid "Both" msgstr "Ambos" # src/pref.c: #: ../src/pref.c:3683 msgid "Server List" msgstr "Lista de servidores" #: ../src/pref.c:3696 msgid "Show host names" msgstr "Mostrar nombres de servidores" #: ../src/pref.c:3701 msgid "Show hostnames instead of IP addresses if possible" msgstr "" "Mostrar los nombres de los servidores en vez de las direcciones IP si es " "posible" #: ../src/pref.c:3712 msgid "Show default port" msgstr "Mostrar puerto predeterminado" #: ../src/pref.c:3727 msgid "Do not count bots as players" msgstr "No contar los robots como jugadores" #: ../src/pref.c:3743 msgid "Sort servers real-time during refresh" msgstr "Ordenar servidores durante refrescos" #: ../src/pref.c:3758 msgid "Refresh on update" msgstr "Refrescar al actualizar" #: ../src/pref.c:3774 msgid "Resolve hostnames on update" msgstr "Resolver los nombres de los servidores al actualizar" #: ../src/pref.c:3778 msgid "Enable or disable DNS resolution of IP addresses" msgstr "Habilitar o deshabilitar la resolución DNS de direcciones IP" #: ../src/pref.c:3792 msgid "Show only configured games" msgstr "Mostrar sólo los juegos configurados" #: ../src/pref.c:3808 msgid "Use custom color settings" msgstr "" #: ../src/pref.c:3810 msgid "" "Use XQF's color settings instead of the system ones. You need to restart XQF " "for this setting to take effect. Note that you may need to install the gtk-" "engines package." msgstr "" #. Toolbar #: ../src/pref.c:3831 msgid "Toolbar" msgstr "Barra de herramientas" #. Toolbar Tips #: ../src/pref.c:3856 msgid "Tooltips" msgstr "Pistas" #. On Startup #: ../src/pref.c:3899 msgid "On Startup" msgstr "Al iniciar" #: ../src/pref.c:3912 msgid "Refresh Favorites" msgstr "Refrescar favoritos" #: ../src/pref.c:3925 msgid "Show splash screen" msgstr "Mostrar la pantalla de presentación" #: ../src/pref.c:3939 msgid "Scan for maps" msgstr "Buscar mapas" #: ../src/pref.c:3944 msgid "" "Scan game directories for installed maps. xqf will take longer to start up " "when enabled." msgstr "" "Escanear los directorios de juego para buscar mapas instalados. xqf tardará " "más en arrancar cuando está habilitado." #: ../src/pref.c:3951 msgid "scan now" msgstr "escanear ahora" #: ../src/pref.c:3967 msgid "Minimize to system tray" msgstr "Minimizar al área de notificación" #: ../src/pref.c:3971 msgid "Enable xqf tray icon. You need to restart xqf for this to take effect." msgstr "" "Habilitar la bandeja de notificación. Necesitas reiniciar xqf para que esto " "tenga efecto." #. On Exit #: ../src/pref.c:3984 msgid "On Exit" msgstr "Al salir" #: ../src/pref.c:3997 msgid "Save server lists" msgstr "Guardar listas de servidores" #: ../src/pref.c:4012 msgid "Save server information" msgstr "Guardar información sobre servidores" #: ../src/pref.c:4029 msgid "Save player information" msgstr "Guardar información sobre jugadores" #. When launching a Game #: ../src/pref.c:4045 msgid "When launching a game..." msgstr "Al iniciar un juego..." #: ../src/pref.c:4059 msgid "Terminate XQF" msgstr "Cerrar XQF" #: ../src/pref.c:4074 msgid "Iconify XQF window" msgstr "Iconificar la ventana de XQF" #: ../src/pref.c:4089 msgid "Create LaunchInfo.txt" msgstr "Crear LaunchInfo.txt" #: ../src/pref.c:4095 msgid "" "Creates the file ~/.qf/LaunchInfo.txt with: ping ip:port name map curplayers " "maxplayers" msgstr "" "Crea el fichero ~/.qf/LaunchInfo.txt con: ping ip:puerto nombre mapa " "jugactuales máxjugadores" #: ../src/pref.c:4101 msgid "Execute prelaunch" msgstr "Ejecutar prelaunch" #: ../src/pref.c:4107 msgid "Executes ~/.qf/PreLaunch (if it exists) before launching the game" msgstr "Ejecutar ~/.qf/PreLaunch (si existe) antes de lanzar el juego" #: ../src/pref.c:4116 msgid "Stop current song in XMMS" msgstr "Parar la canción actual en XMMS" #: ../src/pref.c:4119 msgid "" "Stopping XMMS will release /dev/dsp. Activate this option if you use XMMS " "and have a cheap soundcard that allows only one application to open /dev/dsp." msgstr "" "Parar XMMS liberará /dev/dsp. Activar esta opción sólo si usas XMMS y teneis " "una tarjeta de sonido mediocre que sólo permite a una aplicación abrir el /" "dev/dsp." #. QStat preferences -- maxsimultaneous & maxretries #: ../src/pref.c:4158 msgid "QStat Options" msgstr "Opciones de QStat" #. maxsimultaneous #: ../src/pref.c:4169 msgid "Number of simultaneous servers to query" msgstr "Número de servidores a consultar simultáneamente" #. maxretries #: ../src/pref.c:4193 msgid "Number of retries" msgstr "Número de reintentos" #. srcip #: ../src/pref.c:4212 msgid "Source IP Address" msgstr "Dirección IP fuente" #: ../src/pref.c:4233 msgid "Source Port Range" msgstr "Rango de puertos fuente" #. Translator: sound test button #: ../src/pref.c:4296 msgid "Test" msgstr "Probar" #. Sound Enable / Disable frame #. Sounds Enable / Disable #: ../src/pref.c:4313 msgid "Sound Enable / Disable" msgstr "Habilitar / deshabilitar el sonido" #: ../src/pref.c:4327 msgid "Enable Sound" msgstr "Habilitar el sonido" #. Sound Player #: ../src/pref.c:4338 msgid "Player program" msgstr "Programa reproductor" #. Sound Files frame #. Sounds preferences -- player and various sounds #: ../src/pref.c:4366 msgid "Sound Files" msgstr "Ficheros de sonido" #. Sound XQF Start #: ../src/pref.c:4378 msgid "XQF Start" msgstr "Inicio de XQF" #. Sound XQF Quit #: ../src/pref.c:4410 msgid "XQF Quit" msgstr "Salida de XQF" #. Sound Update Done #: ../src/pref.c:4442 msgid "Update Done" msgstr "Actualización completada" #. Sound Refresh Done #: ../src/pref.c:4475 msgid "Refresh Done" msgstr "Refresco completado" #. Sound Stop #: ../src/pref.c:4508 ../src/xqf.c:3071 ../src/trayicon.c:462 msgid "Stop" msgstr "Parar" #. Sound Server Connect #: ../src/pref.c:4541 msgid "Server Connect" msgstr "Conexión al servidor" #. Sound Redial Success Start #: ../src/pref.c:4574 msgid "Redial Success" msgstr "Éxito de la rellamada" #: ../src/pref.c:4702 msgid "XQF: Preferences" msgstr "XQF: Preferencias" # src/pref.c: #: ../src/pref.c:4722 msgid "General" msgstr "General" #: ../src/pref.c:4734 msgid "Games" msgstr "Juegos" #: ../src/pref.c:4739 msgid "Appearance" msgstr "Apariencia" #: ../src/pref.c:4744 msgid "QStat" msgstr "QStat" #: ../src/pref.c:4749 msgid "Sounds" msgstr "Sonidos" #: ../src/pref.c:4754 msgid "Scripts" msgstr "" #: ../src/pref.c:4895 msgid "Unable to get user name/home/tmpdir" msgstr "No se ha podido obtener el nombre/home/dirtmp del usuario" #. translator: %s = game name, e.g. Quake 3 Arena #: ../src/pref.c:5227 #, c-format msgid "Searching for %s maps" msgstr "Buscando mapas para %s" #: ../src/pref.c:5281 msgid "Game Command Selection" msgstr "Selección del comando del juego" #: ../src/pref.c:5290 msgid "Game Directory Selection" msgstr "Selección del directorio del juego" #: ../src/pref.c:5295 msgid "Sound Player Selection" msgstr "Selección del reproductor de sonido" #: ../src/pref.c:5300 msgid "XQF Start Sound Selection" msgstr "Selección del sonido para «inicio de XQF»" #: ../src/pref.c:5305 msgid "XQF Quit Sound Selection" msgstr "Selección del sonido para «salida de XQF»" #: ../src/pref.c:5310 msgid "Update Done Sound Selection" msgstr "Selección de sonido para «actualización completada»" #: ../src/pref.c:5315 msgid "Refresh Done Sound Selection" msgstr "Selección del sonido para «refresco completado»" #: ../src/pref.c:5320 msgid "Stop Sound Selection" msgstr "Selección de sonido para «parar»" #: ../src/pref.c:5325 msgid "Server Connect Sound Selection" msgstr "Selección de sonido para «conexión al servidor»" #: ../src/pref.c:5330 msgid "Redial Success Sound Selection" msgstr "Selección de sonido para «éxito de la rellamada»" #: ../src/psearch.c:51 msgid "Exact Match" msgstr "Coincidencia Exacta" #: ../src/psearch.c:52 msgid "Substring" msgstr "Subcadena" #: ../src/psearch.c:53 msgid "Regular Expression" msgstr "Expresión Regular" #: ../src/psearch.c:174 msgid "Find Player" msgstr "Buscar Jugador" #. Pattern Entry #: ../src/psearch.c:185 msgid "Find Player:" msgstr "Buscar Jugador:" #: ../src/psearch.c:394 msgid "Player not found." msgstr "Jugador no encontrado." #: ../src/psearch.c:398 msgid "XQF: End of server list reached" msgstr "XQF: Se ha alcanzado el final de la lista de servidores" #: ../src/psearch.c:399 msgid "Continue search from beginning?" msgstr "¿Continuar la búsqueda desde el principio?" #. Message #: ../src/rcon.c:550 msgid "Cmd:" msgstr "Cmdo:" #. Send Button #: ../src/rcon.c:577 msgid "Send" msgstr "Enviar" #. Status Button #: ../src/rcon.c:586 msgid "Status" msgstr "Estado" #. Clear Button #: ../src/rcon.c:595 msgid "Clear" msgstr "Limpiar" #: ../src/rcon.c:617 ../src/statistics.c:849 msgid "Close" msgstr "Cerrar" #: ../src/rcon.c:717 #, c-format msgid "Usage: %s [server type] \n" msgstr "Uso: %s [tipo de servidor] \n" #: ../src/rcon.c:718 #, fuzzy, c-format msgid " server type is either --qws, --hws, --hls or --dm3s.\n" msgstr " el tipo de servidor es --qws, --hws o --hls.\n" #: ../src/rcon.c:719 #, c-format msgid " If no server type is specified, Q3 style rcon is assumed.\n" msgstr "" " Si no se especifica un tipo de servidor, se asume rcon de estilo Q3.\n" #. translator: readline prompt #: ../src/rcon.c:756 msgid "Password: " msgstr "Contraseña: " #: ../src/redial.c:123 #, c-format msgid "" "Waiting for free slots on\n" "%s" msgstr "" "Esperando a que haya sitios libres en\n" "%s" #: ../src/redial.c:125 #, c-format msgid "" "Refreshing\n" "%s" msgstr "" "Refrescando\n" "%s" #. * window code modified from glade #: ../src/redial.c:179 ../src/redial.c:184 msgid "XQF: Redialing" msgstr "XQF: Rellamando" #: ../src/redial.c:196 msgid "" "***\n" "***" msgstr "" "***\n" "***" #: ../src/redial.c:219 msgid "Launch now" msgstr "Lanzar ahora" #: ../src/source.c:66 msgid "Standard" msgstr "Estándar" #: ../src/source.c:67 msgid "Gamespy" msgstr "Gamespy" #: ../src/source.c:68 msgid "http" msgstr "http" #: ../src/source.c:70 msgid "File" msgstr "Fichero" #: ../src/source.c:122 msgid "Retry" msgstr "Reintentar" #: ../src/source.c:122 msgid "Skip" msgstr "Ignorar" #: ../src/source.c:123 #, c-format msgid "" "Cannot write to file %s\n" "System Error: %s\n" msgstr "" "No se puede escribir el fichero %s\n" "Error del sistema: %s\n" #. translator: %s == url, eg gmaster://bla.blub.org #: ../src/source.c:891 #, c-format msgid "You have to specify a port number for %s." msgstr "Tienes que especificar un número de puerto para %s." #: ../src/source.c:905 #, c-format msgid "'gsmtype' options missing for master %s." msgstr "faltan las opciones «gsmtype» para el maestro %s." #: ../src/source.c:1439 msgid "Favorites" msgstr "Favoritos" #: ../src/srv-prop.c:423 msgid "IP Address:" msgstr "Dirección IP:" #: ../src/srv-prop.c:433 msgid "Port:" msgstr "Puerto:" #: ../src/srv-prop.c:447 msgid "Host Name:" msgstr "Nombre del servidor:" #: ../src/srv-prop.c:461 msgid "Country:" msgstr "País:" #: ../src/srv-prop.c:489 msgid "Refreshed:" msgstr "Refrescado:" #. translator: last time and date the server answered the query #: ../src/srv-prop.c:507 msgid "Last answer:" msgstr "Última respuesta:" #: ../src/srv-prop.c:564 msgid "Reserved Slots:" msgstr "Sitios reservados:" #. Sources #: ../src/srv-prop.c:583 msgid "Sources" msgstr "Fuentes" #: ../src/srv-prop.c:635 msgid "Custom CFG:" msgstr "CFG propia:" #: ../src/srv-prop.c:684 msgid "Server Password" msgstr "Contraseña del servidor" #: ../src/srv-prop.c:690 msgid "Spectator Password" msgstr "Contraseña de espectador" #: ../src/srv-prop.c:697 msgid "RCon/Admin Password" msgstr "Password de RCon/Admin" #: ../src/srv-prop.c:728 msgid "This server sucks" msgstr "Este servidor apesta" #: ../src/srv-prop.c:771 ../src/xqf.c:2603 ../src/xqf.c:2741 msgid "Properties" msgstr "Propiedades" #: ../src/srv-prop.c:816 msgid "Info" msgstr "Info" #: ../src/srv-prop.c:821 msgid "Passwords" msgstr "Contraseñas" #: ../src/srv-prop.c:826 msgid "Comment" msgstr "Comentario" #: ../src/stat.c:728 msgid "Allies" msgstr "Aliados" #: ../src/stat.c:728 msgid "Axis" msgstr "Eje" #: ../src/stat.c:734 msgid "Red" msgstr "Rojo" #: ../src/stat.c:734 msgid "Blue" msgstr "Azul" #: ../src/stat.c:1376 #, c-format msgid "" "UT2004 CD Key not found, cannot query master '%s'.\n" "Make sure the working directory is set correctly." msgstr "" "No se ha encontrado la clave del CD de UT2004,\n" "no se puede consultar el maestro «%s».\n" "Asegúrate de que el directorio de trabajo está establecido correctamente." #: ../src/stat.c:1559 #, c-format msgid "Failed to create a temporary file %s: %s" msgstr "No se ha podido crear un fichero temporal %s: %s" #. The space behind up and down is to make the strings different from #. those in flt-player.c because their meaning is different in german #: ../src/statistics.c:82 ../src/statistics.c:93 msgid "Servers" msgstr "Servidores" #: ../src/statistics.c:82 msgid "Up " msgstr "Arriba " #: ../src/statistics.c:82 msgid "Timeout" msgstr "Tiempo de espera" #: ../src/statistics.c:82 msgid "Down " msgstr "Abajo " #: ../src/statistics.c:82 msgid "Info n/a" msgstr "Info n/d" #: ../src/statistics.c:82 ../src/statistics.c:504 ../src/xqf-ui.c:88 msgid "Players" msgstr "Jugadores" #: ../src/statistics.c:86 ../src/statistics.c:90 msgid "unknown" msgstr "desconocido" #: ../src/statistics.c:94 msgid "OS/CPU" msgstr "SO/CPU" #: ../src/statistics.c:95 ../src/xqf-ui.c:65 msgid "Country" msgstr "País" #: ../src/statistics.c:450 ../src/statistics.c:498 ../src/statistics.c:503 msgid "Total" msgstr "Total" #: ../src/statistics.c:493 msgid "CPU \\ OS" msgstr "CPU \\ SO" #: ../src/statistics.c:721 msgid "All Games" msgstr "Todos los juegos" #: ../src/statistics.c:803 ../src/statistics.c:812 msgid "Statistics" msgstr "Estadísticas" #. error converting time to string representation, shouldn't happen #: ../src/utils.c:903 msgid "" msgstr "" #: ../src/utils.c:1126 msgid "Can't open source file for reading" msgstr "" #: ../src/utils.c:1133 msgid "Can't open destination file for writing" msgstr "" #: ../src/utils.c:1141 msgid "write error on destination file" msgstr "" #: ../src/utils.c:1148 msgid "read error on source file" msgstr "" #: ../src/xqf-ui.c:58 #, fuzzy msgid "Type" msgstr "Tipo de juego" #: ../src/xqf-ui.c:61 msgid "Address" msgstr "Dirección" #: ../src/xqf-ui.c:68 ../src/xqf-ui.c:153 msgid "Ping" msgstr "Ping" #: ../src/xqf-ui.c:74 msgid "TO" msgstr "TO" #: ../src/xqf-ui.c:80 msgid "Priv" msgstr "Priv" #. Translator: "PunkBuster" #: ../src/xqf-ui.c:85 msgid "PB" msgstr "" #. Translator: Max as in max players #: ../src/xqf-ui.c:93 #, fuzzy msgid "Max" msgstr "Mapa" #: ../src/xqf-ui.c:96 msgid "Map" msgstr "Mapa" #: ../src/xqf-ui.c:108 msgid "GameType" msgstr "Tipo de juego" #: ../src/xqf-ui.c:135 msgid "Frags" msgstr "Frags" #: ../src/xqf-ui.c:147 msgid "Skin" msgstr "Piel" #: ../src/xqf-ui.c:159 msgid "Time" msgstr "Tiempo" #: ../src/xqf-ui.c:179 msgid "Rule" msgstr "Regla" #: ../src/xqf-ui.c:185 msgid "Value" msgstr "Valor" #: ../src/xqf-ui.c:575 msgid "Source" msgstr "Fuente" #: ../src/xqf.c:349 #, c-format msgid "%d server" msgstr "%d servidor" #: ../src/xqf.c:349 #, c-format msgid "%d servers" msgstr "%d servidores" #. server filter #: ../src/xqf.c:597 #, c-format msgid "None <--" msgstr "Ninguno <--" #: ../src/xqf.c:599 ../src/xqf.c:3201 ../src/xqf.c:3258 ../src/xqf.c:3403 #, c-format msgid "None" msgstr "Ninguno" # c-format #: ../src/xqf.c:613 #, c-format msgid "Filter %d <--" msgstr "Filtro de servidor: %d <--" #: ../src/xqf.c:615 #, c-format msgid "Filter %d" msgstr "Filtro %d" #: ../src/xqf.c:637 #, c-format msgid "No Server Filter Active" msgstr "No hay filtros de servidor activos" #: ../src/xqf.c:644 #, c-format msgid "Server Filter: %s" msgstr "Filtro de servidor: %s" #: ../src/xqf.c:648 #, c-format msgid "Server Filter: %d" msgstr "Filtro de servidor: %d" #: ../src/xqf.c:815 msgid "Updating lists..." msgstr "Actualizando listas..." #: ../src/xqf.c:821 #, c-format msgid "Resolving host names: %d/%d" msgstr "Resolviendo nombres de servidores: %d/%d" #: ../src/xqf.c:825 #, c-format msgid "Refreshing: %d/%d" msgstr "Refrescando: %d/%d" #: ../src/xqf.c:831 #, c-format msgid "Resolving host addresses: %d/%d" msgstr "Resolviendo direcciones de servidores: %d/%d" #: ../src/xqf.c:958 msgid "" "You said this servers sucks.\n" "Do you want to risk a game this time?" msgstr "" "Has dicho que este servidor apesta.\n" "Quieres arriesgarte a jugar esta vez?" #: ../src/xqf.c:970 #, c-format msgid "" "This server is not compatible with the version of %s you have installed.\n" "Launch client anyway?" msgstr "" "Este servidor no es compatible con la versión de %s que tienes instalada.\n" "¿Lanzar el cliente igualmente?" #: ../src/xqf.c:982 #, c-format msgid "" "Server %s:%d is %s.\n" "\n" "Launch client anyway?" msgstr "" "El servidor %s:%d está %s.\n" "\n" "¿Lanzar cliente igualmente?" #: ../src/xqf.c:995 #, c-format msgid "" "Server %s:%d is full.\n" "\n" "Launch client anyway?" msgstr "" "El servidor %s:%d está lleno.\n" "\n" "¿Lanzar cliente igualmente?" #: ../src/xqf.c:1108 ../src/xqf.c:1128 ../src/xqf.c:2003 msgid "Save Password" msgstr "Guardar contraseña" #: ../src/xqf.c:1108 msgid "Spectator Password:" msgstr "Contraseña de espectador:" #: ../src/xqf.c:1128 ../src/xqf.c:2003 msgid "Server Password:" msgstr "Contraseña del servidor:" #: ../src/xqf.c:1279 msgid "Spectator" msgstr "Espectador" #: ../src/xqf.c:1280 ../src/xqf.c:1283 msgid "Demo name:" msgstr "Nombre de demo" #: ../src/xqf.c:1525 #, c-format msgid "Host %s not found" msgstr "Servidor %s no encontrado" #: ../src/xqf.c:1545 ../src/xqf.c:3815 #, c-format msgid "\"%s\" is not valid host[:port] combination." msgstr "\"%s\" no es una combinación máquina[:puerto] válida." #: ../src/xqf.c:1646 #, fuzzy msgid "Remove selected servers from all lists?" msgstr "Refrescar servidores seleccionados" #. translator: %s == url #: ../src/xqf.c:1791 #, c-format msgid "" "For Gslist support you must install the 'gslist' program available from\n" "%s\n" "Don't forget that you need to run 'gslist -u' before you can use it." msgstr "" "Para el soporte de Gslist tienes que instalar el programa «gslist» " "disponible en\n" "%s\n" "No olvides que tienes qeu ejecutar «gslist -u» antes de poder usarlo." #: ../src/xqf.c:1862 msgid "You have to select the server you want to delete" msgstr "Tienes que seleccionar el servidor que quieres borrar" #: ../src/xqf.c:1868 #, c-format msgid "" "Master%s to delete:\n" "\n" "%s" msgstr "" "Maestro%s a borrar:\n" "\n" "%s" #: ../src/xqf.c:1891 #, c-format msgid "Find Player: %s" msgstr "Buscar Jugador: %s" #: ../src/xqf.c:1983 msgid "Done." msgstr "Hecho." #: ../src/xqf.c:2525 ../src/xqf.c:3081 msgid "Connect" msgstr "Conectar" #: ../src/xqf.c:2530 ../src/xqf.c:3090 msgid "Observe" msgstr "Observar" #: ../src/xqf.c:2535 ../src/xqf.c:3098 msgid "Record Demo" msgstr "Grabar demo" #: ../src/xqf.c:2549 msgid "Add new Server" msgstr "Añadir" #: ../src/xqf.c:2554 msgid "Add to Favorites" msgstr "Añadir a Favoritos" #: ../src/xqf.c:2559 #, fuzzy msgid "Remove" msgstr "Renombrar" #: ../src/xqf.c:2564 ../src/xqf.c:2613 msgid "Copy" msgstr "Copiar" #: ../src/xqf.c:2569 msgid "Copy+" msgstr "Copiar+" #: ../src/xqf.c:2577 ../src/xqf.c:3055 ../src/trayicon.c:452 msgid "Refresh" msgstr "Refrescar" #: ../src/xqf.c:2582 msgid "Refresh Selected" msgstr "Refrescar Seleccionados" #: ../src/xqf.c:2590 msgid "DNS Lookup" msgstr "Búsqueda DNS" #: ../src/xqf.c:2598 msgid "RCon" msgstr "RCon" #: ../src/xqf.c:2621 msgid "_Statistics" msgstr "_Estadísticas" #: ../src/xqf.c:2629 msgid "_Exit" msgstr "_Salir" #: ../src/xqf.c:2640 ../src/xqf.c:2705 msgid "Add _Master" msgstr "Añadir _Maestro" #: ../src/xqf.c:2645 ../src/xqf.c:2710 msgid "_Rename Master" msgstr "_Renombrar Maestro" #: ../src/xqf.c:2650 ../src/xqf.c:2715 msgid "D_elete Master" msgstr "_Borrar Maestro" #: ../src/xqf.c:2655 ../src/xqf.c:2720 msgid "_Clear Servers" msgstr "_Limpiar los servidores" #: ../src/xqf.c:2665 ../src/xqf.c:2825 msgid "_Add new Server" msgstr "_Añadir un nuevo servidor" #: ../src/xqf.c:2670 ../src/xqf.c:2830 msgid "Add to _Favorites" msgstr "Añadir a _Favoritos" #: ../src/xqf.c:2675 ../src/xqf.c:2835 #, fuzzy msgid "_Remove" msgstr "Renombrar" #: ../src/xqf.c:2680 msgid "_Copy" msgstr "_Copiar" #: ../src/xqf.c:2685 msgid "_Copy+" msgstr "_Copiar+" #: ../src/xqf.c:2693 msgid "Add Default Masters" msgstr "Añadir Maestro Predeterminado" #: ../src/xqf.c:2699 msgid "Add Gslist Masters" msgstr "Añadir Maestro Gslist" #: ../src/xqf.c:2728 msgid "_Find Player" msgstr "B_uscar Jugador" #: ../src/xqf.c:2733 msgid "Find A_gain" msgstr "Buscar _Otra Vez" #: ../src/xqf.c:2751 msgid "_Refresh" msgstr "_Refrescar" #: ../src/xqf.c:2756 msgid "Refresh _Selected" msgstr "Refrescar _Seleccionados" #: ../src/xqf.c:2761 msgid "_Update From Master" msgstr "Act_ualizar Desde Master" #: ../src/xqf.c:2769 msgid "Show _Host Names" msgstr "Mostrar _Nombres de Servidores" #: ../src/xqf.c:2774 msgid "Show Default _Port" msgstr "Mostrar _Puerto por Defecto" #: ../src/xqf.c:2800 msgid "_Connect" msgstr "_Conectar" #: ../src/xqf.c:2805 msgid "_Observe" msgstr "_Observar" #: ../src/xqf.c:2810 msgid "Record _Demo" msgstr "Grabar _Demo" #: ../src/xqf.c:2841 msgid "DNS _Lookup" msgstr "Búsqueda D_NS" #: ../src/xqf.c:2849 msgid "_RCon" msgstr "_RCon" #: ../src/xqf.c:2854 msgid "_Properties" msgstr "_Propiedades" # src/xqf.c: #: ../src/xqf.c:2864 msgid "_General" msgstr "_General" #: ../src/xqf.c:2870 msgid "_Games" msgstr "_Juegos" #: ../src/xqf.c:2876 msgid "_Appearance" msgstr "_Apariencia" #: ../src/xqf.c:2882 #, fuzzy msgid "_QStat" msgstr "QStat" #: ../src/xqf.c:2888 #, fuzzy msgid "_Sounds" msgstr "Sonidos" #: ../src/xqf.c:2894 msgid "S_cripts" msgstr "" #: ../src/xqf.c:2904 msgid "_Server Filter" msgstr "Filtro de _Servidores" #: ../src/xqf.c:2909 msgid "Player _Filter" msgstr "_Filtro de Jugadores" #: ../src/xqf.c:2919 msgid "_About" msgstr "_Acerca de" #: ../src/xqf.c:2930 msgid "_File" msgstr "_Fichero" #: ../src/xqf.c:2935 msgid "_Edit" msgstr "_Editar" #: ../src/xqf.c:2940 msgid "_View" msgstr "_Ver" #: ../src/xqf.c:2945 msgid "_Server" msgstr "_Servidor" #: ../src/xqf.c:2950 msgid "_Preferences" msgstr "_Preferencias" #: ../src/xqf.c:2956 msgid "_Server Filters" msgstr "Filtros de _Servidores" #: ../src/xqf.c:2962 msgid "_Help" msgstr "_Ayuda" #: ../src/xqf.c:3005 msgid "Mark as Red" msgstr "Marcar en rojo" #: ../src/xqf.c:3012 msgid "Mark as Green" msgstr "Marcar en verde" #: ../src/xqf.c:3019 msgid "Mark as Blue" msgstr "Marcar en azul" #: ../src/xqf.c:3026 msgid "Add to Player Filter" msgstr "Añadir al filtro de jugadores" #: ../src/xqf.c:3047 ../src/trayicon.c:457 msgid "Update" msgstr "Actualizar" #: ../src/xqf.c:3047 msgid "Update from master" msgstr "Actualizar desde master" #: ../src/xqf.c:3055 msgid "Refresh current list" msgstr "Refrescar lista actual" #: ../src/xqf.c:3063 msgid "Ref.Sel." msgstr "Ref.Sel." #: ../src/xqf.c:3063 msgid "Refresh selected servers" msgstr "Refrescar servidores seleccionados" #: ../src/xqf.c:3098 msgid "Record" msgstr "Grabar" #. Translators: e.g. Server Filter #: ../src/xqf.c:3116 #, c-format msgid "%s Filter Enable / Disable" msgstr "Habilitar / deshabilitar el filtro de %s" #. Translators: e.g. Server Filter Configuration #: ../src/xqf.c:3138 #, c-format msgid "%s Filter Configuration" msgstr "Configuración de filtro %s" #: ../src/xqf.c:3240 msgid "Configure" msgstr "Configurar" #: ../src/xqf.c:3383 msgid "Filters" msgstr "Filtros" #: ../src/xqf.c:3552 msgid "Quick Filter:" msgstr "Filtro rápido:" #: ../src/xqf.c:3729 msgid "no sound player configured" msgstr "no hay ningún reproductor de audio configurado" #: ../src/xqf.c:3767 msgid "" "Usage:\n" "\txqf [OPTIONS]\n" "\n" "OPTIONS:\n" "\t--launch \"[SERVERTYPE] IP\"\tlaunch game on specified server\n" "\t--add \"[SERVERTYPE] IP\"\tadd specified server to favorites\n" "\t--debug \t\t\tset debug level\n" "\t--version\t\t\tprint version and exit\n" msgstr "" "Forma de uso:\n" "\txqf [OPTIONS]\n" "\n" "OPCIONES:\n" "\t--launch \"[TIPOSERVIDOR] IP\"\tlanzar el juego en el servidor " "especificado\n" "\t--add \"[TIPOSERVIDOR] IP\"\tañadir el servidor especificado a " "favoritos\n" "\t--debug \t\t\testablecer el nivel de depuración\n" "\t--version\t\t\tmostrar la versión y salir\n" #: ../src/xqf.c:4019 msgid "Reading server lists" msgstr "Leyendo listas de servidores" #: ../src/xqf.c:4036 #, c-format msgid "You need at least qstat version %s for xqf to function properly" msgstr "" "Necesitas al menos la versión %s de qstat para que xqf funcione adecuadamente" #: ../src/xqf.c:4040 #, fuzzy msgid "Loading icons ..." msgstr "Cargando..." #: ../src/xqf.c:4046 msgid "Starting ..." msgstr "Empezando..." #: ../src/splash.c:61 msgid "XQF: Loading" msgstr "XQF: Cargando" #: ../src/splash.c:90 msgid "Loading ..." msgstr "Cargando..." #. translator: %s = file name #: ../src/country-filter.c:220 ../src/loadpixmap.c:213 ../src/loadpixmap.c:226 #: ../src/loadpixmap.c:245 ../src/loadpixmap.c:257 #, c-format msgid "Error loading pixmap file: %s" msgstr "Error al cargar el fichero pixmap: %s" #: ../src/trayicon.c:376 ../src/trayicon.c:382 ../src/trayicon.c:390 #: ../src/trayicon.c:396 ../src/trayicon.c:410 #, c-format msgid "Error in file: %s line: %d\n" msgstr "Error al cargar el fichero: %s línea: %d\n" #. translator: show main window #: ../src/trayicon.c:473 msgid "Show" msgstr "Mostrar" #. translator: hide main window #: ../src/trayicon.c:479 msgid "Hide" msgstr "Esconder" #: ../src/trayicon.c:484 msgid "Exit" msgstr "Salir" #~ msgid "XQF" #~ msgstr "XQF" #~ msgid "" #~ "Note: You need to create a qstat config file for this game to work.\n" #~ "Please see the XQF documentation for more information." #~ msgstr "" #~ "Nota: Necesitas crear un fichero de configuración de qstat para que este\n" #~ "juego funcione. Mira la documentación de XQF para más información." #~ msgid "vm_cgame fix" #~ msgstr "arreglo para vm_cgame" #~ msgid "Rocketarena fix" #~ msgstr "arreglo para rocketarena" #~ msgid "QuakeForge workaround (uses base/ instead of id1/)" #~ msgstr "Alternativa para QuakeForge (usa base/ en vez de id1/)" #~ msgid "OS" #~ msgstr "SO" #~ msgid "Remove from Favorites" #~ msgstr "Eliminar de los favoritos" #~ msgid "_Remove from Favorites" #~ msgstr "_Eliminar de los favoritos" #~ msgid "_QStat Options" #~ msgstr "Opciones de _QStat" #~ msgid "_Sound Options" #~ msgstr "Opciones de s_onido" #~ msgid "Generic Gamespy" #~ msgstr "Gamespy Genérico" #~ msgid "Guess" #~ msgstr "Adivinar" #~ msgid "X11 Quake/QuakeWorld/Quake2/Quake3 Front-End\n" #~ msgstr "Frontend X11 para Quake/QuakeWorld/Quake2/Quake3\n" #~ msgid "Significant Contributors:" #~ msgstr "Contribuidores significativos:" #~ msgid "" #~ "http://www.linuxgames.com/xqf\n" #~ "http://sourceforge.net/projects/xqf\n" #~ "\n" #~ msgstr "" #~ "http://www.linuxgames.com/xqf/\n" #~ "http://sourceforge.net/projects/xqf/\n" #~ msgid "" #~ "Significant Contributors:\n" #~ "\n" #~ "Bill Adams \n" #~ "Alex Burger \n" #~ "Jordi Mallach \n" #~ "Ludwig Nussel \n" #~ "\n" #~ msgstr "" #~ "Contribuidores significativos:\n" #~ "\n" #~ "Bill Adams \n" #~ "Alex Burger \n" #~ "Jordi Mallach \n" #~ "Ludwig Nussel \n" #~ "\n" #~ msgid "" #~ "Other Contributors:\n" #~ "\n" #~ "Jochen Baier \n" #~ "\n" #~ msgstr "" #~ "Otros contribuidores:\n" #~ "\n" #~ "Jochen Baier \n" #~ "\n" #~ msgid "" #~ "Bug reports:\n" #~ "\n" #~ "http://sourceforge.net/projects/xqf\n" #~ "\n" #~ msgstr "" #~ "Informes de error:\n" #~ "\n" #~ "http://sourceforge.net/projects/xqf/\n" #~ "\n" #~ msgid "" #~ "Feature requests:\n" #~ "\n" #~ "http://www.linuxgames.com/xqf Forums section\n" #~ msgstr "" #~ "Peticiones de mejora:\n" #~ "\n" #~ "http://www.linuxgames.com/xqf Forums section\n" #~ msgid "Add" #~ msgstr "Añadir" #~ msgid "Replace" #~ msgstr "Reemplazar" #~ msgid "%s Filter" #~ msgstr "Filtro %s" #~ msgid "_Add Server" #~ msgstr "_Añadir Servidor" #~ msgid "_Delete" #~ msgstr "_Borrar" #~ msgid "The Game Type Contains the String:" #~ msgstr "el tipo de juego contiene la cadena" #~ msgid "Filter Name (For Menu):" #~ msgstr "Nombre del filtro (para el menú):" #~ msgid "T/O" #~ msgstr "T/O" #~ msgid "QW/Q2" #~ msgstr "QW/Q2" #~ msgid "Q3/RTCW" #~ msgstr "Q3/RTCW" #~ msgid "_Player Profile..." #~ msgstr "_Ficha de Jugador..." #~ msgid "Q_W/Q2 Options..." #~ msgstr "Opciones de Q_W/Q2..." #~ msgid "Q_3/RTCW Options..." #~ msgstr "Opciones de Q_3/RTCW..." xqf-1.0.5/po/fi.po0000644002404400000620000013112610520643117010607 00000000000000msgid "" msgstr "" "Project-Id-Version: XQF 1.0.2\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2006-10-28 13:56+0200\n" "PO-Revision-Date: 2005-03-17 15:27+0200\n" "Last-Translator: Sami Laitinen \n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Poedit-Language: Finnish\n" "X-Poedit-Country: FINLAND\n" "X-Poedit-SourceCharset: utf-8\n" #: ../xqf.desktop.in.h:1 #, fuzzy msgid "Game Server Browser" msgstr "XQF Pelipalvelinselain" #: ../xqf.desktop.in.h:2 msgid "Locate and connect to game servers" msgstr "Etsi ja yhdistä pelipalvelimiin" #: ../xqf.desktop.in.h:3 ../src/dialogs.c:492 msgid "XQF Game Server Browser" msgstr "XQF Pelipalvelinselain" #: ../src/addmaster.c:111 msgid "You have to specify a name and an address." msgstr "Sinun täytyy määritellä nimi ja osoite." #: ../src/addmaster.c:118 #, c-format msgid "Master address \"%s\" is not valid." msgstr "Pääpalvelimen osoite \"%s\" ei ole kelvollinen." #: ../src/addmaster.c:174 ../src/source.c:69 msgid "LAN" msgstr "LAN" #: ../src/addmaster.c:245 msgid "Rename Master" msgstr "Nimeä Pääpalvelin Uudelleen" #: ../src/addmaster.c:249 msgid "Add Master" msgstr "Lisää Pääpalvelin" #. Master Name (Description) #: ../src/addmaster.c:263 msgid "Master Name" msgstr "Pääpalvelimen Nimi" #. Master Address #: ../src/addmaster.c:319 msgid "Master Address" msgstr "Pääpalvelimen osoite" #. Cancel Button #: ../src/addmaster.c:409 ../src/addserver.c:152 ../src/dialogs.c:421 #: ../src/filter.c:1619 ../src/filter.c:2122 ../src/game.c:1819 #: ../src/launch.c:339 ../src/pref.c:4784 ../src/psearch.c:224 #: ../src/redial.c:227 ../src/srv-prop.c:841 ../src/xqf.c:981 ../src/xqf.c:994 #: ../src/xqf.c:1867 msgid "Cancel" msgstr "Peruuta" #: ../src/addserver.c:91 ../src/addserver.c:188 msgid "Add Server" msgstr "Lisää Palvelin" #. Server Entry #: ../src/addserver.c:102 msgid "Server:" msgstr "Palvelin:" #: ../src/dialogs.c:124 ../src/dialogs.c:199 ../src/dialogs.c:279 msgid "XQF: Warning!" msgstr "XQF: Varoitus!" #. OK Button #. gtk_button_box_set_child_size(GTK_BUTTON_BOX(hbuttonbox1), 79, 38); #. OK Button #: ../src/dialogs.c:149 ../src/dialogs.c:410 ../src/dialogs.c:600 #: ../src/filter.c:1630 ../src/filter.c:2110 ../src/pref.c:4792 #: ../src/psearch.c:213 ../src/srv-prop.c:849 msgid "OK" msgstr "OK" #: ../src/dialogs.c:224 ../src/dialogs.c:304 ../src/filter.c:1050 #: ../src/psearch.c:398 ../src/xqf.c:957 ../src/xqf.c:969 ../src/xqf.c:1645 msgid "Yes" msgstr "Kyllä" #: ../src/dialogs.c:236 ../src/dialogs.c:316 ../src/filter.c:1051 #: ../src/psearch.c:398 ../src/xqf.c:957 ../src/xqf.c:969 ../src/xqf.c:1645 msgid "No" msgstr "Ei" #: ../src/dialogs.c:326 ../src/xqf.c:994 msgid "Redial" msgstr "Yhdistä uudelleen" #: ../src/dialogs.c:493 #, c-format msgid "Version %s" msgstr "Versio %s" #. translators can use the copyright symbol instead of (C) #: ../src/dialogs.c:496 msgid "Copyright (C) 1998-2002 Roman Pozlevich" msgstr "Copyright © 1998-2002 Roman Pozlevich" #: ../src/dialogs.c:499 msgid "Maintainers:" msgstr "Ylläpitäjät:" #: ../src/dialogs.c:505 msgid "Contributors:" msgstr "Avustajat:" #: ../src/dialogs.c:509 msgid "Bug reports and feature requests:" msgstr "Vikailmoitukset ja ominaisuustoiveet:" #: ../src/dialogs.c:556 msgid "About XQF" msgstr "Tietoja" #: ../src/dialogs.c:583 msgid "[placeholder, do not translate]" msgstr "[placeholder, do not translate]" #: ../src/filter.c:97 msgid "Server" msgstr "Palvelin" #: ../src/filter.c:98 msgid "S Filter" msgstr "P Suodatin" #: ../src/filter.c:99 msgid "SF Cfg" msgstr "SF Cfg" #: ../src/filter.c:111 msgid "Player" msgstr "Pelaaja" #: ../src/filter.c:112 msgid "P Filter" msgstr "P Suodatin" #: ../src/filter.c:113 msgid "PF Cfg" msgstr "PF Cfg" #: ../src/filter.c:1011 msgid "Enter filter name" msgstr "Syötä suodattimen nimi" #: ../src/filter.c:1049 msgid "Delete server filter" msgstr "Poista palvelinsuodatin" #: ../src/filter.c:1052 #, c-format msgid "Really delete server filter \"%s\"?" msgstr "Haluatko varmasti poistaa palvelinsuodattimen \"%s\"?" #: ../src/filter.c:1257 msgid "Server Filter" msgstr "Palvelinsuodatin" #: ../src/filter.c:1271 ../src/flt-player.c:821 ../src/pref.c:2821 msgid "New" msgstr "Uusi" #: ../src/filter.c:1278 msgid "Rename" msgstr "Nimeä Uudelleen" #. FIXME: plural #: ../src/filter.c:1285 ../src/flt-player.c:827 ../src/pref.c:2829 #: ../src/xqf.c:1867 msgid "Delete" msgstr "Poista" #: ../src/filter.c:1292 msgid "Server would pass filter if" msgstr "Palvelin läpäisee suodattimen jos" #. row=0..1 #. max ping #: ../src/filter.c:1313 msgid "ping is less than" msgstr "vasteaika on vähemmän kuin" #. GAMECONTAINS Filter -- baa #. http://developer.gnome.org/doc/API/gtk/gtktable.html #: ../src/filter.c:1334 msgid "the game contains the string" msgstr "peli sisältää tekstin" #. row=1..2 #. max timeouts #: ../src/filter.c:1352 msgid "the number of retries is fewer than" msgstr "uudelleenyrityksien määrä on vähemmän kuin" #. GAMETYPE Filter -- baa #. http://developer.gnome.org/doc/API/gtk/gtktable.html #: ../src/filter.c:1371 msgid "the game type contains the string" msgstr "pelityyppi sisältää tekstin" #. row=2..3 #. not full #: ../src/filter.c:1388 msgid "it is not full" msgstr "ei ole täysi" #. Version Filter -- baa #: ../src/filter.c:1395 msgid "the version contains the string" msgstr "versio sisältää tekstin" #: ../src/filter.c:1414 msgid "it is not empty" msgstr "ei ole tyhjä" #. Map filter #: ../src/filter.c:1423 msgid "the map contains the string" msgstr "kartta sisältää tekstin" #: ../src/filter.c:1441 msgid "cheats are not allowed" msgstr "huijaukset eivät ole sallittuja" #. Server name filter #: ../src/filter.c:1450 msgid "the server name contains the string" msgstr "palvelimen nimi sisältää tekstin" #: ../src/filter.c:1468 msgid "no password required" msgstr "ei salasanavaatimusta" #: ../src/filter.c:1479 ../src/filter.c:1958 msgid "Country filter:" msgstr "Maasuodatin:" #: ../src/filter.c:1520 msgid "select..." msgstr "valitse..." #: ../src/filter.c:1533 msgid "clear" msgstr "tyhjennä" #: ../src/filter.c:1591 msgid "XQF: Filters" msgstr "XQF: Suodattimet" #. window caption for country filter #: ../src/filter.c:1949 msgid "Configure Country Filter" msgstr "Määrittele Maasuodattimet" #: ../src/filter.c:2091 msgid "Show all countries" msgstr "Näytä kaikki maat" #: ../src/flt-player.c:69 ../src/flt-player.c:75 msgid "string" msgstr "merkkijono" #: ../src/flt-player.c:70 #, fuzzy msgid "substr" msgstr "substr" #: ../src/flt-player.c:71 msgid "regexp" msgstr "sään. lauseke" #: ../src/flt-player.c:76 msgid "substring" msgstr "alimerkkijono" #: ../src/flt-player.c:77 msgid "regular expression" msgstr "säännöllinen lauseke" #: ../src/flt-player.c:448 ../src/psearch.c:116 msgid "XQF: Error" msgstr "XQF: Virhe" #: ../src/flt-player.c:448 ../src/psearch.c:117 #, c-format msgid "" "Regular Expression Error!\n" "\n" "%s\n" "\n" "%s." msgstr "" "Virhe Säännöllisissä Lausekkeissa!\n" "\n" "%s\n" "\n" "%s." #. Pattern Entry #: ../src/flt-player.c:666 ../src/flt-player.c:754 msgid "Pattern" msgstr "Kaava" #. Comment #: ../src/flt-player.c:701 msgid "Pattern Comment" msgstr "Kaavan Kommentti" #: ../src/flt-player.c:754 msgid "Mode" msgstr "Moodi" #: ../src/flt-player.c:760 msgid "Player Filter" msgstr "Pelaajasuodatin" #: ../src/flt-player.c:839 msgid "Up" msgstr "Ylös" #: ../src/flt-player.c:845 msgid "Down" msgstr "Alas" #: ../src/game.c:212 msgid "" "Note: Soldier of Fortune will not connect to a server correctly\n" "without creating a startup script for the game. Please see the\n" "XQF documentation for more information." msgstr "" "Huomio: Soldier of Fortune ei pysty yhdistämään palvelimelle oikein\n" "ilman luotua käynnistysjonoa. Katso lisätietoja XQF:n dokumentaatiosta." #: ../src/game.c:216 msgid "" "Note: Unreal Tournament will not launch correctly without\n" "modifications to the game's startup script. Please see the\n" "XQF documentation for more information." msgstr "" "Huomio: Unreal Tournament ei käynnisty oikein ilman\n" "pelin käynnistysjonon muokkausta. Katso lisätietoja\n" "XQF:n dokumentaatiosta." #: ../src/game.c:220 msgid "Sample Command Line: wine hl.exe -- hl.exe -console" msgstr "Esimerkkikomentorivi: wine hl.exe -- hl.exe -console" #: ../src/game.c:223 msgid "" "Note: Savage will not launch correctly without\n" "modifications to the game's startup script. Please see the\n" "XQF documentation for more information." msgstr "" "Huomio: Savage ei käynnisty oikein ilman\n" "pelin käynnistysjonon muokkausta. Katso lisätietoja\n" "XQF:n dokumentaatiosta." #. %s = game name e.g. QuakeWorld #: ../src/game.c:1691 #, c-format msgid "%s command line is empty." msgstr "%s komentorivi on tyhjä." #. directory name, game name #. %s directory, game name #: ../src/game.c:1698 ../src/game.c:1807 #, c-format msgid "" "\"%s\" is not a directory\n" "Please specify correct %s working directory." msgstr "" "\"%s\" ei ole hakemisto\n" "Määritä oikea %s työhakemisto." #. game name #: ../src/game.c:1710 #, c-format msgid "Please specify correct %s working directory." msgstr "Määritä oikea %s työhakemisto." #. directory, subdirectory, game name #: ../src/game.c:1716 #, c-format msgid "" "Directory \"%s\" doesn't contain \"%s\" subdirectory.\n" "Please specify correct %s working directory." msgstr "" "Hakemisto \"%s\" ei sisällä alihakemistoa \"%s\".\n" "Määritä oikea %s työhakemisto." #. %s Quake3 #: ../src/game.c:1773 #, c-format msgid "" "~/.q3a directory doesn't exist or doesn't contain\n" "\"baseq3\" (\"demoq3\") subdirectory.\n" "Please run %s client at least once before running XQF\n" "or specify correct %s working directory." msgstr "" "Hakemistoa ~/.q3a ei ole olemassa tai se ei sisällä\n" "alihakemistoa \"baseq3\" (\"demoq3\").\n" "Käynnistä %s vähintään kerran ennen XQF:n ajamista\n" "tai määritä oikea %s työhakemisto." #. %s directory, Quake3 #: ../src/game.c:1782 #, c-format msgid "" "\"%s\" directory doesn't exist or doesn't contain \"baseq3\" (\"demoq3\") " "subdirectory.\n" "Please specify correct %s working directory\n" "or leave it empty (~/.q3a is used by default)" msgstr "" "Hakemistoa \"%s\" ei ole olemassa tai ei sisällä alihakemistoa \"baseq3" "\" (\"demoq3\").\n" "Aseta oikea %s työhakemisto\n" "tai jätä se tyhjäksi (~/.q3a on oletusarvona)" #: ../src/game.c:1819 ../src/launch.c:339 ../src/xqf.c:981 ../src/xqf.c:994 msgid "Launch" msgstr "Käynnistä" #. %s frontend.cfg #: ../src/game.c:1821 #, c-format msgid "" "Cannot write to file \"%s\".\n" "\n" "Launch client anyway?" msgstr "" "Ei voida kirjoittaa tiedostoon \"%s\".\n" "\n" "Käynnistä ohjelma kuitenkin?" #: ../src/game.c:2448 msgid "" "The server has Punkbuster enabled but it is not going\n" "to be set on the command line.\n" "You may have problems connecting.\n" "You can fix this in the game preferences." msgstr "" "Palvelimella on käytössä Punkbuster,\n" " mutta sitä ei käynnistetä komentoriviltä.\n" "Palvelimelle yhdistämisessä voi olla ongelmia.\n" "Voit korjata tämän peliasetuksista." #: ../src/launch.c:70 ../src/launch.c:195 msgid "XQF: ERROR!" msgstr "XQF: VIRHE!" #: ../src/launch.c:70 #, c-format msgid "" "ERROR!\n" "\n" "%s(%s) failed: %s" msgstr "" "VIRHE!\n" "\n" "%s(%s) epäonnistui: %s" #: ../src/launch.c:195 #, c-format msgid "" "ERROR!\n" "\n" "%s" msgstr "" "VIRHE!\n" "\n" "%s" #: ../src/launch.c:340 #, c-format msgid "" "There is %s client running.\n" "\n" "Launch %s client?" msgstr "" "%s on jo käynnissä.\n" "\n" "Käynnistä %s?" #: ../src/pref.c:646 msgid "com_soundmegs and com_zonemegs must be lower than com_hunkmegs" msgstr "com_soundmegs ja com_zonemegs täytyvät olla vähemmän kuin com_hunkmegs" #: ../src/pref.c:1232 msgid "Invalid source IP address" msgstr "Viallinen lähde IP-osoite" #: ../src/pref.c:1244 msgid "Invalid source port range" msgstr "Viallinen lähdeporttialue" #. Top (Shirt) Color #: ../src/pref.c:1592 ../src/pref.c:1691 msgid "Top" msgstr "Yläosa" #. Bottom (Pants) Color #: ../src/pref.c:1608 ../src/pref.c:1707 msgid "Bottom" msgstr "Alaosa" #. Player Name #: ../src/pref.c:1854 ../src/pref.c:1965 ../src/pref.c:2025 ../src/pref.c:2077 #: ../src/xqf-ui.c:54 ../src/xqf-ui.c:129 msgid "Name" msgstr "Nimi" #: ../src/pref.c:1875 ../src/xqf-ui.c:141 msgid "Colors" msgstr "Värit" #: ../src/pref.c:1908 msgid "Login name" msgstr "Kirjautumisnimi" #: ../src/pref.c:1950 msgid "Skin/Colors" msgstr "Nahka/Värit" #: ../src/pref.c:1986 msgid "Team" msgstr "Tiimi" #: ../src/pref.c:2044 msgid "Model/Skin" msgstr "Malli/Nahka" #: ../src/pref.c:2131 msgid "--- Anything ---" msgstr "--- Mitä Tahansa ---" #: ../src/pref.c:2132 msgid "Axe" msgstr "Axe" #: ../src/pref.c:2133 msgid "Shotgun" msgstr "Shotgun" #: ../src/pref.c:2134 msgid "Super Shotgun" msgstr "Super Shotgun" #: ../src/pref.c:2135 msgid "Nailgun" msgstr "Nailgun" #: ../src/pref.c:2136 msgid "Super Nailgun" msgstr "Super Nailgun" #: ../src/pref.c:2137 msgid "Grenade Launcher" msgstr "Grenade Launcher" #: ../src/pref.c:2138 msgid "Rocket Launcher" msgstr "Rocket Launcher" #: ../src/pref.c:2139 msgid "ThunderBolt" msgstr "ThunderBolt" #: ../src/pref.c:2187 msgid "Use skins" msgstr "Käytä nahkoja" #: ../src/pref.c:2193 msgid "Don't use skins" msgstr "Älä käytä nahkoja" #: ../src/pref.c:2199 msgid "Don't download new skins" msgstr "Älä lataa uusia nahkoja" #: ../src/pref.c:2241 msgid "You must configure a command line first" msgstr "Sinun täytyy ensin määritellä komentorivi" #: ../src/pref.c:2283 msgid "Game not found" msgstr "Peliä ei löytynyt" #. %s name of a game #: ../src/pref.c:2285 #, c-format msgid "%s not found" msgstr "%s ei löytynyt" #: ../src/pref.c:2333 #, c-format msgid "" "An entry already exists for the game %s.\n" "\n" "A default entry for this game will not be added.\n" "\n" "Delete the entry and try again." msgstr "" "Pelille %s on jo merkintä.\n" "\n" "Oletusarvoista merkintää ei lisätä tälle pelille.\n" "\n" "Poista merkintä ja yritä uudelleen." #: ../src/pref.c:2375 msgid "There are no defaults for this game" msgstr "Tälle pelille ei ole oletusarvoja" #: ../src/pref.c:2436 msgid "" "There is already an entry for this game.\n" "\n" "To modify it, select it from the list, modify it\n" "and then click Add/Update." msgstr "" "Tälle pelille on jo merkintä.\n" "\n" "Muokataksesi sitä, valitse se listasta, muokkaa sitä\n" "ja paina Lisää/Päivitä." #: ../src/pref.c:2440 msgid "You must enter both a game and at least one argument." msgstr "Sinun täytyy syöttää peli ja vähintään yksi argumentti" #: ../src/pref.c:2539 msgid "Invoking" msgstr "Käynnistys" #: ../src/pref.c:2546 msgid "*** Not Implemented ***" msgstr "*** Ei Toteutettu ***" #: ../src/pref.c:2558 msgid "Custom Args" msgstr "Mukaillut Argumentit" #: ../src/pref.c:2570 msgid "Command Line" msgstr "Komentorivi" #. translator: button for command suggestion #. translator: button for directory guess #: ../src/pref.c:2597 ../src/pref.c:2635 msgid "Suggest" msgstr "Ehdota" #: ../src/pref.c:2603 msgid "Searches the path for the game executable" msgstr "Etsii polusta pelin käynnistytiedostoa" #. /// #: ../src/pref.c:2610 msgid "Working Directory" msgstr "Työhakemisto" #: ../src/pref.c:2640 msgid "Tries to guess the working directory based on the command line" msgstr "Yrittää arvata työhakemiston komentorivin perusteella" #: ../src/pref.c:2658 msgid "Custom CFG" msgstr "Mukailtu CFG" #: ../src/pref.c:2763 ../src/xqf-ui.c:102 msgid "Game" msgstr "Peli" #: ../src/pref.c:2771 msgid "Arguments" msgstr "Argumentit" #: ../src/pref.c:2779 msgid "Game and Arguments" msgstr "Peli ja Argumentit" #: ../src/pref.c:2802 msgid "Enter the game name from the game column" msgstr "Lisää pelin nimi pelisarakkeesta" #: ../src/pref.c:2811 msgid "Enter the arguments separated by spaces" msgstr "Syötä argumentit välilyönneillä eroteltuina" #: ../src/pref.c:2837 msgid "Add Defaults" msgstr "Lisää Oletusarvot" #: ../src/pref.c:2845 msgid "Add/Update" msgstr "Lisää/Päivitä" #. Common Options #: ../src/pref.c:3000 msgid "Common Options" msgstr "Yleiset Asetukset" #: ../src/pref.c:3011 msgid "Disable CD Audio" msgstr "Poista CD Audio Käytöstä" #. Disable Sound #: ../src/pref.c:3019 msgid "Disable Sound" msgstr "Poista Äänet Käytöstä" #: ../src/pref.c:3043 msgid "Do not set (use game default)" msgstr "Älä aseta (käytä pelin oletusasetusta)" #: ../src/pref.c:3044 msgid "Automatically calculate from server ping time" msgstr "Laske automaattisesti palvelimen vasteajasta" #: ../src/pref.c:3045 msgid "Fixed value" msgstr "Kiinteä arvo" #: ../src/pref.c:3113 msgid "Masterserver Protocol Version" msgstr "Pääpalvelimen protokollaversio" #: ../src/pref.c:3136 msgid "set fs_game on connect" msgstr "aseta fs_game yhdistettäessä" #: ../src/pref.c:3145 msgid "set cl_punkbuster on connect" msgstr "aseta cl_punkbuster yhdistettäessä" #: ../src/pref.c:3154 #, fuzzy msgid "enable console" msgstr "Ota Äänet Käyttöön" #: ../src/pref.c:3216 msgid "Pass memory settings on command line" msgstr "Välitä muistiasetukset komentorivillä" #. Mega Byte #: ../src/pref.c:3234 ../src/pref.c:3257 ../src/pref.c:3280 ../src/pref.c:3304 msgid "MB" msgstr "MB" #: ../src/pref.c:3238 msgid "com_hunkmegs" msgstr "com_hunkmegs" #: ../src/pref.c:3261 msgid "com_zonemegs" msgstr "com_zonemegs" #: ../src/pref.c:3284 msgid "com_soundmegs" msgstr "com_soundmegs" #: ../src/pref.c:3308 msgid "cg_precachedmodels" msgstr "cg_precachedmodels" #: ../src/pref.c:3317 msgid "Preset values" msgstr "Esiasetetut arvot" #: ../src/pref.c:3324 msgid "Default" msgstr "Oletusarvo" #: ../src/pref.c:3330 msgid "128MB" msgstr "128MB" #: ../src/pref.c:3336 msgid ">256MB" msgstr ">256MB" #: ../src/pref.c:3355 ../src/pref.c:3584 ../src/pref.c:3590 msgid "Options" msgstr "Asetukset" #: ../src/pref.c:3358 msgid "Memory" msgstr "Muisti" #. QW Specific Features #. 'w_switch' & 'b_switch' control #: ../src/pref.c:3387 msgid "The highest weapon that Quake should switch to..." msgstr "Korkein ase mihin Quaken tulisi vaihtaa..." #: ../src/pref.c:3400 msgid "upon a weapon pickup" msgstr "asetta otettaessa" #: ../src/pref.c:3418 msgid "upon a backpack pickup" msgstr "reppua otettaessa" #: ../src/pref.c:3439 msgid "Disable auto-aiming" msgstr "Ota auto-aiming pois käytöstä" #: ../src/pref.c:3477 msgid "Skins" msgstr "Nahat" #: ../src/pref.c:3499 msgid "Rate" msgstr "Rate" #. 'pushlatency' #: ../src/pref.c:3523 msgid "pushlatency" msgstr "pushlatency" #. Troubleshooting #: ../src/pref.c:3538 msgid "Troubleshooting" msgstr "Ongelmanratkonta" #: ../src/pref.c:3551 msgid "Disable delta-compression (cl_nodelta)" msgstr "Poista delta-compression (cl_nodelta) käytöstä" #: ../src/pref.c:3565 msgid "Disable player/entity prediction (cl_predict_players)" msgstr "Poista player/entity prediction (cl_predict_players) käytöstä" #: ../src/pref.c:3583 msgid "Weapons" msgstr "Aseet" #: ../src/pref.c:3585 ../src/pref.c:3591 ../src/pref.c:3596 ../src/pref.c:3601 msgid "Player Profile" msgstr "Pelaajan Profiili" #: ../src/pref.c:3677 msgid "Icons" msgstr "Ikonit" #: ../src/pref.c:3677 msgid "Text" msgstr "Teksti" #: ../src/pref.c:3677 msgid "Both" msgstr "Molemmat" #: ../src/pref.c:3683 msgid "Server List" msgstr "Palvelinlista" #: ../src/pref.c:3696 msgid "Show host names" msgstr "Näytä isäntänimet" #: ../src/pref.c:3701 msgid "Show hostnames instead of IP addresses if possible" msgstr "Näytä isäntänimet IP-osoitteiden tilalla jos mahdollista" #: ../src/pref.c:3712 msgid "Show default port" msgstr "Näytä oletusarvoinen portti" #: ../src/pref.c:3727 msgid "Do not count bots as players" msgstr "Älä laske botteja pelaajiksi" #: ../src/pref.c:3743 msgid "Sort servers real-time during refresh" msgstr "Lajittele palvelimet virkistyksen aikana" #: ../src/pref.c:3758 msgid "Refresh on update" msgstr "Virkistä päivitettäessä" #: ../src/pref.c:3774 msgid "Resolve hostnames on update" msgstr "Selvitä isäntänimet päivityksessä" #: ../src/pref.c:3778 msgid "Enable or disable DNS resolution of IP addresses" msgstr "Ota käyttöön tai poista käytöstä IP-osoitteiden DNS selvitys" #: ../src/pref.c:3792 msgid "Show only configured games" msgstr "Näytä ainoastaan asetetut pelit" #: ../src/pref.c:3808 msgid "Use custom color settings" msgstr "Käytä mukailtuja väriasetuksia" #: ../src/pref.c:3810 msgid "" "Use XQF's color settings instead of the system ones. You need to restart XQF " "for this setting to take effect. Note that you may need to install the gtk-" "engines package." msgstr "" "Käytä XQF:n väriasetuksia järjestelmän väriasetuksien sijaan. XQF täytyy " "käynnistää uudelleen, jotta tämä asetus tulisi voimaan. Huomaa, että sinun " "täytyy ehkä asentaa gtk-engines paketti." #. Toolbar #: ../src/pref.c:3831 msgid "Toolbar" msgstr "Työkalurivi" #. Toolbar Tips #: ../src/pref.c:3856 msgid "Tooltips" msgstr "Työkaluvihjeet" #. On Startup #: ../src/pref.c:3899 msgid "On Startup" msgstr "Käynnistyksessä" #: ../src/pref.c:3912 msgid "Refresh Favorites" msgstr "Virkistä Suosikit" #: ../src/pref.c:3925 msgid "Show splash screen" msgstr "Näytä aloitusruutu" #: ../src/pref.c:3939 msgid "Scan for maps" msgstr "Etsi karttoja" #: ../src/pref.c:3944 msgid "" "Scan game directories for installed maps. xqf will take longer to start up " "when enabled." msgstr "" "Etsi asennettuja karttoja pelien hakemistoista. xqf käynnistyy hitaammin, " "kun tämä on valittuna." #: ../src/pref.c:3951 msgid "scan now" msgstr "etsi nyt" #: ../src/pref.c:3967 msgid "Minimize to system tray" msgstr "Pienennä ohjelmatarjottimelle" #: ../src/pref.c:3971 msgid "Enable xqf tray icon. You need to restart xqf for this to take effect." msgstr "" "Ota käyttöön xqf ohjelmatarjotinikoni. XQF täytyy käynnistää uudelleen, " "jotta tämä asetus tulisi voimaan." #. On Exit #: ../src/pref.c:3984 msgid "On Exit" msgstr "Poistuttaessa" #: ../src/pref.c:3997 msgid "Save server lists" msgstr "Tallenna palvelinlistat" #: ../src/pref.c:4012 msgid "Save server information" msgstr "Tallenna palvelimien tiedot" #: ../src/pref.c:4029 msgid "Save player information" msgstr "Tallenna pelaajien tiedot" #. When launching a Game #: ../src/pref.c:4045 msgid "When launching a game..." msgstr "Käynnistettäessä peliä..." #: ../src/pref.c:4059 msgid "Terminate XQF" msgstr "Lopeta XQF" #: ../src/pref.c:4074 msgid "Iconify XQF window" msgstr "Pienennä XQF:n kuvakkeeksi" #: ../src/pref.c:4089 msgid "Create LaunchInfo.txt" msgstr "Luo Launchinfo.txt" #: ../src/pref.c:4095 msgid "" "Creates the file ~/.qf/LaunchInfo.txt with: ping ip:port name map curplayers " "maxplayers" msgstr "" "Luo tiedoston ~/.qf/LaunchInfo.txt sisältäen: vasteaika ip:portti nimi " "kartta pelaajienmäärä maksimipelaajat" #: ../src/pref.c:4101 msgid "Execute prelaunch" msgstr "Aja esikäynnistys" #: ../src/pref.c:4107 msgid "Executes ~/.qf/PreLaunch (if it exists) before launching the game" msgstr "Aja ~/.qf/PreLaunch (jos on olemassa) ennen pelin käynnistämistä" #: ../src/pref.c:4116 msgid "Stop current song in XMMS" msgstr "Pysäytä XMMS" #: ../src/pref.c:4119 msgid "" "Stopping XMMS will release /dev/dsp. Activate this option if you use XMMS " "and have a cheap soundcard that allows only one application to open /dev/dsp." msgstr "" "XMMS:n pysäyttäminen vapauttaa /dev/dsp:n. Valitse tämä, jos käytät XMMS:ää " "ja sinulla on halpa äänikortti, joka sallii vain yhden ohjelman käyttää " "kerralla /dev/dsp:tä." #. QStat preferences -- maxsimultaneous & maxretries #: ../src/pref.c:4158 msgid "QStat Options" msgstr "QStat Valinnat" #. maxsimultaneous #: ../src/pref.c:4169 msgid "Number of simultaneous servers to query" msgstr "Yhtäaikaisten palvelimien kyselyiden määrä" #. maxretries #: ../src/pref.c:4193 msgid "Number of retries" msgstr "Uudelleenyrityksien määrä" #. srcip #: ../src/pref.c:4212 msgid "Source IP Address" msgstr "Lähde IP-osoite" #: ../src/pref.c:4233 msgid "Source Port Range" msgstr "Lähdeporttialue" #. Translator: sound test button #: ../src/pref.c:4296 msgid "Test" msgstr "Testaa" #. Sound Enable / Disable frame #. Sounds Enable / Disable #: ../src/pref.c:4313 msgid "Sound Enable / Disable" msgstr "Ota Äänet Käyttöön / Poista Käytöstä" #: ../src/pref.c:4327 msgid "Enable Sound" msgstr "Ota Äänet Käyttöön" #. Sound Player #: ../src/pref.c:4338 msgid "Player program" msgstr "Äänisoitin" #. Sound Files frame #. Sounds preferences -- player and various sounds #: ../src/pref.c:4366 msgid "Sound Files" msgstr "Äänitiedostot" #. Sound XQF Start #: ../src/pref.c:4378 msgid "XQF Start" msgstr "XQF Käynnistys" #. Sound XQF Quit #: ../src/pref.c:4410 msgid "XQF Quit" msgstr "XQF Lopetus" #. Sound Update Done #: ../src/pref.c:4442 msgid "Update Done" msgstr "Päivitys Valmis" #. Sound Refresh Done #: ../src/pref.c:4475 msgid "Refresh Done" msgstr "Virkistys Valmis" #. Sound Stop #: ../src/pref.c:4508 ../src/xqf.c:3071 ../src/trayicon.c:462 msgid "Stop" msgstr "Pysäytä" #. Sound Server Connect #: ../src/pref.c:4541 msgid "Server Connect" msgstr "Palvelimen Yhdistys" #. Sound Redial Success Start #: ../src/pref.c:4574 msgid "Redial Success" msgstr "Uudelleenyhdistys Onnistui" #: ../src/pref.c:4702 msgid "XQF: Preferences" msgstr "XQF: Ominaisuudet" #: ../src/pref.c:4722 msgid "General" msgstr "Yleiset" #: ../src/pref.c:4734 msgid "Games" msgstr "Pelit" #: ../src/pref.c:4739 msgid "Appearance" msgstr "Ulkoasu" #: ../src/pref.c:4744 msgid "QStat" msgstr "QStat" #: ../src/pref.c:4749 msgid "Sounds" msgstr "Äänet" #: ../src/pref.c:4754 msgid "Scripts" msgstr "" #: ../src/pref.c:4895 msgid "Unable to get user name/home/tmpdir" msgstr "Ei onnistunut saamaan käyttäjänimeä/kotia/väliaikaishakemistoa" #. translator: %s = game name, e.g. Quake 3 Arena #: ../src/pref.c:5227 #, c-format msgid "Searching for %s maps" msgstr "Etsitään %s karttoja" #: ../src/pref.c:5281 msgid "Game Command Selection" msgstr "Pelikomento Valinta" #: ../src/pref.c:5290 msgid "Game Directory Selection" msgstr "Pelihakemisto Valinta" #: ../src/pref.c:5295 msgid "Sound Player Selection" msgstr "Äänisoittimen Valinta" #: ../src/pref.c:5300 msgid "XQF Start Sound Selection" msgstr "XQF Käynnistys Äänivalinta" #: ../src/pref.c:5305 msgid "XQF Quit Sound Selection" msgstr "XQF Lopetus Äänivalinta" #: ../src/pref.c:5310 msgid "Update Done Sound Selection" msgstr "Päivitys Valmis Äänivalinta" #: ../src/pref.c:5315 msgid "Refresh Done Sound Selection" msgstr "Virkistys Valmis Äänivalinta" #: ../src/pref.c:5320 msgid "Stop Sound Selection" msgstr "Pysäytys Äänivalinta" #: ../src/pref.c:5325 msgid "Server Connect Sound Selection" msgstr "Palvelimen Yhdistys Äänivalinta" #: ../src/pref.c:5330 msgid "Redial Success Sound Selection" msgstr "Uudelleenyhdistys Onnistunut Äänivalinta" #: ../src/psearch.c:51 msgid "Exact Match" msgstr "Tarkka Vastaavuus" #: ../src/psearch.c:52 msgid "Substring" msgstr "Substring" #: ../src/psearch.c:53 msgid "Regular Expression" msgstr "Regular Expression" #: ../src/psearch.c:174 msgid "Find Player" msgstr "Etsi Pelaaja" #. Pattern Entry #: ../src/psearch.c:185 msgid "Find Player:" msgstr "Etsi Pelaaja:" #: ../src/psearch.c:394 msgid "Player not found." msgstr "Pelaajaa ei löytynyt." #: ../src/psearch.c:398 msgid "XQF: End of server list reached" msgstr "XQF: Palvelinlistan loppu saavutettu" #: ../src/psearch.c:399 msgid "Continue search from beginning?" msgstr "Jatka hakua alusta?" #. Message #: ../src/rcon.c:550 msgid "Cmd:" msgstr "Komento:" #. Send Button #: ../src/rcon.c:577 msgid "Send" msgstr "Lähetä" #. Status Button #: ../src/rcon.c:586 msgid "Status" msgstr "Tila" #. Clear Button #: ../src/rcon.c:595 msgid "Clear" msgstr "Tyhjennä" #: ../src/rcon.c:617 ../src/statistics.c:849 msgid "Close" msgstr "Sulje" #: ../src/rcon.c:717 #, c-format msgid "Usage: %s [server type] \n" msgstr "Käyttö: %s [palvelimen tyyppi] \n" #: ../src/rcon.c:718 #, fuzzy, c-format msgid " server type is either --qws, --hws, --hls or --dm3s.\n" msgstr " palvelimen tyyppi on joko --qws, --hws tai --hls.\n" #: ../src/rcon.c:719 #, c-format msgid " If no server type is specified, Q3 style rcon is assumed.\n" msgstr "" " Jos palvelimen tyyppiä ei ole määritelty, Q3 tyylin rcon on oletuksena.\n" #. translator: readline prompt #: ../src/rcon.c:756 msgid "Password: " msgstr "Salasana:" #: ../src/redial.c:123 #, c-format msgid "" "Waiting for free slots on\n" "%s" msgstr "" "Odotetaan vapaita paikkoja\n" "%s" #: ../src/redial.c:125 #, c-format msgid "" "Refreshing\n" "%s" msgstr "" "Virkistetään\n" "%s" #. * window code modified from glade #: ../src/redial.c:179 ../src/redial.c:184 msgid "XQF: Redialing" msgstr "XQF: Yhdistetään Uudelleen" #: ../src/redial.c:196 msgid "" "***\n" "***" msgstr "" "***\n" "***" #: ../src/redial.c:219 msgid "Launch now" msgstr "Käynnistä nyt" #: ../src/source.c:66 msgid "Standard" msgstr "Standardi" #: ../src/source.c:67 msgid "Gamespy" msgstr "Gamespy" #: ../src/source.c:68 msgid "http" msgstr "http" #: ../src/source.c:70 msgid "File" msgstr "Tiedosto" #: ../src/source.c:122 msgid "Retry" msgstr "Yritä Uudelleen" #: ../src/source.c:122 msgid "Skip" msgstr "Ohita" #: ../src/source.c:123 #, c-format msgid "" "Cannot write to file %s\n" "System Error: %s\n" msgstr "" "Ei voida kirjoittaa tiedostoon %s\n" "Järjestelmävirhe: %s\n" #. translator: %s == url, eg gmaster://bla.blub.org #: ../src/source.c:891 #, c-format msgid "You have to specify a port number for %s." msgstr "Sinun täytyy määritellä portti %s:lle." #: ../src/source.c:905 #, c-format msgid "'gsmtype' options missing for master %s." msgstr "'gsmtype' valinnat puuttuvat pääpalvelimelta %s." #: ../src/source.c:1439 msgid "Favorites" msgstr "Suosikit" #: ../src/srv-prop.c:423 msgid "IP Address:" msgstr "IP Osoite:" #: ../src/srv-prop.c:433 msgid "Port:" msgstr "Portti:" #: ../src/srv-prop.c:447 msgid "Host Name:" msgstr "Isäntänimi:" #: ../src/srv-prop.c:461 msgid "Country:" msgstr "Maa:" #: ../src/srv-prop.c:489 msgid "Refreshed:" msgstr "Virkistetty:" #. translator: last time and date the server answered the query #: ../src/srv-prop.c:507 msgid "Last answer:" msgstr "Viimeisin vastaus:" #: ../src/srv-prop.c:564 msgid "Reserved Slots:" msgstr "Varatut paikat:" #. Sources #: ../src/srv-prop.c:583 msgid "Sources" msgstr "Lähteet" #: ../src/srv-prop.c:635 msgid "Custom CFG:" msgstr "Mukailtu CFG:" #: ../src/srv-prop.c:684 msgid "Server Password" msgstr "Palvelimen Salasana" #: ../src/srv-prop.c:690 msgid "Spectator Password" msgstr "Tarkkailijan Salasana" #: ../src/srv-prop.c:697 msgid "RCon/Admin Password" msgstr "RCon/Admin Salasana" #: ../src/srv-prop.c:728 msgid "This server sucks" msgstr "Tämä palvelin imee" #: ../src/srv-prop.c:771 ../src/xqf.c:2603 ../src/xqf.c:2741 msgid "Properties" msgstr "Ominaisuudet" #: ../src/srv-prop.c:816 msgid "Info" msgstr "Tiedot" #: ../src/srv-prop.c:821 msgid "Passwords" msgstr "Salasanat" #: ../src/srv-prop.c:826 msgid "Comment" msgstr "Kommentti" #: ../src/stat.c:728 msgid "Allies" msgstr "Allies" #: ../src/stat.c:728 msgid "Axis" msgstr "Axis" #: ../src/stat.c:734 msgid "Red" msgstr "Red" #: ../src/stat.c:734 msgid "Blue" msgstr "Blue" #: ../src/stat.c:1376 #, c-format msgid "" "UT2004 CD Key not found, cannot query master '%s'.\n" "Make sure the working directory is set correctly." msgstr "" "UT2004 CD Avainta ei löytynyt, ei voida tiedustella pääpalvelimelta '%s'.\n" "Varmista, että työhakemisto on määritelty oikein." #: ../src/stat.c:1559 #, c-format msgid "Failed to create a temporary file %s: %s" msgstr "Väliaikaistiedoston %s luonti epäonnistui: %s" #. The space behind up and down is to make the strings different from #. those in flt-player.c because their meaning is different in german #: ../src/statistics.c:82 ../src/statistics.c:93 msgid "Servers" msgstr "Palvelimet" #: ../src/statistics.c:82 msgid "Up " msgstr "Toiminnassa " #: ../src/statistics.c:82 msgid "Timeout" msgstr "Aikakatkaisu" #: ../src/statistics.c:82 msgid "Down " msgstr "Alhaalla " #: ../src/statistics.c:82 msgid "Info n/a" msgstr "Ei tietoja" #: ../src/statistics.c:82 ../src/statistics.c:504 ../src/xqf-ui.c:88 msgid "Players" msgstr "Pelaajat" #: ../src/statistics.c:86 ../src/statistics.c:90 msgid "unknown" msgstr "tuntematon" #: ../src/statistics.c:94 msgid "OS/CPU" msgstr "OS/CPU" #: ../src/statistics.c:95 ../src/xqf-ui.c:65 msgid "Country" msgstr "Maa" #: ../src/statistics.c:450 ../src/statistics.c:498 ../src/statistics.c:503 msgid "Total" msgstr "Yhteensä" #: ../src/statistics.c:493 msgid "CPU \\ OS" msgstr "CPU \\ OS" #: ../src/statistics.c:721 msgid "All Games" msgstr "Kaikki Pelit" #: ../src/statistics.c:803 ../src/statistics.c:812 msgid "Statistics" msgstr "Tilastot" #. error converting time to string representation, shouldn't happen #: ../src/utils.c:903 msgid "" msgstr "" #: ../src/utils.c:1126 msgid "Can't open source file for reading" msgstr "" #: ../src/utils.c:1133 msgid "Can't open destination file for writing" msgstr "" #: ../src/utils.c:1141 msgid "write error on destination file" msgstr "" #: ../src/utils.c:1148 msgid "read error on source file" msgstr "" #: ../src/xqf-ui.c:58 #, fuzzy msgid "Type" msgstr "Pelityyppi" #: ../src/xqf-ui.c:61 msgid "Address" msgstr "Osoite" #: ../src/xqf-ui.c:68 ../src/xqf-ui.c:153 msgid "Ping" msgstr "Vasteaika" #: ../src/xqf-ui.c:74 msgid "TO" msgstr "TO" #: ../src/xqf-ui.c:80 msgid "Priv" msgstr "Priv" #. Translator: "PunkBuster" #: ../src/xqf-ui.c:85 msgid "PB" msgstr "" #. Translator: Max as in max players #: ../src/xqf-ui.c:93 #, fuzzy msgid "Max" msgstr "Kartta" #: ../src/xqf-ui.c:96 msgid "Map" msgstr "Kartta" #: ../src/xqf-ui.c:108 msgid "GameType" msgstr "Pelityyppi" #: ../src/xqf-ui.c:135 msgid "Frags" msgstr "Pisteet" #: ../src/xqf-ui.c:147 msgid "Skin" msgstr "Nahka" #: ../src/xqf-ui.c:159 msgid "Time" msgstr "Aika" #: ../src/xqf-ui.c:179 msgid "Rule" msgstr "Sääntö" #: ../src/xqf-ui.c:185 msgid "Value" msgstr "Arvo" #: ../src/xqf-ui.c:575 msgid "Source" msgstr "Lähde" #: ../src/xqf.c:349 #, c-format msgid "%d server" msgstr "%d palvelin" #: ../src/xqf.c:349 #, c-format msgid "%d servers" msgstr "%d palvelinta" #. server filter #: ../src/xqf.c:597 #, c-format msgid "None <--" msgstr "Ei Mitään <--" #: ../src/xqf.c:599 ../src/xqf.c:3201 ../src/xqf.c:3258 ../src/xqf.c:3403 #, c-format msgid "None" msgstr "Ei Mitään" #: ../src/xqf.c:613 #, c-format msgid "Filter %d <--" msgstr "Suodatin %d <--" #: ../src/xqf.c:615 #, c-format msgid "Filter %d" msgstr "Suodatin %d" #: ../src/xqf.c:637 #, c-format msgid "No Server Filter Active" msgstr "Ei Palvelinsuodattimia Päällä" #: ../src/xqf.c:644 #, c-format msgid "Server Filter: %s" msgstr "Palvelinsuodatin: %s" #: ../src/xqf.c:648 #, c-format msgid "Server Filter: %d" msgstr "Palvelinsuodatin: %d" #: ../src/xqf.c:815 msgid "Updating lists..." msgstr "Päivitetään listoja..." #: ../src/xqf.c:821 #, c-format msgid "Resolving host names: %d/%d" msgstr "Selvitetään isäntänimet: %d/%d" #: ../src/xqf.c:825 #, c-format msgid "Refreshing: %d/%d" msgstr "Virkistetään: %d/%d" #: ../src/xqf.c:831 #, c-format msgid "Resolving host addresses: %d/%d" msgstr "Selvitetään isäntäosoitteet: %d/%d" #: ../src/xqf.c:958 msgid "" "You said this servers sucks.\n" "Do you want to risk a game this time?" msgstr "" "Sanoit, että tämä palvelin imee.\n" "Haluatko riskeerata pelin tällä kertaa?" #: ../src/xqf.c:970 #, c-format msgid "" "This server is not compatible with the version of %s you have installed.\n" "Launch client anyway?" msgstr "" "Tämä palvelin ei ole yhteensopiva %s:n asennetun version kanssa.\n" "Käynnistä ohjelma kuitenkin?" #: ../src/xqf.c:982 #, c-format msgid "" "Server %s:%d is %s.\n" "\n" "Launch client anyway?" msgstr "" "Palvelin %s:%d on %s.\n" "\n" "Käynnistä ohjelma kuitenkin?" #: ../src/xqf.c:995 #, c-format msgid "" "Server %s:%d is full.\n" "\n" "Launch client anyway?" msgstr "" "Palvelin %s:%d on täynnä.\n" "\n" "Käynnistä ohjelma kuitenkin?" #: ../src/xqf.c:1108 ../src/xqf.c:1128 ../src/xqf.c:2003 msgid "Save Password" msgstr "Tallenna Salasana" #: ../src/xqf.c:1108 msgid "Spectator Password:" msgstr "Tarkkailijan Salasana:" #: ../src/xqf.c:1128 ../src/xqf.c:2003 msgid "Server Password:" msgstr "Palvelimen Salasana:" #: ../src/xqf.c:1279 msgid "Spectator" msgstr "Tarkkailija" #: ../src/xqf.c:1280 ../src/xqf.c:1283 msgid "Demo name:" msgstr "Demon nimi:" #: ../src/xqf.c:1525 #, c-format msgid "Host %s not found" msgstr "Isäntää %s ei löydy" #: ../src/xqf.c:1545 ../src/xqf.c:3815 #, c-format msgid "\"%s\" is not valid host[:port] combination." msgstr "\"%s\" ei ole pätevä isäntä[:portti] yhdistelmä." #: ../src/xqf.c:1646 #, fuzzy msgid "Remove selected servers from all lists?" msgstr "Päivitä valitut palvelimet" #. translator: %s == url #: ../src/xqf.c:1791 #, c-format msgid "" "For Gslist support you must install the 'gslist' program available from\n" "%s\n" "Don't forget that you need to run 'gslist -u' before you can use it." msgstr "" "Saadaksesi Gslist-tuen, sinun täytyy asentaa 'gslist' -ohjelma, joka on " "saatavilla osoitteesta\n" "%s\n" "Älä unohda, että sinun täytyy ajaa 'gslist -u' ennen kuin voit käyttää sitä." #: ../src/xqf.c:1862 msgid "You have to select the server you want to delete" msgstr "Sinun täytyy valita palvelin jonka haluat poistaa" #: ../src/xqf.c:1868 #, c-format msgid "" "Master%s to delete:\n" "\n" "%s" msgstr "" "Pääpalvelin %s poistetaan:\n" "\n" "%s" #: ../src/xqf.c:1891 #, c-format msgid "Find Player: %s" msgstr "Etsi Pelaaja: %s" #: ../src/xqf.c:1983 msgid "Done." msgstr "Valmis." #: ../src/xqf.c:2525 ../src/xqf.c:3081 msgid "Connect" msgstr "Yhdistä" #: ../src/xqf.c:2530 ../src/xqf.c:3090 msgid "Observe" msgstr "Seuraa" #: ../src/xqf.c:2535 ../src/xqf.c:3098 msgid "Record Demo" msgstr "Nauhoita Demo" #: ../src/xqf.c:2549 msgid "Add new Server" msgstr "Lisää uusi Palvelin" #: ../src/xqf.c:2554 msgid "Add to Favorites" msgstr "Lisää Suosikkeihin" #: ../src/xqf.c:2559 #, fuzzy msgid "Remove" msgstr "Nimeä Uudelleen" #: ../src/xqf.c:2564 ../src/xqf.c:2613 msgid "Copy" msgstr "Kopioi" #: ../src/xqf.c:2569 msgid "Copy+" msgstr "Kopioi+" #: ../src/xqf.c:2577 ../src/xqf.c:3055 ../src/trayicon.c:452 msgid "Refresh" msgstr "Virkistä" #: ../src/xqf.c:2582 msgid "Refresh Selected" msgstr "Virkistä Valitut" #: ../src/xqf.c:2590 msgid "DNS Lookup" msgstr "DNS Selvitys" #: ../src/xqf.c:2598 msgid "RCon" msgstr "RCon" #: ../src/xqf.c:2621 msgid "_Statistics" msgstr "_Tilastot" #: ../src/xqf.c:2629 msgid "_Exit" msgstr "_Poistu" #: ../src/xqf.c:2640 ../src/xqf.c:2705 msgid "Add _Master" msgstr "Lisää _Pääpalvelin" #: ../src/xqf.c:2645 ../src/xqf.c:2710 msgid "_Rename Master" msgstr "_Nimeä Pääpalvelin Uudelleen" #: ../src/xqf.c:2650 ../src/xqf.c:2715 msgid "D_elete Master" msgstr "P_oista Pääpalvelin" #: ../src/xqf.c:2655 ../src/xqf.c:2720 msgid "_Clear Servers" msgstr "_Tyhjennä Palvelimet" #: ../src/xqf.c:2665 ../src/xqf.c:2825 msgid "_Add new Server" msgstr "_Lisää Palvelin" #: ../src/xqf.c:2670 ../src/xqf.c:2830 msgid "Add to _Favorites" msgstr "Lisää _Suosikkeihin" #: ../src/xqf.c:2675 ../src/xqf.c:2835 #, fuzzy msgid "_Remove" msgstr "Nimeä Uudelleen" #: ../src/xqf.c:2680 msgid "_Copy" msgstr "_Kopioi" #: ../src/xqf.c:2685 msgid "_Copy+" msgstr "_Kopioi+" #: ../src/xqf.c:2693 msgid "Add Default Masters" msgstr "Lisää Oletusarvoinen Pääpalvelin" #: ../src/xqf.c:2699 msgid "Add Gslist Masters" msgstr "Lisää Gslist Pääpalvelin" #: ../src/xqf.c:2728 msgid "_Find Player" msgstr "_Etsi Pelaaja" #: ../src/xqf.c:2733 msgid "Find A_gain" msgstr "Etsi _Uudestaan" #: ../src/xqf.c:2751 msgid "_Refresh" msgstr "_Virkistä" #: ../src/xqf.c:2756 msgid "Refresh _Selected" msgstr "Virkistä _Valitut" #: ../src/xqf.c:2761 msgid "_Update From Master" msgstr "_Päivitä Pääpalvelimelta" #: ../src/xqf.c:2769 msgid "Show _Host Names" msgstr "Näytä _Isäntänimet" #: ../src/xqf.c:2774 msgid "Show Default _Port" msgstr "Näytä Oletusarvoinen _Portti" #: ../src/xqf.c:2800 msgid "_Connect" msgstr "_Yhdistä" #: ../src/xqf.c:2805 msgid "_Observe" msgstr "_Seuraa" #: ../src/xqf.c:2810 msgid "Record _Demo" msgstr "Nauhoita _Demo" #: ../src/xqf.c:2841 msgid "DNS _Lookup" msgstr "DNS _Selvitys" #: ../src/xqf.c:2849 msgid "_RCon" msgstr "_RCon" #: ../src/xqf.c:2854 msgid "_Properties" msgstr "_Ominaisuudet" #: ../src/xqf.c:2864 msgid "_General" msgstr "_Yleiset" #: ../src/xqf.c:2870 msgid "_Games" msgstr "_Pelit" #: ../src/xqf.c:2876 msgid "_Appearance" msgstr "_Ulkonäkö" #: ../src/xqf.c:2882 #, fuzzy msgid "_QStat" msgstr "QStat" #: ../src/xqf.c:2888 #, fuzzy msgid "_Sounds" msgstr "Äänet" #: ../src/xqf.c:2894 msgid "S_cripts" msgstr "" #: ../src/xqf.c:2904 msgid "_Server Filter" msgstr "_Palvelinsuodatin" #: ../src/xqf.c:2909 msgid "Player _Filter" msgstr "Pelaaja_suodatin" #: ../src/xqf.c:2919 msgid "_About" msgstr "_Tietoja" #: ../src/xqf.c:2930 msgid "_File" msgstr "_Tiedosto" #: ../src/xqf.c:2935 msgid "_Edit" msgstr "_Muokkaa" #: ../src/xqf.c:2940 msgid "_View" msgstr "_Näytä" #: ../src/xqf.c:2945 msgid "_Server" msgstr "_Palvelin" #: ../src/xqf.c:2950 msgid "_Preferences" msgstr "_Ominaisuudet" #: ../src/xqf.c:2956 msgid "_Server Filters" msgstr "_Palvelinsuodattimet" #: ../src/xqf.c:2962 msgid "_Help" msgstr "_Ohje" #: ../src/xqf.c:3005 msgid "Mark as Red" msgstr "Merkitse Punaiseksi" #: ../src/xqf.c:3012 msgid "Mark as Green" msgstr "Merkitse Vihreäksi" #: ../src/xqf.c:3019 msgid "Mark as Blue" msgstr "Merkitse Siniseksi" #: ../src/xqf.c:3026 msgid "Add to Player Filter" msgstr "Lisää Pelaajasuodattimeen" #: ../src/xqf.c:3047 ../src/trayicon.c:457 msgid "Update" msgstr "Päivitä" #: ../src/xqf.c:3047 msgid "Update from master" msgstr "Päivitä pääpalvelimelta" #: ../src/xqf.c:3055 msgid "Refresh current list" msgstr "Virkistä nykyinen lista" #: ../src/xqf.c:3063 msgid "Ref.Sel." msgstr "Päiv.Valit." #: ../src/xqf.c:3063 msgid "Refresh selected servers" msgstr "Päivitä valitut palvelimet" #: ../src/xqf.c:3098 msgid "Record" msgstr "Nauhoita" #. Translators: e.g. Server Filter #: ../src/xqf.c:3116 #, c-format msgid "%s Filter Enable / Disable" msgstr "%ssuodatin Päälle / Pois" #. Translators: e.g. Server Filter Configuration #: ../src/xqf.c:3138 #, c-format msgid "%s Filter Configuration" msgstr "%s Suodattimen Asetukset" #: ../src/xqf.c:3240 msgid "Configure" msgstr "Muokkaa Asetuksia" #: ../src/xqf.c:3383 msgid "Filters" msgstr "Suodattimet" #: ../src/xqf.c:3552 msgid "Quick Filter:" msgstr "Pikasuodatin:" #: ../src/xqf.c:3729 msgid "no sound player configured" msgstr "ei äänisoitinta asetettuna" #: ../src/xqf.c:3767 msgid "" "Usage:\n" "\txqf [OPTIONS]\n" "\n" "OPTIONS:\n" "\t--launch \"[SERVERTYPE] IP\"\tlaunch game on specified server\n" "\t--add \"[SERVERTYPE] IP\"\tadd specified server to favorites\n" "\t--debug \t\t\tset debug level\n" "\t--version\t\t\tprint version and exit\n" msgstr "" "Käyttö:\n" "\txqf [VALINNAT]\n" "\n" "VALINNAT:\n" "\t--launch \"[PALVELINTYYPPI] IP\"\tkäynnistä peli valitulle palvelimelle\n" "\t--add \"[PALVELINTYYPPI] IP\"\tlisää määritelty palvelin suosikkeihin\n" "\t--debug \t\t\taseta debug-taso\n" "\t--version\t\t\ttulosta versio ja poistu\n" #: ../src/xqf.c:4019 msgid "Reading server lists" msgstr "Luetaan palvelinlistoja" #: ../src/xqf.c:4036 #, c-format msgid "You need at least qstat version %s for xqf to function properly" msgstr "Tarvitset vähintään version %s qstat:sta, jotta xqf toimisi oikein" #: ../src/xqf.c:4040 msgid "Loading icons ..." msgstr "Ladataan kuvakkeita ..." #: ../src/xqf.c:4046 msgid "Starting ..." msgstr "Käynnistetään ..." #: ../src/splash.c:61 msgid "XQF: Loading" msgstr "XQF: Ladataan" #: ../src/splash.c:90 msgid "Loading ..." msgstr "Ladataan ..." #. translator: %s = file name #: ../src/country-filter.c:220 ../src/loadpixmap.c:213 ../src/loadpixmap.c:226 #: ../src/loadpixmap.c:245 ../src/loadpixmap.c:257 #, c-format msgid "Error loading pixmap file: %s" msgstr "Virhe ladattaessa kuvaketiedostoa: %s" #: ../src/trayicon.c:376 ../src/trayicon.c:382 ../src/trayicon.c:390 #: ../src/trayicon.c:396 ../src/trayicon.c:410 #, c-format msgid "Error in file: %s line: %d\n" msgstr "Virhe tiedostossa %s rivillä: %d\n" #. translator: show main window #: ../src/trayicon.c:473 msgid "Show" msgstr "Näytä" #. translator: hide main window #: ../src/trayicon.c:479 msgid "Hide" msgstr "Piilota" #: ../src/trayicon.c:484 msgid "Exit" msgstr "Poistu" #~ msgid "XQF" #~ msgstr "XQF" #~ msgid "vm_cgame fix" #~ msgstr "vm_cgame korjaus" #~ msgid "Rocketarena fix" #~ msgstr "Rocketarena korjaus" #~ msgid "OS" #~ msgstr "Käyttöjärjestelmä" #~ msgid "Remove from Favorites" #~ msgstr "Poista Suosikeista" #~ msgid "_Remove from Favorites" #~ msgstr "_Poista Suosikeista" #~ msgid "_QStat Options" #~ msgstr "_QStat Valinnat" #~ msgid "_Sound Options" #~ msgstr "Ää_nivalinnat" xqf-1.0.5/po/fr.po0000755002404400000620000013574710520643117010640 00000000000000# Translation of fr.po to French # Useless title. # Copyright (c) 2003 Michel Briand # This file is distributed under the same license as the package XQF. # Alex Burger , 2003 # Michel Briand , 2003 # msgid "" msgstr "" "Project-Id-Version: XQF CVS\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2006-10-28 13:56+0200\n" "PO-Revision-Date: 2003-10-22 19:09+0200\n" "Last-Translator: Michel Briand \n" "Language-Team: French\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../xqf.desktop.in.h:1 msgid "Game Server Browser" msgstr "" #: ../xqf.desktop.in.h:2 msgid "Locate and connect to game servers" msgstr "" #: ../xqf.desktop.in.h:3 ../src/dialogs.c:492 msgid "XQF Game Server Browser" msgstr "" #: ../src/addmaster.c:111 msgid "You have to specify a name and an address." msgstr "Vous devez spécifier un nom et une adresse." #: ../src/addmaster.c:118 #, c-format msgid "Master address \"%s\" is not valid." msgstr "L'adresse du serveur maître \"%s\" est invalide." #: ../src/addmaster.c:174 ../src/source.c:69 msgid "LAN" msgstr "LAN" #: ../src/addmaster.c:245 msgid "Rename Master" msgstr "Renommer le serveur maître" #: ../src/addmaster.c:249 msgid "Add Master" msgstr "Ajouter un serveur maître" #. Master Name (Description) #: ../src/addmaster.c:263 msgid "Master Name" msgstr "Nom du serveur maître" #. Master Address #: ../src/addmaster.c:319 msgid "Master Address" msgstr "Adresse du serveur maître" #. Cancel Button #: ../src/addmaster.c:409 ../src/addserver.c:152 ../src/dialogs.c:421 #: ../src/filter.c:1619 ../src/filter.c:2122 ../src/game.c:1819 #: ../src/launch.c:339 ../src/pref.c:4784 ../src/psearch.c:224 #: ../src/redial.c:227 ../src/srv-prop.c:841 ../src/xqf.c:981 ../src/xqf.c:994 #: ../src/xqf.c:1867 msgid "Cancel" msgstr "Annuler" #: ../src/addserver.c:91 ../src/addserver.c:188 msgid "Add Server" msgstr "Ajouter un nouveau serveur" #. Server Entry #: ../src/addserver.c:102 msgid "Server:" msgstr "Serveur :" #: ../src/dialogs.c:124 ../src/dialogs.c:199 ../src/dialogs.c:279 msgid "XQF: Warning!" msgstr "XQF : Attention !" #. OK Button #. gtk_button_box_set_child_size(GTK_BUTTON_BOX(hbuttonbox1), 79, 38); #. OK Button #: ../src/dialogs.c:149 ../src/dialogs.c:410 ../src/dialogs.c:600 #: ../src/filter.c:1630 ../src/filter.c:2110 ../src/pref.c:4792 #: ../src/psearch.c:213 ../src/srv-prop.c:849 msgid "OK" msgstr "Valider" #: ../src/dialogs.c:224 ../src/dialogs.c:304 ../src/filter.c:1050 #: ../src/psearch.c:398 ../src/xqf.c:957 ../src/xqf.c:969 ../src/xqf.c:1645 msgid "Yes" msgstr "Oui" #: ../src/dialogs.c:236 ../src/dialogs.c:316 ../src/filter.c:1051 #: ../src/psearch.c:398 ../src/xqf.c:957 ../src/xqf.c:969 ../src/xqf.c:1645 msgid "No" msgstr "Non" #: ../src/dialogs.c:326 ../src/xqf.c:994 msgid "Redial" msgstr "Tenter une reconnexion" #: ../src/dialogs.c:493 #, fuzzy, c-format msgid "Version %s" msgstr "" "Version %s\n" "\n" #. translators can use the copyright symbol instead of (C) #: ../src/dialogs.c:496 #, fuzzy msgid "Copyright (C) 1998-2002 Roman Pozlevich" msgstr "" "Copyright (C) 1998-2002 Roman Pozlevich \n" "\n" #: ../src/dialogs.c:499 msgid "Maintainers:" msgstr "" #: ../src/dialogs.c:505 #, fuzzy msgid "Contributors:" msgstr "Filtre pays :" #: ../src/dialogs.c:509 msgid "Bug reports and feature requests:" msgstr "" #: ../src/dialogs.c:556 msgid "About XQF" msgstr "A propos de XQF" #: ../src/dialogs.c:583 msgid "[placeholder, do not translate]" msgstr "" #: ../src/filter.c:97 msgid "Server" msgstr "Serveur" #: ../src/filter.c:98 msgid "S Filter" msgstr "Filtre serveur" #: ../src/filter.c:99 msgid "SF Cfg" msgstr "Cfg filtre serveur" #: ../src/filter.c:111 msgid "Player" msgstr "Joueur" #: ../src/filter.c:112 msgid "P Filter" msgstr "Filtre joueur" #: ../src/filter.c:113 msgid "PF Cfg" msgstr "Cfg filtre joueur" #: ../src/filter.c:1011 msgid "Enter filter name" msgstr "Entrer le nom du filtre" #: ../src/filter.c:1049 msgid "Delete server filter" msgstr "Effacer le filtre serveur" #: ../src/filter.c:1052 #, c-format msgid "Really delete server filter \"%s\"?" msgstr "Voulez vous vraiment effacer le filtre serveur \"%s\" ?" #: ../src/filter.c:1257 msgid "Server Filter" msgstr "Filtre serveur" #: ../src/filter.c:1271 ../src/flt-player.c:821 ../src/pref.c:2821 msgid "New" msgstr "Nouveau" #: ../src/filter.c:1278 msgid "Rename" msgstr "Renommer" #. FIXME: plural #: ../src/filter.c:1285 ../src/flt-player.c:827 ../src/pref.c:2829 #: ../src/xqf.c:1867 msgid "Delete" msgstr "Effacer" #: ../src/filter.c:1292 msgid "Server would pass filter if" msgstr "Le serveur passerait le filtre si" #. row=0..1 #. max ping #: ../src/filter.c:1313 msgid "ping is less than" msgstr "le ping est inférieur à" #. GAMECONTAINS Filter -- baa #. http://developer.gnome.org/doc/API/gtk/gtktable.html #: ../src/filter.c:1334 msgid "the game contains the string" msgstr "le jeu contient l'expression" #. row=1..2 #. max timeouts #: ../src/filter.c:1352 msgid "the number of retries is fewer than" msgstr "le nombre de tentatives est inférieur à" #. GAMETYPE Filter -- baa #. http://developer.gnome.org/doc/API/gtk/gtktable.html #: ../src/filter.c:1371 msgid "the game type contains the string" msgstr "le type de jeu contient l'expression" #. row=2..3 #. not full #: ../src/filter.c:1388 msgid "it is not full" msgstr "le serveur n'est pas plein" #. Version Filter -- baa #: ../src/filter.c:1395 msgid "the version contains the string" msgstr "la version contient l'expression" #: ../src/filter.c:1414 msgid "it is not empty" msgstr "le serveur n'est pas vide" #. Map filter #: ../src/filter.c:1423 msgid "the map contains the string" msgstr "la carte contient l'expression" #: ../src/filter.c:1441 msgid "cheats are not allowed" msgstr "les tricheurs ne sont pas admis" #. Server name filter #: ../src/filter.c:1450 msgid "the server name contains the string" msgstr "le nom du serveur contient l'expression" #: ../src/filter.c:1468 msgid "no password required" msgstr "aucun mot de passe n'est exigé" #: ../src/filter.c:1479 ../src/filter.c:1958 msgid "Country filter:" msgstr "Filtre pays :" #: ../src/filter.c:1520 msgid "select..." msgstr "choississez..." #: ../src/filter.c:1533 msgid "clear" msgstr "Effacer" #: ../src/filter.c:1591 msgid "XQF: Filters" msgstr "XQF : Filtres" #. window caption for country filter #: ../src/filter.c:1949 msgid "Configure Country Filter" msgstr "Configuration du filtre pays" #: ../src/filter.c:2091 msgid "Show all countries" msgstr "Montrer tous les pays" #: ../src/flt-player.c:69 ../src/flt-player.c:75 msgid "string" msgstr "string" #: ../src/flt-player.c:70 msgid "substr" msgstr "substr" #: ../src/flt-player.c:71 msgid "regexp" msgstr "regexp" #: ../src/flt-player.c:76 msgid "substring" msgstr "substring" #: ../src/flt-player.c:77 msgid "regular expression" msgstr "expression régulière" #: ../src/flt-player.c:448 ../src/psearch.c:116 msgid "XQF: Error" msgstr "XQF : Erreur" #: ../src/flt-player.c:448 ../src/psearch.c:117 #, c-format msgid "" "Regular Expression Error!\n" "\n" "%s\n" "\n" "%s." msgstr "" "Erreur dans l'expression régulière !\n" "\n" "%s\n" "\n" "%s." #. Pattern Entry #: ../src/flt-player.c:666 ../src/flt-player.c:754 msgid "Pattern" msgstr "Modèle" #. Comment #: ../src/flt-player.c:701 msgid "Pattern Comment" msgstr "Commentaire pour le modèle" #: ../src/flt-player.c:754 msgid "Mode" msgstr "Mode" #: ../src/flt-player.c:760 msgid "Player Filter" msgstr "Filtre joueur" #: ../src/flt-player.c:839 msgid "Up" msgstr "En Haut" #: ../src/flt-player.c:845 msgid "Down" msgstr "En Bas" #: ../src/game.c:212 msgid "" "Note: Soldier of Fortune will not connect to a server correctly\n" "without creating a startup script for the game. Please see the\n" "XQF documentation for more information." msgstr "" "Note: Soldier of Fortune ne se connectera pas correctement\n" "au serveur sans créer un script de démarrage pour le jeu.\n" "Consultez la documentation de XQF pour plus d'informations." #: ../src/game.c:216 msgid "" "Note: Unreal Tournament will not launch correctly without\n" "modifications to the game's startup script. Please see the\n" "XQF documentation for more information." msgstr "" "Note: Unreal Tournament ne démarrera pas correctement sans\n" "modification du script de démarrage du jeu.\n" "Consultez la documentation de XQF pour plus d'informations." #: ../src/game.c:220 msgid "Sample Command Line: wine hl.exe -- hl.exe -console" msgstr "" "Exemple de ligne de commande:\n" "wine hl.exe -- hl.exe -console" #: ../src/game.c:223 msgid "" "Note: Savage will not launch correctly without\n" "modifications to the game's startup script. Please see the\n" "XQF documentation for more information." msgstr "" "Note: Savage ne démarrera pas correctement sans\n" "modification du script de démarrage du jeu.\n" "Consultez la documentation de XQF pour plus d'informations." #. %s = game name e.g. QuakeWorld #: ../src/game.c:1691 #, c-format msgid "%s command line is empty." msgstr "la ligne de commande %s est vide" #. directory name, game name #. %s directory, game name #: ../src/game.c:1698 ../src/game.c:1807 #, c-format msgid "" "\"%s\" is not a directory\n" "Please specify correct %s working directory." msgstr "" "\"%s\" n'est pas un répertoire\n" "Entrez un répertoire de travail valide pour %s." #. game name #: ../src/game.c:1710 #, c-format msgid "Please specify correct %s working directory." msgstr "Entrez un répertoire de travail valide pour %s." #. directory, subdirectory, game name #: ../src/game.c:1716 #, c-format msgid "" "Directory \"%s\" doesn't contain \"%s\" subdirectory.\n" "Please specify correct %s working directory." msgstr "" "Le répertoire \"%s\" ne contient pas le sous-répertoire \"%s\".\n" "Entrez un répertoire de travail valide pour \"%s\"." #. %s Quake3 #: ../src/game.c:1773 #, c-format msgid "" "~/.q3a directory doesn't exist or doesn't contain\n" "\"baseq3\" (\"demoq3\") subdirectory.\n" "Please run %s client at least once before running XQF\n" "or specify correct %s working directory." msgstr "" "Le répertoire ~/.q3a n'existe pas ou ne contient pas\n" "le sous-répertoire \"baseq3\" (\"demoq3\").\n" "Lancez le client %s au moins une fois avant de démarrer\n" "XQF ou spécifiez un répertoire de travail valide pour %s." #. %s directory, Quake3 #: ../src/game.c:1782 #, c-format msgid "" "\"%s\" directory doesn't exist or doesn't contain \"baseq3\" (\"demoq3\") " "subdirectory.\n" "Please specify correct %s working directory\n" "or leave it empty (~/.q3a is used by default)" msgstr "" "Le répertoire \"%s\" n'existe pas ou ne contient pas le sous-répertoire\n" "\"baseq3\" (\"demoq3\") \n" "Spécifiez un répertoire de travail valide pour %s ou laissez\n" "ce champ vide (~/.q3a sera utilisé par défaut" #: ../src/game.c:1819 ../src/launch.c:339 ../src/xqf.c:981 ../src/xqf.c:994 msgid "Launch" msgstr "Lancer" #. %s frontend.cfg #: ../src/game.c:1821 #, c-format msgid "" "Cannot write to file \"%s\".\n" "\n" "Launch client anyway?" msgstr "" "Impossible d'écrire dans le fichier \"%s\".\n" "\n" "Lancer le jeu malgré tout ?" #: ../src/game.c:2448 msgid "" "The server has Punkbuster enabled but it is not going\n" "to be set on the command line.\n" "You may have problems connecting.\n" "You can fix this in the game preferences." msgstr "" "Punkbuster est activé sur le serveur mais ne peut pas\n" "être spécifié dans la ligne de commande du jeu.\n" "Vous pourriez avoir des problèmes de connection.\n" "Vous pouvez activer Punkbuster dans les préférences du jeu." #: ../src/launch.c:70 ../src/launch.c:195 msgid "XQF: ERROR!" msgstr "XQF: ERREUR !" #: ../src/launch.c:70 #, c-format msgid "" "ERROR!\n" "\n" "%s(%s) failed: %s" msgstr "" "ERREUR !\n" "\n" "%s(%s) a échoué: %s" #: ../src/launch.c:195 #, c-format msgid "" "ERROR!\n" "\n" "%s" msgstr "" "ERREUR !\n" "\n" "%s" #: ../src/launch.c:340 #, c-format msgid "" "There is %s client running.\n" "\n" "Launch %s client?" msgstr "" "Le jeu %s semble être déjà lancé.\n" "\n" "Lancer le jeu %s malgré tout ?" #: ../src/pref.c:646 msgid "com_soundmegs and com_zonemegs must be lower than com_hunkmegs" msgstr "com_soundmegs et com_zonemegs doivent être inférieur à com_hunkmegs" #: ../src/pref.c:1232 msgid "Invalid source IP address" msgstr "" #: ../src/pref.c:1244 msgid "Invalid source port range" msgstr "" #. Top (Shirt) Color #: ../src/pref.c:1592 ../src/pref.c:1691 msgid "Top" msgstr "Haut" #. Bottom (Pants) Color #: ../src/pref.c:1608 ../src/pref.c:1707 msgid "Bottom" msgstr "Bas" #. Player Name #: ../src/pref.c:1854 ../src/pref.c:1965 ../src/pref.c:2025 ../src/pref.c:2077 #: ../src/xqf-ui.c:54 ../src/xqf-ui.c:129 msgid "Name" msgstr "Nom" #: ../src/pref.c:1875 ../src/xqf-ui.c:141 msgid "Colors" msgstr "Couleurs" #: ../src/pref.c:1908 msgid "Login name" msgstr "Nom d'utilisateur" #: ../src/pref.c:1950 msgid "Skin/Colors" msgstr "Skin/Couleurs" #: ../src/pref.c:1986 msgid "Team" msgstr "Équipe" #: ../src/pref.c:2044 msgid "Model/Skin" msgstr "Modèle/Skin" #: ../src/pref.c:2131 msgid "--- Anything ---" msgstr "--- N'importe quoi ---" #: ../src/pref.c:2132 msgid "Axe" msgstr "Hache" #: ../src/pref.c:2133 msgid "Shotgun" msgstr "Shotgun" #: ../src/pref.c:2134 msgid "Super Shotgun" msgstr "Super Shotgun" #: ../src/pref.c:2135 msgid "Nailgun" msgstr "Nailgun" #: ../src/pref.c:2136 msgid "Super Nailgun" msgstr "Super Nailgun" #: ../src/pref.c:2137 msgid "Grenade Launcher" msgstr "Lance-grenade" #: ../src/pref.c:2138 msgid "Rocket Launcher" msgstr "Lance-roquette" #: ../src/pref.c:2139 msgid "ThunderBolt" msgstr "ThunderBolt" #: ../src/pref.c:2187 msgid "Use skins" msgstr "Utiliser les skins" #: ../src/pref.c:2193 msgid "Don't use skins" msgstr "Ne pas utiliser les skins" #: ../src/pref.c:2199 msgid "Don't download new skins" msgstr "Ne pas télécharger de nouveaux skins" #: ../src/pref.c:2241 msgid "You must configure a command line first" msgstr "Vous devez d'abord configurer une ligne de commande" #: ../src/pref.c:2283 msgid "Game not found" msgstr "Jeu non trouvé" #. %s name of a game #: ../src/pref.c:2285 #, c-format msgid "%s not found" msgstr "%s n'a pas été trouvé" #: ../src/pref.c:2333 #, c-format msgid "" "An entry already exists for the game %s.\n" "\n" "A default entry for this game will not be added.\n" "\n" "Delete the entry and try again." msgstr "" "Une entrée existe déjà pour le jeu %s.\n" "Une entrée par défaut pour ce jeu ne sera pas ajoutée. \n" "\n" "Effacez l'entrée et réessayez" #: ../src/pref.c:2375 msgid "There are no defaults for this game" msgstr "Il n'y a pas de paramètres par défaut pour ce jeu." #: ../src/pref.c:2436 msgid "" "There is already an entry for this game.\n" "\n" "To modify it, select it from the list, modify it\n" "and then click Add/Update." msgstr "" "Il y a déjà une entrée pour ce jeu. \n" "\n" "Pour la modifier, selectionnez la dans la liste, modifiez la\n" "puis cliquez sur Ajouter/Mettre à jour." #: ../src/pref.c:2440 msgid "You must enter both a game and at least one argument." msgstr "Vous devez entrer un jeu et au moins un argument." #: ../src/pref.c:2539 msgid "Invoking" msgstr "Invocation" #: ../src/pref.c:2546 msgid "*** Not Implemented ***" msgstr "*** Non implémenté ***" #: ../src/pref.c:2558 msgid "Custom Args" msgstr "Arguments personnalisés" #: ../src/pref.c:2570 msgid "Command Line" msgstr "Ligne de commande" #. translator: button for command suggestion #. translator: button for directory guess #: ../src/pref.c:2597 ../src/pref.c:2635 msgid "Suggest" msgstr "Suggérer" #: ../src/pref.c:2603 msgid "Searches the path for the game executable" msgstr "Cherche l'executable du jeu dans le chemin" #. /// #: ../src/pref.c:2610 msgid "Working Directory" msgstr "Répertoire de travail" #: ../src/pref.c:2640 msgid "Tries to guess the working directory based on the command line" msgstr "" "Essaie de deviner le répertoire de travail à partir de la ligne de commande" #: ../src/pref.c:2658 msgid "Custom CFG" msgstr "Configuration personnalisée" #: ../src/pref.c:2763 ../src/xqf-ui.c:102 msgid "Game" msgstr "Jeu" #: ../src/pref.c:2771 msgid "Arguments" msgstr "Arguments" #: ../src/pref.c:2779 msgid "Game and Arguments" msgstr "Le jeu et ses arguments" #: ../src/pref.c:2802 msgid "Enter the game name from the game column" msgstr "Choississez le jeu dans la colonne des jeux" #: ../src/pref.c:2811 msgid "Enter the arguments separated by spaces" msgstr "Entrer les arguments séparés par les espaces" #: ../src/pref.c:2837 msgid "Add Defaults" msgstr "Ajouter les serveurs maîtres par défaut" #: ../src/pref.c:2845 msgid "Add/Update" msgstr "Ajouter/Mettre à jour" #. Common Options #: ../src/pref.c:3000 msgid "Common Options" msgstr "Options générales" #: ../src/pref.c:3011 msgid "Disable CD Audio" msgstr "Désactiver le CD Audio" #. Disable Sound #: ../src/pref.c:3019 msgid "Disable Sound" msgstr "Désactiver le son" #: ../src/pref.c:3043 msgid "Do not set (use game default)" msgstr "Ne pas utiliser (utiliser les options par défaut du jeu)" #: ../src/pref.c:3044 msgid "Automatically calculate from server ping time" msgstr "Calculer automatiquement à partir du ping au serveur" #: ../src/pref.c:3045 msgid "Fixed value" msgstr "Valeur fixe" #: ../src/pref.c:3113 msgid "Masterserver Protocol Version" msgstr "Version du protocole serveur maître" #: ../src/pref.c:3136 msgid "set fs_game on connect" msgstr "Spécifier fs_game lors de la connection" #: ../src/pref.c:3145 msgid "set cl_punkbuster on connect" msgstr "Spécifier cl_punkbuster lors de la connection" #: ../src/pref.c:3154 #, fuzzy msgid "enable console" msgstr "Activer le son" #: ../src/pref.c:3216 msgid "Pass memory settings on command line" msgstr "Passer les options mémoires sur la ligne de commande" #. Mega Byte #: ../src/pref.c:3234 ../src/pref.c:3257 ../src/pref.c:3280 ../src/pref.c:3304 msgid "MB" msgstr "Mo" #: ../src/pref.c:3238 msgid "com_hunkmegs" msgstr "com_hunkmegs" #: ../src/pref.c:3261 msgid "com_zonemegs" msgstr "com_zonemegs" #: ../src/pref.c:3284 msgid "com_soundmegs" msgstr "com_soundmegs" #: ../src/pref.c:3308 msgid "cg_precachedmodels" msgstr "cg_precachedmodels" #: ../src/pref.c:3317 msgid "Preset values" msgstr "Réglages par défaut" #: ../src/pref.c:3324 msgid "Default" msgstr "Par défaut" #: ../src/pref.c:3330 msgid "128MB" msgstr "128 Mo" #: ../src/pref.c:3336 msgid ">256MB" msgstr ">256 Mo" #: ../src/pref.c:3355 ../src/pref.c:3584 ../src/pref.c:3590 msgid "Options" msgstr "Options" #: ../src/pref.c:3358 msgid "Memory" msgstr "Mémoire" #. QW Specific Features #. 'w_switch' & 'b_switch' control #: ../src/pref.c:3387 msgid "The highest weapon that Quake should switch to..." msgstr "La meilleure arme que Quake doit sélectionner..." #: ../src/pref.c:3400 msgid "upon a weapon pickup" msgstr "lors du ramassage d'une arme" #: ../src/pref.c:3418 msgid "upon a backpack pickup" msgstr "lors du ramassage d'un sac à dos" #: ../src/pref.c:3439 msgid "Disable auto-aiming" msgstr "Désactive l'auto-aiming" #: ../src/pref.c:3477 msgid "Skins" msgstr "Skins" #: ../src/pref.c:3499 msgid "Rate" msgstr "Taux" #. 'pushlatency' #: ../src/pref.c:3523 msgid "pushlatency" msgstr "pushlatency" #. Troubleshooting #: ../src/pref.c:3538 msgid "Troubleshooting" msgstr "Dépannage" #: ../src/pref.c:3551 msgid "Disable delta-compression (cl_nodelta)" msgstr "Désactive la delta-compression (cl_nodelta)" #: ../src/pref.c:3565 msgid "Disable player/entity prediction (cl_predict_players)" msgstr "Désactive la prédiction de joueur/entité (cl_predict_players)" #: ../src/pref.c:3583 msgid "Weapons" msgstr "Armes" #: ../src/pref.c:3585 ../src/pref.c:3591 ../src/pref.c:3596 ../src/pref.c:3601 msgid "Player Profile" msgstr "Profil du Joueur" #: ../src/pref.c:3677 msgid "Icons" msgstr "Icônes" #: ../src/pref.c:3677 msgid "Text" msgstr "Texte" #: ../src/pref.c:3677 msgid "Both" msgstr "Icônes et texte" #: ../src/pref.c:3683 msgid "Server List" msgstr "Liste des serveurs" #: ../src/pref.c:3696 msgid "Show host names" msgstr "Montrer le nom des serveurs" #: ../src/pref.c:3701 msgid "Show hostnames instead of IP addresses if possible" msgstr "Montrer le nom des serveurs à la place de l'IP si possible" #: ../src/pref.c:3712 msgid "Show default port" msgstr "Montrer le port par défaut" #: ../src/pref.c:3727 msgid "Do not count bots as players" msgstr "Ne pas compter les bots comme des joueurs" #: ../src/pref.c:3743 msgid "Sort servers real-time during refresh" msgstr "Trier les serveurs en temps réel pendant le rafraichissement" #: ../src/pref.c:3758 msgid "Refresh on update" msgstr "Rafraichir aussi lors d'une mise à jour" #: ../src/pref.c:3774 msgid "Resolve hostnames on update" msgstr "Recherche le nom des serveurs lors du raffraichissement" #: ../src/pref.c:3778 msgid "Enable or disable DNS resolution of IP addresses" msgstr "Active ou désactive la résolution DNS des adresses IP" #: ../src/pref.c:3792 msgid "Show only configured games" msgstr "Montrer seulement les jeux configurés" #: ../src/pref.c:3808 msgid "Use custom color settings" msgstr "" #: ../src/pref.c:3810 msgid "" "Use XQF's color settings instead of the system ones. You need to restart XQF " "for this setting to take effect. Note that you may need to install the gtk-" "engines package." msgstr "" #. Toolbar #: ../src/pref.c:3831 msgid "Toolbar" msgstr "Barre d'outils" #. Toolbar Tips #: ../src/pref.c:3856 msgid "Tooltips" msgstr "Bulles d'aide" #. On Startup #: ../src/pref.c:3899 msgid "On Startup" msgstr "Au Démarrage" #: ../src/pref.c:3912 msgid "Refresh Favorites" msgstr "Actualiser les favoris" #: ../src/pref.c:3925 msgid "Show splash screen" msgstr "Montrez l'image de démarrage" #: ../src/pref.c:3939 msgid "Scan for maps" msgstr "Vérifier les cartes" #: ../src/pref.c:3944 msgid "" "Scan game directories for installed maps. xqf will take longer to start up " "when enabled." msgstr "" "Vérifie, dans les répertoires des jeux, les cartes installées.XQF mettra " "plus de temps pour démarrer si cette option est activée." #: ../src/pref.c:3951 msgid "scan now" msgstr "chercher maintenant" #: ../src/pref.c:3967 msgid "Minimize to system tray" msgstr "" #: ../src/pref.c:3971 msgid "Enable xqf tray icon. You need to restart xqf for this to take effect." msgstr "" #. On Exit #: ../src/pref.c:3984 msgid "On Exit" msgstr "A la Sortie" #: ../src/pref.c:3997 msgid "Save server lists" msgstr "Enregistrer les listes de serveurs" #: ../src/pref.c:4012 msgid "Save server information" msgstr "Enregistrer les informations des serveurs" #: ../src/pref.c:4029 msgid "Save player information" msgstr "Enregistrer les informations des joueurs" #. When launching a Game #: ../src/pref.c:4045 msgid "When launching a game..." msgstr "Quand un jeu est lancé..." #: ../src/pref.c:4059 msgid "Terminate XQF" msgstr "Quitter XQF" #: ../src/pref.c:4074 msgid "Iconify XQF window" msgstr "Icônifier la fenêtre d'XQF" #: ../src/pref.c:4089 msgid "Create LaunchInfo.txt" msgstr "Créer un fichier LaunchInfo.txt" #: ../src/pref.c:4095 msgid "" "Creates the file ~/.qf/LaunchInfo.txt with: ping ip:port name map curplayers " "maxplayers" msgstr "" "Créer le fichier ~/.qf/LaunchInfo.txt avec: ping ip:port nom carte " "curplayers maxplayers" #: ../src/pref.c:4101 msgid "Execute prelaunch" msgstr "Exécuter le fichier Prelaunch" #: ../src/pref.c:4107 msgid "Executes ~/.qf/PreLaunch (if it exists) before launching the game" msgstr "Exécuter ~/.qf/PreLaunch (s'il existe) avant de lancer le jeu" #: ../src/pref.c:4116 msgid "Stop current song in XMMS" msgstr "Arrêter la lecture dans XMMS" #: ../src/pref.c:4119 msgid "" "Stopping XMMS will release /dev/dsp. Activate this option if you use XMMS " "and have a cheap soundcard that allows only one application to open /dev/dsp." msgstr "" "Le fait d'arrêter la lecture dans XMMS libère le périphérique /dev/dsp. Cela " "permettra au jeu de démarrer sans problème. Activez cette option si vous " "utilisez un lecteur de musique (tel qu'XMMS) et que votre périphérique son " "ne supporte qu'une application à la fois (i.e.: la plupart des cartes sons " "bon marché)." #. QStat preferences -- maxsimultaneous & maxretries #: ../src/pref.c:4158 msgid "QStat Options" msgstr "Options de QStat" #. maxsimultaneous #: ../src/pref.c:4169 msgid "Number of simultaneous servers to query" msgstr "Nombre de serveurs à interroger simultanément" #. maxretries #: ../src/pref.c:4193 msgid "Number of retries" msgstr "Nombre de tentatives" #. srcip #: ../src/pref.c:4212 #, fuzzy msgid "Source IP Address" msgstr "Adresse IP :" #: ../src/pref.c:4233 msgid "Source Port Range" msgstr "" #. Translator: sound test button #: ../src/pref.c:4296 msgid "Test" msgstr "Tester" #. Sound Enable / Disable frame #. Sounds Enable / Disable #: ../src/pref.c:4313 msgid "Sound Enable / Disable" msgstr "Gestion des évènements sonores" #: ../src/pref.c:4327 msgid "Enable Sound" msgstr "Activer le son" #. Sound Player #: ../src/pref.c:4338 msgid "Player program" msgstr "Programme lecteur de son" #. Sound Files frame #. Sounds preferences -- player and various sounds #: ../src/pref.c:4366 msgid "Sound Files" msgstr "Évènements sonores" #. Sound XQF Start #: ../src/pref.c:4378 msgid "XQF Start" msgstr "Démarrage d'XQF" #. Sound XQF Quit #: ../src/pref.c:4410 msgid "XQF Quit" msgstr "Sortie d'XQF" #. Sound Update Done #: ../src/pref.c:4442 msgid "Update Done" msgstr "Mise à jour terminée" #. Sound Refresh Done #: ../src/pref.c:4475 msgid "Refresh Done" msgstr "Rafraichissement terminé" #. Sound Stop #: ../src/pref.c:4508 ../src/xqf.c:3071 ../src/trayicon.c:462 msgid "Stop" msgstr "Arrêt" #. Sound Server Connect #: ../src/pref.c:4541 msgid "Server Connect" msgstr "Connection réussie" #. Sound Redial Success Start #: ../src/pref.c:4574 msgid "Redial Success" msgstr "Reconnection réussie" #: ../src/pref.c:4702 msgid "XQF: Preferences" msgstr "XQF : Préférences" #: ../src/pref.c:4722 msgid "General" msgstr "Générales" #: ../src/pref.c:4734 msgid "Games" msgstr "Jeux" #: ../src/pref.c:4739 msgid "Appearance" msgstr "Apparence" #: ../src/pref.c:4744 msgid "QStat" msgstr "QStat" #: ../src/pref.c:4749 msgid "Sounds" msgstr "Évènements sonores" #: ../src/pref.c:4754 msgid "Scripts" msgstr "" #: ../src/pref.c:4895 msgid "Unable to get user name/home/tmpdir" msgstr "" "Impossible de déterminer le nom d'utilisateur, son répertoire ou un " "répertoire temporaire" #. translator: %s = game name, e.g. Quake 3 Arena #: ../src/pref.c:5227 #, c-format msgid "Searching for %s maps" msgstr "Vérification des cartes pour le jeu %s" #: ../src/pref.c:5281 msgid "Game Command Selection" msgstr "Choisissez la commande de lancement du jeu" #: ../src/pref.c:5290 msgid "Game Directory Selection" msgstr "Choisissez le répertoire du jeu" #: ../src/pref.c:5295 msgid "Sound Player Selection" msgstr "Choisissez le lecteur de son" #: ../src/pref.c:5300 msgid "XQF Start Sound Selection" msgstr "Choisissez un son pour le démarrage d'XQF" #: ../src/pref.c:5305 msgid "XQF Quit Sound Selection" msgstr "Choisissez un son pour la sortie d'XQF" #: ../src/pref.c:5310 msgid "Update Done Sound Selection" msgstr "Choisissez un son pour la fin de la mise à jour" #: ../src/pref.c:5315 msgid "Refresh Done Sound Selection" msgstr "Choisissez un son pour la fin du rafraichissement" #: ../src/pref.c:5320 msgid "Stop Sound Selection" msgstr "Choisissez un son pour l'arrêt d'une opération" #: ../src/pref.c:5325 msgid "Server Connect Sound Selection" msgstr "Choisissez un son pour la connection au serveur" #: ../src/pref.c:5330 msgid "Redial Success Sound Selection" msgstr "Choisissez un son pour la reconnection réussie" #: ../src/psearch.c:51 msgid "Exact Match" msgstr "Correspondance exacte" #: ../src/psearch.c:52 msgid "Substring" msgstr "Sous-chaine" #: ../src/psearch.c:53 msgid "Regular Expression" msgstr "Expression régulière" #: ../src/psearch.c:174 msgid "Find Player" msgstr "Trouver un joueur" #. Pattern Entry #: ../src/psearch.c:185 msgid "Find Player:" msgstr "Trouver un joueur :" #: ../src/psearch.c:394 msgid "Player not found." msgstr "Joueur non trouvé." #: ../src/psearch.c:398 msgid "XQF: End of server list reached" msgstr "XQF : Fin de la liste des serveurs atteinte" #: ../src/psearch.c:399 msgid "Continue search from beginning?" msgstr "Continuer la recherche à partir du début ?" #. Message #: ../src/rcon.c:550 msgid "Cmd:" msgstr "Cmd:" #. Send Button #: ../src/rcon.c:577 msgid "Send" msgstr "Envoyer" #. Status Button #: ../src/rcon.c:586 msgid "Status" msgstr "État" #. Clear Button #: ../src/rcon.c:595 msgid "Clear" msgstr "Effacer" #: ../src/rcon.c:617 ../src/statistics.c:849 msgid "Close" msgstr "Fermer" #: ../src/rcon.c:717 #, c-format msgid "Usage: %s [server type] \n" msgstr "Utilisation : %s [type de serveur] \n" #: ../src/rcon.c:718 #, fuzzy, c-format msgid " server type is either --qws, --hws, --hls or --dm3s.\n" msgstr " le type de serveur est soit --qws, soit --hws, soit --hls.\n" #: ../src/rcon.c:719 #, c-format msgid " If no server type is specified, Q3 style rcon is assumed.\n" msgstr "" " Si aucun type de serveur n'est spécifié, un rcon de style Q3 est utilisé.\n" #. translator: readline prompt #: ../src/rcon.c:756 msgid "Password: " msgstr "Mot de passe : " #: ../src/redial.c:123 #, c-format msgid "" "Waiting for free slots on\n" "%s" msgstr "" "En attente de places libres sur\n" "%s" #: ../src/redial.c:125 #, c-format msgid "" "Refreshing\n" "%s" msgstr "" "Rafraichissement en cours\n" "%s" #. * window code modified from glade #: ../src/redial.c:179 ../src/redial.c:184 msgid "XQF: Redialing" msgstr "XQF: Reconnection en cours" #: ../src/redial.c:196 msgid "" "***\n" "***" msgstr "" "***\n" "***" #: ../src/redial.c:219 msgid "Launch now" msgstr "Lancer maintenant" #: ../src/source.c:66 msgid "Standard" msgstr "Standard" #: ../src/source.c:67 msgid "Gamespy" msgstr "Gamespy" #: ../src/source.c:68 msgid "http" msgstr "http" #: ../src/source.c:70 msgid "File" msgstr "Fichier" #: ../src/source.c:122 msgid "Retry" msgstr "Nouvelle tentative" #: ../src/source.c:122 msgid "Skip" msgstr "Passer" #: ../src/source.c:123 #, c-format msgid "" "Cannot write to file %s\n" "System Error: %s\n" msgstr "" "Impossible d'écrire dans le fichier %s\n" "Erreur Système: %s\n" #. translator: %s == url, eg gmaster://bla.blub.org #: ../src/source.c:891 #, c-format msgid "You have to specify a port number for %s." msgstr "Vous devez spécifier un numéro de port pour %s." #: ../src/source.c:905 #, c-format msgid "'gsmtype' options missing for master %s." msgstr "" #: ../src/source.c:1439 msgid "Favorites" msgstr "Favoris" #: ../src/srv-prop.c:423 msgid "IP Address:" msgstr "Adresse IP :" #: ../src/srv-prop.c:433 msgid "Port:" msgstr "Port :" #: ../src/srv-prop.c:447 msgid "Host Name:" msgstr "Nom du serveur :" #: ../src/srv-prop.c:461 msgid "Country:" msgstr "Pays :" #: ../src/srv-prop.c:489 msgid "Refreshed:" msgstr "Actualisé :" #. translator: last time and date the server answered the query #: ../src/srv-prop.c:507 msgid "Last answer:" msgstr "Dernière réponse :" #: ../src/srv-prop.c:564 msgid "Reserved Slots:" msgstr "Places réservées :" #. Sources #: ../src/srv-prop.c:583 msgid "Sources" msgstr "Sources" #: ../src/srv-prop.c:635 msgid "Custom CFG:" msgstr "Configuration personnalisée :" #: ../src/srv-prop.c:684 msgid "Server Password" msgstr "Mot de passe serveur" #: ../src/srv-prop.c:690 msgid "Spectator Password" msgstr "Mot de passe spectateur" #: ../src/srv-prop.c:697 #, fuzzy msgid "RCon/Admin Password" msgstr "Mot de passe RCon" #: ../src/srv-prop.c:728 msgid "This server sucks" msgstr "" #: ../src/srv-prop.c:771 ../src/xqf.c:2603 ../src/xqf.c:2741 msgid "Properties" msgstr "_Propriétés" #: ../src/srv-prop.c:816 msgid "Info" msgstr "Info" #: ../src/srv-prop.c:821 msgid "Passwords" msgstr "Mots de passe" #: ../src/srv-prop.c:826 #, fuzzy msgid "Comment" msgstr "Commentaire pour le modèle" #: ../src/stat.c:728 msgid "Allies" msgstr "Alliés" #: ../src/stat.c:728 msgid "Axis" msgstr "Axe" #: ../src/stat.c:734 msgid "Red" msgstr "Rouge" #: ../src/stat.c:734 msgid "Blue" msgstr "Bleu" #: ../src/stat.c:1376 #, c-format msgid "" "UT2004 CD Key not found, cannot query master '%s'.\n" "Make sure the working directory is set correctly." msgstr "" #: ../src/stat.c:1559 #, fuzzy, c-format msgid "Failed to create a temporary file %s: %s" msgstr "Échec de la création du fichier temporaire %s" #. The space behind up and down is to make the strings different from #. those in flt-player.c because their meaning is different in german #: ../src/statistics.c:82 ../src/statistics.c:93 msgid "Servers" msgstr "Serveurs" #: ../src/statistics.c:82 msgid "Up " msgstr "Vers le haut " #: ../src/statistics.c:82 msgid "Timeout" msgstr "Pause" #: ../src/statistics.c:82 msgid "Down " msgstr "Vers le bas " #: ../src/statistics.c:82 msgid "Info n/a" msgstr "Info non disponible" #: ../src/statistics.c:82 ../src/statistics.c:504 ../src/xqf-ui.c:88 msgid "Players" msgstr "Joueurs" #: ../src/statistics.c:86 ../src/statistics.c:90 msgid "unknown" msgstr "inconnu" #: ../src/statistics.c:94 msgid "OS/CPU" msgstr "OS/CPU" #: ../src/statistics.c:95 ../src/xqf-ui.c:65 #, fuzzy msgid "Country" msgstr "Pays :" #: ../src/statistics.c:450 ../src/statistics.c:498 ../src/statistics.c:503 msgid "Total" msgstr "Total" #: ../src/statistics.c:493 msgid "CPU \\ OS" msgstr "CPU \\ OS" #: ../src/statistics.c:721 #, fuzzy msgid "All Games" msgstr "Jeux" #: ../src/statistics.c:803 ../src/statistics.c:812 msgid "Statistics" msgstr "Statistiques" #. error converting time to string representation, shouldn't happen #: ../src/utils.c:903 msgid "" msgstr "" #: ../src/utils.c:1126 msgid "Can't open source file for reading" msgstr "" #: ../src/utils.c:1133 msgid "Can't open destination file for writing" msgstr "" #: ../src/utils.c:1141 msgid "write error on destination file" msgstr "" #: ../src/utils.c:1148 msgid "read error on source file" msgstr "" #: ../src/xqf-ui.c:58 #, fuzzy msgid "Type" msgstr "Type de jeu" #: ../src/xqf-ui.c:61 msgid "Address" msgstr "Adresse" #: ../src/xqf-ui.c:68 ../src/xqf-ui.c:153 msgid "Ping" msgstr "Ping" #: ../src/xqf-ui.c:74 msgid "TO" msgstr "À" #: ../src/xqf-ui.c:80 msgid "Priv" msgstr "Priv" #. Translator: "PunkBuster" #: ../src/xqf-ui.c:85 msgid "PB" msgstr "" #. Translator: Max as in max players #: ../src/xqf-ui.c:93 #, fuzzy msgid "Max" msgstr "Carte" #: ../src/xqf-ui.c:96 msgid "Map" msgstr "Carte" #: ../src/xqf-ui.c:108 msgid "GameType" msgstr "Type de jeu" #: ../src/xqf-ui.c:135 msgid "Frags" msgstr "Frags" #: ../src/xqf-ui.c:147 msgid "Skin" msgstr "Skin" #: ../src/xqf-ui.c:159 msgid "Time" msgstr "Temps" #: ../src/xqf-ui.c:179 msgid "Rule" msgstr "Règle" #: ../src/xqf-ui.c:185 msgid "Value" msgstr "Valeur" #: ../src/xqf-ui.c:575 msgid "Source" msgstr "Source" #: ../src/xqf.c:349 #, c-format msgid "%d server" msgstr "serveur %d" #: ../src/xqf.c:349 #, c-format msgid "%d servers" msgstr "serveurs %d" #. server filter #: ../src/xqf.c:597 #, c-format msgid "None <--" msgstr "Aucun <--" #: ../src/xqf.c:599 ../src/xqf.c:3201 ../src/xqf.c:3258 ../src/xqf.c:3403 #, c-format msgid "None" msgstr "Aucun" #: ../src/xqf.c:613 #, c-format msgid "Filter %d <--" msgstr "Filtre %d <--" #: ../src/xqf.c:615 #, c-format msgid "Filter %d" msgstr "Filtre %d" #: ../src/xqf.c:637 #, c-format msgid "No Server Filter Active" msgstr "Aucun Filtre Serveur Actif" #: ../src/xqf.c:644 #, c-format msgid "Server Filter: %s" msgstr "Filtre serveur: %s" #: ../src/xqf.c:648 #, c-format msgid "Server Filter: %d" msgstr "Filtre serveur: %d" #: ../src/xqf.c:815 msgid "Updating lists..." msgstr "Mise à jour des listes en cours... " #: ../src/xqf.c:821 #, c-format msgid "Resolving host names: %d/%d" msgstr "Résolution des noms d'hôte: %d/%d" #: ../src/xqf.c:825 #, c-format msgid "Refreshing: %d/%d" msgstr "Actualisation: %d/%d" #: ../src/xqf.c:831 #, c-format msgid "Resolving host addresses: %d/%d" msgstr "Résolution des adresses des hôtes: %d/%d" #: ../src/xqf.c:958 msgid "" "You said this servers sucks.\n" "Do you want to risk a game this time?" msgstr "" #: ../src/xqf.c:970 #, c-format msgid "" "This server is not compatible with the version of %s you have installed.\n" "Launch client anyway?" msgstr "" #: ../src/xqf.c:982 #, c-format msgid "" "Server %s:%d is %s.\n" "\n" "Launch client anyway?" msgstr "" "Le Serveur %s:%d est %s.\n" "\n" "Lancer le client quand même?" #: ../src/xqf.c:995 #, c-format msgid "" "Server %s:%d is full.\n" "\n" "Launch client anyway?" msgstr "" "Le Serveur %s:%d est plein. \n" "\n" "Lancer le client quand même?" #: ../src/xqf.c:1108 ../src/xqf.c:1128 ../src/xqf.c:2003 msgid "Save Password" msgstr "Enregistrer le mot de passe" #: ../src/xqf.c:1108 msgid "Spectator Password:" msgstr "Mot de passe spectateur :" #: ../src/xqf.c:1128 ../src/xqf.c:2003 msgid "Server Password:" msgstr "Mot de passe serveur :" #: ../src/xqf.c:1279 msgid "Spectator" msgstr "Spectateur" #: ../src/xqf.c:1280 ../src/xqf.c:1283 msgid "Demo name:" msgstr "Nom de la demo:" #: ../src/xqf.c:1525 #, c-format msgid "Host %s not found" msgstr "Hôte %s non trouvé" #: ../src/xqf.c:1545 ../src/xqf.c:3815 #, c-format msgid "\"%s\" is not valid host[:port] combination." msgstr "\"%s\" n'est pas une combinaison hôte[:port] valide" #: ../src/xqf.c:1646 #, fuzzy msgid "Remove selected servers from all lists?" msgstr "Actualiser les serveurs sélectionnés" #. translator: %s == url #: ../src/xqf.c:1791 #, c-format msgid "" "For Gslist support you must install the 'gslist' program available from\n" "%s\n" "Don't forget that you need to run 'gslist -u' before you can use it." msgstr "" #: ../src/xqf.c:1862 msgid "You have to select the server you want to delete" msgstr "Vous devez choisir le serveur que vous voulez effacer" #: ../src/xqf.c:1868 #, c-format msgid "" "Master%s to delete:\n" "\n" "%s" msgstr "" "Maître %s à effacer:\n" "\n" "%s" #: ../src/xqf.c:1891 #, c-format msgid "Find Player: %s" msgstr "Joueur trouvé: %s" #: ../src/xqf.c:1983 msgid "Done." msgstr "Terminé." #: ../src/xqf.c:2525 ../src/xqf.c:3081 msgid "Connect" msgstr "Connection" #: ../src/xqf.c:2530 ../src/xqf.c:3090 msgid "Observe" msgstr "Observer" #: ../src/xqf.c:2535 ../src/xqf.c:3098 msgid "Record Demo" msgstr "Enregistrer une démo" #: ../src/xqf.c:2549 msgid "Add new Server" msgstr "Ajouter un nouveau serveur" #: ../src/xqf.c:2554 msgid "Add to Favorites" msgstr "Ajouter aux Favoris" #: ../src/xqf.c:2559 #, fuzzy msgid "Remove" msgstr "Renommer" #: ../src/xqf.c:2564 ../src/xqf.c:2613 msgid "Copy" msgstr "Copier" #: ../src/xqf.c:2569 msgid "Copy+" msgstr "Copier+" #: ../src/xqf.c:2577 ../src/xqf.c:3055 ../src/trayicon.c:452 msgid "Refresh" msgstr "Actualiser" #: ../src/xqf.c:2582 msgid "Refresh Selected" msgstr "Actualiser la _sélection" #: ../src/xqf.c:2590 msgid "DNS Lookup" msgstr "Recherche DNS" #: ../src/xqf.c:2598 msgid "RCon" msgstr "RCon" #: ../src/xqf.c:2621 msgid "_Statistics" msgstr "_Statistiques" #: ../src/xqf.c:2629 msgid "_Exit" msgstr "Quitter" #: ../src/xqf.c:2640 ../src/xqf.c:2705 msgid "Add _Master" msgstr "Ajouter un serveur _maître" #: ../src/xqf.c:2645 ../src/xqf.c:2710 msgid "_Rename Master" msgstr "_Renommer le serveur maître" #: ../src/xqf.c:2650 ../src/xqf.c:2715 msgid "D_elete Master" msgstr "_Effacer le serveur maître" #: ../src/xqf.c:2655 ../src/xqf.c:2720 #, fuzzy msgid "_Clear Servers" msgstr "Serveurs" #: ../src/xqf.c:2665 ../src/xqf.c:2825 msgid "_Add new Server" msgstr "_Ajouter un nouveau serveur" #: ../src/xqf.c:2670 ../src/xqf.c:2830 msgid "Add to _Favorites" msgstr "Ajouter aux _favoris" #: ../src/xqf.c:2675 ../src/xqf.c:2835 #, fuzzy msgid "_Remove" msgstr "Renommer" #: ../src/xqf.c:2680 msgid "_Copy" msgstr "_Copier" #: ../src/xqf.c:2685 msgid "_Copy+" msgstr "C_opier+" #: ../src/xqf.c:2693 msgid "Add Default Masters" msgstr "Ajouter les serveurs maîtres par défaut" #: ../src/xqf.c:2699 #, fuzzy msgid "Add Gslist Masters" msgstr "Ajouter les serveurs maîtres par défaut" #: ../src/xqf.c:2728 msgid "_Find Player" msgstr "Chercher un _joueur" #: ../src/xqf.c:2733 msgid "Find A_gain" msgstr "Chercher de _nouveau" #: ../src/xqf.c:2751 msgid "_Refresh" msgstr "_Actualiser" #: ../src/xqf.c:2756 msgid "Refresh _Selected" msgstr "Actualiser la _sélection" #: ../src/xqf.c:2761 msgid "_Update From Master" msgstr "Mise à jour à partir du serveur _maître" #: ../src/xqf.c:2769 msgid "Show _Host Names" msgstr "Afficher les _noms de serveur" #: ../src/xqf.c:2774 msgid "Show Default _Port" msgstr "Afficher le _port par défaut" #: ../src/xqf.c:2800 msgid "_Connect" msgstr "Se _connecter" #: ../src/xqf.c:2805 msgid "_Observe" msgstr "_Observer" #: ../src/xqf.c:2810 msgid "Record _Demo" msgstr "Enregistrer _Démo" #: ../src/xqf.c:2841 msgid "DNS _Lookup" msgstr "Recherche D_NS" #: ../src/xqf.c:2849 msgid "_RCon" msgstr "_RCon" #: ../src/xqf.c:2854 msgid "_Properties" msgstr "_Propriétés" #: ../src/xqf.c:2864 msgid "_General" msgstr "_Générales" #: ../src/xqf.c:2870 msgid "_Games" msgstr "_Jeux" #: ../src/xqf.c:2876 msgid "_Appearance" msgstr "_Apparence" #: ../src/xqf.c:2882 #, fuzzy msgid "_QStat" msgstr "QStat" #: ../src/xqf.c:2888 #, fuzzy msgid "_Sounds" msgstr "Évènements sonores" #: ../src/xqf.c:2894 msgid "S_cripts" msgstr "" #: ../src/xqf.c:2904 msgid "_Server Filter" msgstr "_Filtre serveur" #: ../src/xqf.c:2909 msgid "Player _Filter" msgstr "F_iltre joueur" #: ../src/xqf.c:2919 msgid "_About" msgstr "A propos de" #: ../src/xqf.c:2930 msgid "_File" msgstr "_Fichier" #: ../src/xqf.c:2935 msgid "_Edit" msgstr "_Edition" #: ../src/xqf.c:2940 msgid "_View" msgstr "_Vue" #: ../src/xqf.c:2945 msgid "_Server" msgstr "_Serveur" #: ../src/xqf.c:2950 msgid "_Preferences" msgstr "_Préférences" #: ../src/xqf.c:2956 msgid "_Server Filters" msgstr "F_iltres serveur" #: ../src/xqf.c:2962 msgid "_Help" msgstr "Aide" #: ../src/xqf.c:3005 msgid "Mark as Red" msgstr "Marquer Comme Rouge" #: ../src/xqf.c:3012 msgid "Mark as Green" msgstr "Marquer Comme Vert" #: ../src/xqf.c:3019 msgid "Mark as Blue" msgstr "Marquer Comme Bleu" #: ../src/xqf.c:3026 msgid "Add to Player Filter" msgstr "Ajouter au Filtre Joueur" #: ../src/xqf.c:3047 ../src/trayicon.c:457 msgid "Update" msgstr "Mise à jour" #: ../src/xqf.c:3047 msgid "Update from master" msgstr "Mise à jour à partir du serveur maître" #: ../src/xqf.c:3055 msgid "Refresh current list" msgstr "Actualiser la liste actuelle" #: ../src/xqf.c:3063 msgid "Ref.Sel." msgstr "Ref.Sel." #: ../src/xqf.c:3063 msgid "Refresh selected servers" msgstr "Actualiser les serveurs sélectionnés" #: ../src/xqf.c:3098 msgid "Record" msgstr "Enregistrer" #. Translators: e.g. Server Filter #: ../src/xqf.c:3116 #, c-format msgid "%s Filter Enable / Disable" msgstr "Filtre %s Activé / Désactivé" #. Translators: e.g. Server Filter Configuration #: ../src/xqf.c:3138 #, c-format msgid "%s Filter Configuration" msgstr "Configuration du Filtre %s" #: ../src/xqf.c:3240 msgid "Configure" msgstr "Configurer" #: ../src/xqf.c:3383 msgid "Filters" msgstr "Filtres" #: ../src/xqf.c:3552 #, fuzzy msgid "Quick Filter:" msgstr "Filtre serveur" #: ../src/xqf.c:3729 #, fuzzy msgid "no sound player configured" msgstr "Montrer seulement les jeux configurés" #: ../src/xqf.c:3767 #, fuzzy msgid "" "Usage:\n" "\txqf [OPTIONS]\n" "\n" "OPTIONS:\n" "\t--launch \"[SERVERTYPE] IP\"\tlaunch game on specified server\n" "\t--add \"[SERVERTYPE] IP\"\tadd specified server to favorites\n" "\t--debug \t\t\tset debug level\n" "\t--version\t\t\tprint version and exit\n" msgstr "" "Utilisation :\n" "\txqf [OPTIONS]\n" "\n" "OPTIONS :\n" "\t--launch \"TYPE_DE_SERVEUR IP\"\tLance directement un jeu sur le serveur " "spécifié.\n" "\t--debug \t\t\tActive les messages de debug au niveau spécifié.\n" "\t--version\t\t\tAffiche la version et quitte.\n" #: ../src/xqf.c:4019 msgid "Reading server lists" msgstr "Lecture des listes de serveur" #: ../src/xqf.c:4036 #, c-format msgid "You need at least qstat version %s for xqf to function properly" msgstr "" "Vous avez besoin au moins de la version %s de qstat pour que xqf fonctionne " "convenablement" #: ../src/xqf.c:4040 #, fuzzy msgid "Loading icons ..." msgstr "Chargement" #: ../src/xqf.c:4046 msgid "Starting ..." msgstr "Démarrage... " #: ../src/splash.c:61 msgid "XQF: Loading" msgstr "XQF: Chargement" #: ../src/splash.c:90 msgid "Loading ..." msgstr "Chargement" #. translator: %s = file name #: ../src/country-filter.c:220 ../src/loadpixmap.c:213 ../src/loadpixmap.c:226 #: ../src/loadpixmap.c:245 ../src/loadpixmap.c:257 #, c-format msgid "Error loading pixmap file: %s" msgstr "" #: ../src/trayicon.c:376 ../src/trayicon.c:382 ../src/trayicon.c:390 #: ../src/trayicon.c:396 ../src/trayicon.c:410 #, c-format msgid "Error in file: %s line: %d\n" msgstr "" #. translator: show main window #: ../src/trayicon.c:473 msgid "Show" msgstr "" #. translator: hide main window #: ../src/trayicon.c:479 msgid "Hide" msgstr "" #: ../src/trayicon.c:484 #, fuzzy msgid "Exit" msgstr "Quitter" #~ msgid "Generic Gamespy" #~ msgstr "Gamespy Générique" #~ msgid "" #~ "Note: You need to create a qstat config file for this game to work.\n" #~ "Please see the XQF documentation for more information." #~ msgstr "" #~ "Note: Vous devez créer un fichier de configuration pour \n" #~ "qstat pour que ce jeu puisse fonctionner.\n" #~ "Consultez la documentation de XQF pour plus d'informations." #~ msgid "Guess" #~ msgstr "Deviner" #~ msgid "vm_cgame fix" #~ msgstr "Correctif vm_cgame" #~ msgid "Rocketarena fix" #~ msgstr "Correctif Rocketarena" #~ msgid "QuakeForge workaround (uses base/ instead of id1/)" #~ msgstr "Correctif QuakeForge (utiliser base/ au lieu de id1/)" #~ msgid "OS" #~ msgstr "OS" #~ msgid "Remove from Favorites" #~ msgstr "Enlever des Favoris" #~ msgid "_Remove from Favorites" #~ msgstr "Enle_ver des favoris" #~ msgid "_QStat Options" #~ msgstr "Options de _QStat" #~ msgid "_Sound Options" #~ msgstr "Évènements _sonores" #~ msgid "X11 Quake/QuakeWorld/Quake2/Quake3 Front-End\n" #~ msgstr "X11 Quake/QuakeWorld/Quake2/Quake3 interface\n" #~ msgid "" #~ "http://www.linuxgames.com/xqf\n" #~ "http://sourceforge.net/projects/xqf\n" #~ "\n" #~ msgstr "" #~ "http://www.linuxgames.com/xqf\n" #~ "http://sourceforge.net/projects/xqf\n" #~ "\n" #~ msgid "" #~ "Significant Contributors:\n" #~ "\n" #~ "Bill Adams \n" #~ "Alex Burger \n" #~ "Jordi Mallach \n" #~ "Ludwig Nussel \n" #~ "\n" #~ msgstr "" #~ "Contributeurs importants:\n" #~ "\n" #~ "Bill Adams \n" #~ "Alex Burger \n" #~ "Jordi Mallach \n" #~ "Ludwig Nussel \n" #~ "\n" #~ msgid "" #~ "Other Contributors:\n" #~ "\n" #~ "Jochen Baier \n" #~ "\n" #~ msgstr "" #~ "Autres Contributeurs: \n" #~ "\n" #~ "Jochen Baier \n" #~ msgid "" #~ "Bug reports:\n" #~ "\n" #~ "http://sourceforge.net/projects/xqf\n" #~ "\n" #~ msgstr "" #~ "Rapport de bug: \n" #~ "\n" #~ "http://sourceforge.net/projects/xqf\n" #~ "\n" #~ msgid "" #~ "Feature requests:\n" #~ "\n" #~ "http://www.linuxgames.com/xqf Forums section\n" #~ msgstr "" #~ "Demandes de fonctionnalités\n" #~ "\n" #~ "http://www.linuxgames.com/xqf Forums section\n" xqf-1.0.5/po/pl.po0000644002404400000620000013121110523105071010612 00000000000000# Translation of pl.po to Polish # Copyright (C) 2006 Free Software Foundation, Inc. # This file is distributed under the same license as the package XQF. # Miłosz Kosobucki , 2006. # msgid "" msgstr "" "Project-Id-Version: pl\n" "Report-Msgid-Bugs-To: xqf-developer@lists.sourceforge.net\n" "POT-Creation-Date: 2006-10-28 20:37+0200\n" "PO-Revision-Date: 2006-07-06 09:53+0100\n" "Last-Translator: Miłosz Kosobucki \n" "Language-Team: Polish \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Poedit 1.3.4\n" #: ../xqf.desktop.in.h:1 #, fuzzy msgid "Game Server Browser" msgstr "Wyszukiwarka serwerów XQF" #: ../xqf.desktop.in.h:2 msgid "Locate and connect to game servers" msgstr "Znajdź serwery i połącz się" #: ../xqf.desktop.in.h:3 ../src/dialogs.c:492 msgid "XQF Game Server Browser" msgstr "Wyszukiwarka serwerów XQF" #: ../src/addmaster.c:111 msgid "You have to specify a name and an address." msgstr "Musisz podać nazwę i adres." #: ../src/addmaster.c:118 #, c-format msgid "Master address \"%s\" is not valid." msgstr "Adres Serwera Źródłowego \"%s\" jest niepoprawny." #: ../src/addmaster.c:174 ../src/source.c:69 msgid "LAN" msgstr "LAN" #: ../src/addmaster.c:245 msgid "Rename Master" msgstr "Zmień nazwę Serwera Źródłowego" #: ../src/addmaster.c:249 msgid "Add Master" msgstr "Dodaj Serwer Źródłowy" #. Master Name (Description) #: ../src/addmaster.c:263 msgid "Master Name" msgstr "Nazwa Serwera Źródłowego" #. Master Address #: ../src/addmaster.c:319 msgid "Master Address" msgstr "Adres Serwera Źródłowego" #. Cancel Button #: ../src/addmaster.c:409 ../src/addserver.c:152 ../src/dialogs.c:421 #: ../src/filter.c:1619 ../src/filter.c:2122 ../src/game.c:1819 #: ../src/launch.c:339 ../src/pref.c:4784 ../src/psearch.c:224 #: ../src/redial.c:227 ../src/srv-prop.c:841 ../src/xqf.c:981 ../src/xqf.c:994 #: ../src/xqf.c:1867 msgid "Cancel" msgstr "Anuluj" #: ../src/addserver.c:91 ../src/addserver.c:188 msgid "Add Server" msgstr "Dodaj serwer" #. Server Entry #: ../src/addserver.c:102 msgid "Server:" msgstr "Serwer:" #: ../src/dialogs.c:124 ../src/dialogs.c:199 ../src/dialogs.c:279 msgid "XQF: Warning!" msgstr "XQF: Uwaga!" #. OK Button #. gtk_button_box_set_child_size(GTK_BUTTON_BOX(hbuttonbox1), 79, 38); #. OK Button #: ../src/dialogs.c:149 ../src/dialogs.c:410 ../src/dialogs.c:600 #: ../src/filter.c:1630 ../src/filter.c:2110 ../src/pref.c:4792 #: ../src/psearch.c:213 ../src/srv-prop.c:849 msgid "OK" msgstr "OK" #: ../src/dialogs.c:224 ../src/dialogs.c:304 ../src/filter.c:1050 #: ../src/psearch.c:398 ../src/xqf.c:957 ../src/xqf.c:969 ../src/xqf.c:1645 msgid "Yes" msgstr "Tak" #: ../src/dialogs.c:236 ../src/dialogs.c:316 ../src/filter.c:1051 #: ../src/psearch.c:398 ../src/xqf.c:957 ../src/xqf.c:969 ../src/xqf.c:1645 msgid "No" msgstr "Nie" #: ../src/dialogs.c:326 ../src/xqf.c:994 msgid "Redial" msgstr "Ponawiaj" #: ../src/dialogs.c:493 #, c-format msgid "Version %s" msgstr "Wersja %s" #. translators can use the copyright symbol instead of (C) #: ../src/dialogs.c:496 msgid "Copyright (C) 1998-2002 Roman Pozlevich" msgstr "Copyright © 1998-2002 Roman Pozlevich" #: ../src/dialogs.c:499 msgid "Maintainers:" msgstr "Twórcy:" #: ../src/dialogs.c:505 msgid "Contributors:" msgstr "Współtwórcy:" #: ../src/dialogs.c:509 msgid "Bug reports and feature requests:" msgstr "Zgłaszanie błędów i propozycji:" #: ../src/dialogs.c:556 msgid "About XQF" msgstr "O programie" #: ../src/dialogs.c:583 msgid "[placeholder, do not translate]" msgstr "[placeholder, do not translate]" #: ../src/filter.c:97 msgid "Server" msgstr "Serwer" #: ../src/filter.c:98 msgid "S Filter" msgstr "Filtr S" #: ../src/filter.c:99 msgid "SF Cfg" msgstr "Konf. FS" #: ../src/filter.c:111 msgid "Player" msgstr "Gracz" #: ../src/filter.c:112 msgid "P Filter" msgstr "Filtr Gr" #: ../src/filter.c:113 msgid "PF Cfg" msgstr "Konf. FGr" #: ../src/filter.c:1011 msgid "Enter filter name" msgstr "Podaj nazwę filtra" #: ../src/filter.c:1049 msgid "Delete server filter" msgstr "Usuń filtr serwera" #: ../src/filter.c:1052 #, c-format msgid "Really delete server filter \"%s\"?" msgstr "Czy chcesz usunąć filtr serwera \"%s\" ?" #: ../src/filter.c:1257 msgid "Server Filter" msgstr "Filtr Serwera" #: ../src/filter.c:1271 ../src/flt-player.c:821 ../src/pref.c:2821 msgid "New" msgstr "Nowy" #: ../src/filter.c:1278 msgid "Rename" msgstr "Zm. naz." #. FIXME: plural #: ../src/filter.c:1285 ../src/flt-player.c:827 ../src/pref.c:2829 #: ../src/xqf.c:1867 msgid "Delete" msgstr "Usuń" #: ../src/filter.c:1292 msgid "Server would pass filter if" msgstr "Serwer pasuje do wzoru jeśli" #. row=0..1 #. max ping #: ../src/filter.c:1313 msgid "ping is less than" msgstr "ping mniejszy niż" #. GAMECONTAINS Filter -- baa #. http://developer.gnome.org/doc/API/gtk/gtktable.html #: ../src/filter.c:1334 msgid "the game contains the string" msgstr "gra zawiera ciąg" #. row=1..2 #. max timeouts #: ../src/filter.c:1352 msgid "the number of retries is fewer than" msgstr "ilość ponowień jest mniejsza niż" #. GAMETYPE Filter -- baa #. http://developer.gnome.org/doc/API/gtk/gtktable.html #: ../src/filter.c:1371 msgid "the game type contains the string" msgstr "typ gry zawiera ciąg" #. row=2..3 #. not full #: ../src/filter.c:1388 msgid "it is not full" msgstr "nie jest pełny" #. Version Filter -- baa #: ../src/filter.c:1395 msgid "the version contains the string" msgstr "wersja zawiera ciąg" #: ../src/filter.c:1414 msgid "it is not empty" msgstr "nie jest pusty" #. Map filter #: ../src/filter.c:1423 msgid "the map contains the string" msgstr "mapa zawiera ciąg" #: ../src/filter.c:1441 msgid "cheats are not allowed" msgstr "oszustwa nie są dozwolone" #. Server name filter #: ../src/filter.c:1450 msgid "the server name contains the string" msgstr "nazwa serwera zawiera ciąg" #: ../src/filter.c:1468 msgid "no password required" msgstr "bez hasła" #: ../src/filter.c:1479 ../src/filter.c:1958 msgid "Country filter:" msgstr "Filtr krajów:" #: ../src/filter.c:1520 msgid "select..." msgstr "wybierz..." #: ../src/filter.c:1533 msgid "clear" msgstr "czysty" #: ../src/filter.c:1591 msgid "XQF: Filters" msgstr "XQF: Filtry" #. window caption for country filter #: ../src/filter.c:1949 msgid "Configure Country Filter" msgstr "Ustaw filtr krajów" #: ../src/filter.c:2091 msgid "Show all countries" msgstr "Pokazuj wszystkie kraje" #: ../src/flt-player.c:69 ../src/flt-player.c:75 msgid "string" msgstr "ciąg" #: ../src/flt-player.c:70 msgid "substr" msgstr "podciąg" #: ../src/flt-player.c:71 msgid "regexp" msgstr "wyrażenie regularne" #: ../src/flt-player.c:76 msgid "substring" msgstr "podciąg" #: ../src/flt-player.c:77 msgid "regular expression" msgstr "Wyrażenie regularne" #: ../src/flt-player.c:448 ../src/psearch.c:116 msgid "XQF: Error" msgstr "XQF: Błąd" #: ../src/flt-player.c:448 ../src/psearch.c:117 #, c-format msgid "" "Regular Expression Error!\n" "\n" "%s\n" "\n" "%s." msgstr "" "Błąd Wyrażenia Regularnego!\n" "\n" "%s\n" "\n" "%s." #. Pattern Entry #: ../src/flt-player.c:666 ../src/flt-player.c:754 msgid "Pattern" msgstr "Wzór" #. Comment #: ../src/flt-player.c:701 msgid "Pattern Comment" msgstr "Komentarz" #: ../src/flt-player.c:754 msgid "Mode" msgstr "Tryb" #: ../src/flt-player.c:760 msgid "Player Filter" msgstr "Filtr Gracza" #: ../src/flt-player.c:839 msgid "Up" msgstr "W górę" #: ../src/flt-player.c:845 msgid "Down" msgstr "W dół" #: ../src/game.c:212 msgid "" "Note: Soldier of Fortune will not connect to a server correctly\n" "without creating a startup script for the game. Please see the\n" "XQF documentation for more information." msgstr "" "Uwaga: Solider of Fortune nie połączy się prawidłowo z serwerem\n" "bez stworzenia skryptu startowego. Więcej informacji znajdziesz\n" "w dokumentacji XQF." #: ../src/game.c:216 msgid "" "Note: Unreal Tournament will not launch correctly without\n" "modifications to the game's startup script. Please see the\n" "XQF documentation for more information." msgstr "" "Uwaga: Unreal Tournament uruchomi się prawidłowo bez\n" "modyfikacji w skrypcie startowym gry. Więcej informacji znajdziesz\n" "w dokumentacji XQF." #: ../src/game.c:220 msgid "Sample Command Line: wine hl.exe -- hl.exe -console" msgstr "Przykładowe wywołanie konsoli: wine hl.exe -- hl.exe -console" #: ../src/game.c:223 msgid "" "Note: Savage will not launch correctly without\n" "modifications to the game's startup script. Please see the\n" "XQF documentation for more information." msgstr "" "Uwaga: Savage nie uruchomi się prawidłowo bez\n" "modyfikacji w skrypcie startowym gry. Więcej informacji znajdziesz\n" "w dokumentacji XQF." #. %s = game name e.g. QuakeWorld #: ../src/game.c:1691 #, c-format msgid "%s command line is empty." msgstr "Linia poleceń %s jest pusta." #. directory name, game name #. %s directory, game name #: ../src/game.c:1698 ../src/game.c:1807 #, c-format msgid "" "\"%s\" is not a directory\n" "Please specify correct %s working directory." msgstr "" "\"%s\" nie jest katalogiem.\n" "Podaj prawidłowy katalog %s." #. game name #: ../src/game.c:1710 #, c-format msgid "Please specify correct %s working directory." msgstr "Podaj prawidłowy katalog %s." #. directory, subdirectory, game name #: ../src/game.c:1716 #, c-format msgid "" "Directory \"%s\" doesn't contain \"%s\" subdirectory.\n" "Please specify correct %s working directory." msgstr "" "Katalog \"%s\" nie zawiera podkatalogu \"%s\".\n" "Podaj prawidłowy katalog %s." #. %s Quake3 #: ../src/game.c:1773 #, c-format msgid "" "~/.q3a directory doesn't exist or doesn't contain\n" "\"baseq3\" (\"demoq3\") subdirectory.\n" "Please run %s client at least once before running XQF\n" "or specify correct %s working directory." msgstr "" "Katalog ~/.q3a nie istnieje lub\n" "nie zawiera podkatalogów \"baseq3\" (\"demoq3\")\n" "Uruchom %s przynajmniej raz przed uruchomieniem XQF,\n" "lub podaj prawidłowy katalog %s." #. %s directory, Quake3 #: ../src/game.c:1782 #, c-format msgid "" "\"%s\" directory doesn't exist or doesn't contain \"baseq3\" (\"demoq3\") " "subdirectory.\n" "Please specify correct %s working directory\n" "or leave it empty (~/.q3a is used by default)" msgstr "" "Katalog \"%s\" nie istnieje lub nie zawiera podkatalogów \"baseq3\" (\"demoq3" "\")\n" "Podaj prawidłowy katalog %s,\n" "lub zostaw puste (~/.q3a będzie użyte domyślnie)" #: ../src/game.c:1819 ../src/launch.c:339 ../src/xqf.c:981 ../src/xqf.c:994 msgid "Launch" msgstr "Uruchom" #. %s frontend.cfg #: ../src/game.c:1821 #, c-format msgid "" "Cannot write to file \"%s\".\n" "\n" "Launch client anyway?" msgstr "" "Nie mogę zapisywać do \"%s\".\n" "\n" "Uruchomić klienta mimo to?" #: ../src/game.c:2448 msgid "" "The server has Punkbuster enabled but it is not going\n" "to be set on the command line.\n" "You may have problems connecting.\n" "You can fix this in the game preferences." msgstr "" "Serwer ma uruchomiony PunkBuster, ale nie jest\n" "to ustawione w konsoli.\n" "Możesz mieć problemy z połączeniem do tego serwera.\n" "Możesz to naprawić w ustawieniach gry." #: ../src/launch.c:70 ../src/launch.c:195 msgid "XQF: ERROR!" msgstr "XQF: Błąd!" #: ../src/launch.c:70 #, c-format msgid "" "ERROR!\n" "\n" "%s(%s) failed: %s" msgstr "" "Błąd!\n" "\n" "%s(%s) nie udało się: %s" #: ../src/launch.c:195 #, c-format msgid "" "ERROR!\n" "\n" "%s" msgstr "" "Błąd!\n" "\n" "%s" #: ../src/launch.c:340 #, c-format msgid "" "There is %s client running.\n" "\n" "Launch %s client?" msgstr "" "%s jest już uruchomiony.\n" "\n" "Uruchomić %s?" #: ../src/pref.c:646 msgid "com_soundmegs and com_zonemegs must be lower than com_hunkmegs" msgstr "com_soundmegs i com_zonemegs muszą być mniejsze niż com_hunkmegs" #: ../src/pref.c:1232 msgid "Invalid source IP address" msgstr "Niepoprawny adres IP źródła" #: ../src/pref.c:1244 msgid "Invalid source port range" msgstr "Niepoprawny zakres portów źródła" #. Top (Shirt) Color #: ../src/pref.c:1592 ../src/pref.c:1691 msgid "Top" msgstr "Górny" #. Bottom (Pants) Color #: ../src/pref.c:1608 ../src/pref.c:1707 msgid "Bottom" msgstr "Dolny" #. Player Name #: ../src/pref.c:1854 ../src/pref.c:1965 ../src/pref.c:2025 ../src/pref.c:2077 #: ../src/xqf-ui.c:54 ../src/xqf-ui.c:129 msgid "Name" msgstr "Nazwa" #: ../src/pref.c:1875 ../src/xqf-ui.c:141 msgid "Colors" msgstr "Kolory" #: ../src/pref.c:1908 msgid "Login name" msgstr "Login" #: ../src/pref.c:1950 msgid "Skin/Colors" msgstr "Skin/Kolory" #: ../src/pref.c:1986 msgid "Team" msgstr "Drużyna" #: ../src/pref.c:2044 msgid "Model/Skin" msgstr "Model/Skin" #: ../src/pref.c:2131 msgid "--- Anything ---" msgstr "--- Cokolwiek ---" #: ../src/pref.c:2132 msgid "Axe" msgstr "Topór" #: ../src/pref.c:2133 msgid "Shotgun" msgstr "Strzelba" #: ../src/pref.c:2134 msgid "Super Shotgun" msgstr "Super Strzelba" #: ../src/pref.c:2135 msgid "Nailgun" msgstr "Nailgun" #: ../src/pref.c:2136 msgid "Super Nailgun" msgstr "Super Nailgun" #: ../src/pref.c:2137 msgid "Grenade Launcher" msgstr "Granatnik" #: ../src/pref.c:2138 msgid "Rocket Launcher" msgstr "Wyrzutnia Rakiet" #: ../src/pref.c:2139 msgid "ThunderBolt" msgstr "Spawarka" #: ../src/pref.c:2187 msgid "Use skins" msgstr "Użyj skina" #: ../src/pref.c:2193 msgid "Don't use skins" msgstr "Nie używaj skinów" #: ../src/pref.c:2199 msgid "Don't download new skins" msgstr "Nie pobieraj nowych skinów" #: ../src/pref.c:2241 msgid "You must configure a command line first" msgstr "Musisz najpierw skonfigurować linię poleceń" #: ../src/pref.c:2283 msgid "Game not found" msgstr "Gra nie znaleziona" #. %s name of a game #: ../src/pref.c:2285 #, c-format msgid "%s not found" msgstr "nie znaleziono %s" #: ../src/pref.c:2333 #, c-format msgid "" "An entry already exists for the game %s.\n" "\n" "A default entry for this game will not be added.\n" "\n" "Delete the entry and try again." msgstr "" "Już istnieje wpis dla gry %s.\n" "\n" "Domyślny wpis nie zostanie dodany.\n" "\n" "Usuń wpis i spróbuj ponownie." #: ../src/pref.c:2375 msgid "There are no defaults for this game" msgstr "Brak ustawień domyślnych dla tej gry" #: ../src/pref.c:2436 msgid "" "There is already an entry for this game.\n" "\n" "To modify it, select it from the list, modify it\n" "and then click Add/Update." msgstr "" "Wpis dla tej gry już istnieje.\n" "\n" "Aby go zmodyfikować, wybierz go z listy, zmodyfikuj\n" "a następnie kliknij \"Dodaj/Zmień\"." #: ../src/pref.c:2440 msgid "You must enter both a game and at least one argument." msgstr "Musisz podać grę i przynajmniej jeden parametr." #: ../src/pref.c:2539 msgid "Invoking" msgstr "Uruchamianie" #: ../src/pref.c:2546 msgid "*** Not Implemented ***" msgstr "*** Nie zaimplementowane ***" #: ../src/pref.c:2558 msgid "Custom Args" msgstr "Własne parametry" #: ../src/pref.c:2570 msgid "Command Line" msgstr "Linia poleceń" #. translator: button for command suggestion #. translator: button for directory guess #: ../src/pref.c:2597 ../src/pref.c:2635 msgid "Suggest" msgstr "Podpowiedź" #: ../src/pref.c:2603 msgid "Searches the path for the game executable" msgstr "Znajdź katalog i plik wykonywalny gry" #. /// #: ../src/pref.c:2610 msgid "Working Directory" msgstr "Katalog gry" #: ../src/pref.c:2640 msgid "Tries to guess the working directory based on the command line" msgstr "Próbuje odczytać katalog gry na podstawie linii poleceń" #: ../src/pref.c:2658 msgid "Custom CFG" msgstr "Własna konfiguracja" #: ../src/pref.c:2763 ../src/xqf-ui.c:102 msgid "Game" msgstr "Gra" #: ../src/pref.c:2771 msgid "Arguments" msgstr "Parametry" #: ../src/pref.c:2779 msgid "Game and Arguments" msgstr "Gra i Parametry" #: ../src/pref.c:2802 msgid "Enter the game name from the game column" msgstr "Podaj nazwę gry z kolumny \"Gra\"" #: ../src/pref.c:2811 msgid "Enter the arguments separated by spaces" msgstr "Podaj parametry oddzielone spacją" #: ../src/pref.c:2837 msgid "Add Defaults" msgstr "Dodaj domyślne" #: ../src/pref.c:2845 msgid "Add/Update" msgstr "Dodaj/Zmień" #. Common Options #: ../src/pref.c:3000 msgid "Common Options" msgstr "Podstawowe opcje" #: ../src/pref.c:3011 msgid "Disable CD Audio" msgstr "Wyłącz CD Audio" #. Disable Sound #: ../src/pref.c:3019 msgid "Disable Sound" msgstr "Wyłącz dźwięk" #: ../src/pref.c:3043 msgid "Do not set (use game default)" msgstr "Nie ustawiaj (użyj ustawień gry)" #: ../src/pref.c:3044 msgid "Automatically calculate from server ping time" msgstr "Wylicz automatycznie na podstawie pinga" #: ../src/pref.c:3045 msgid "Fixed value" msgstr "Ustalona wartość" #: ../src/pref.c:3113 msgid "Masterserver Protocol Version" msgstr "Wersja protokołu serwera źródłowego" #: ../src/pref.c:3136 msgid "set fs_game on connect" msgstr "ustaw fs_game przy połączeniu" #: ../src/pref.c:3145 msgid "set cl_punkbuster on connect" msgstr "ustaw cl_punkbuster przy połączeniu" #: ../src/pref.c:3154 #, fuzzy msgid "enable console" msgstr "Włącz dźwięki" #: ../src/pref.c:3216 msgid "Pass memory settings on command line" msgstr "Przekaż ustawienia pamięci w linii poleceń" #. Mega Byte #: ../src/pref.c:3234 ../src/pref.c:3257 ../src/pref.c:3280 ../src/pref.c:3304 msgid "MB" msgstr "MB" #: ../src/pref.c:3238 msgid "com_hunkmegs" msgstr "com_hunkmegs" #: ../src/pref.c:3261 msgid "com_zonemegs" msgstr "com_zonemegs" #: ../src/pref.c:3284 msgid "com_soundmegs" msgstr "com_soundmegs" #: ../src/pref.c:3308 msgid "cg_precachedmodels" msgstr "cg_precachedmodels" #: ../src/pref.c:3317 msgid "Preset values" msgstr "Domyślne wartości" #: ../src/pref.c:3324 msgid "Default" msgstr "Domyślne" #: ../src/pref.c:3330 msgid "128MB" msgstr "128MB" #: ../src/pref.c:3336 msgid ">256MB" msgstr ">256MB" #: ../src/pref.c:3355 ../src/pref.c:3584 ../src/pref.c:3590 msgid "Options" msgstr "Opcje" #: ../src/pref.c:3358 msgid "Memory" msgstr "Pamięć" #. QW Specific Features #. 'w_switch' & 'b_switch' control #: ../src/pref.c:3387 msgid "The highest weapon that Quake should switch to..." msgstr "Największa broń którą można wybrać w Quake..." #: ../src/pref.c:3400 msgid "upon a weapon pickup" msgstr "przy podniesieniu broni" #: ../src/pref.c:3418 msgid "upon a backpack pickup" msgstr "przy podniesieniu plecaka" #: ../src/pref.c:3439 msgid "Disable auto-aiming" msgstr "Wyłącz automatyczne celowanie" #: ../src/pref.c:3477 msgid "Skins" msgstr "Skiny" #: ../src/pref.c:3499 msgid "Rate" msgstr "Rate" #. 'pushlatency' #: ../src/pref.c:3523 msgid "pushlatency" msgstr "pushlatency" #. Troubleshooting #: ../src/pref.c:3538 msgid "Troubleshooting" msgstr "Rozwiązywanie problemów" #: ../src/pref.c:3551 msgid "Disable delta-compression (cl_nodelta)" msgstr "Wyłącz delta-kompresję (cl_nodelta)" #: ../src/pref.c:3565 msgid "Disable player/entity prediction (cl_predict_players)" msgstr "Wyłącz przewidywanie pozycji graczy/jednostek (cl_predict_players)" #: ../src/pref.c:3583 msgid "Weapons" msgstr "Bronie" #: ../src/pref.c:3585 ../src/pref.c:3591 ../src/pref.c:3596 ../src/pref.c:3601 msgid "Player Profile" msgstr "Profil gracza" #: ../src/pref.c:3677 msgid "Icons" msgstr "Ikony" #: ../src/pref.c:3677 msgid "Text" msgstr "Tekst" #: ../src/pref.c:3677 msgid "Both" msgstr "Oba" # src/pref.c: #: ../src/pref.c:3683 msgid "Server List" msgstr "Lista serwerów" #: ../src/pref.c:3696 msgid "Show host names" msgstr "Pokaż nazwy hostów" #: ../src/pref.c:3701 msgid "Show hostnames instead of IP addresses if possible" msgstr "Pokazuj nazwy hostów zamiast adresów IP gdy to możliwe" #: ../src/pref.c:3712 msgid "Show default port" msgstr "Pokazuj domyślny port" #: ../src/pref.c:3727 msgid "Do not count bots as players" msgstr "Nie licz botów jako graczy" #: ../src/pref.c:3743 msgid "Sort servers real-time during refresh" msgstr "Sortuj serwery na bieżąco w czasie odświeżania" #: ../src/pref.c:3758 msgid "Refresh on update" msgstr "Odświeżaj przy aktualizacji" #: ../src/pref.c:3774 msgid "Resolve hostnames on update" msgstr "Uzyskuj nazwy hostów przy aktualizacji" #: ../src/pref.c:3778 msgid "Enable or disable DNS resolution of IP addresses" msgstr "Włącz / Wyłącz uzyskiwanie adresów przez DNS" #: ../src/pref.c:3792 msgid "Show only configured games" msgstr "Pokazuj tylko skonfigurowane gry" #: ../src/pref.c:3808 msgid "Use custom color settings" msgstr "Używaj własnych ustawień kolorów" #: ../src/pref.c:3810 msgid "" "Use XQF's color settings instead of the system ones. You need to restart XQF " "for this setting to take effect. Note that you may need to install the gtk-" "engines package." msgstr "" "Używaj ustawień kolorów z XQF zamiast systemowych. Musisz zrestartować XQF " "aby te zmiany odniosły efekt. Możliwe że będziesz musiał zainstalować pakiet " "gtk-engines." #. Toolbar #: ../src/pref.c:3831 msgid "Toolbar" msgstr "Pasek narzędzi" #. Toolbar Tips #: ../src/pref.c:3856 msgid "Tooltips" msgstr "Podpowiedzi" #. On Startup #: ../src/pref.c:3899 msgid "On Startup" msgstr "Przy Starcie" #: ../src/pref.c:3912 msgid "Refresh Favorites" msgstr "Odśwież ulubione" #: ../src/pref.c:3925 msgid "Show splash screen" msgstr "Pokazuj ekran ładowania" #: ../src/pref.c:3939 msgid "Scan for maps" msgstr "Szukaj map" #: ../src/pref.c:3944 msgid "" "Scan game directories for installed maps. xqf will take longer to start up " "when enabled." msgstr "" "Skanuj katalogi gier w poszukiwaniu dostępnych map. XQF będzie się dłużej " "uruchamiał z tą opcją" #: ../src/pref.c:3951 msgid "scan now" msgstr "Szukaj teraz" #: ../src/pref.c:3967 msgid "Minimize to system tray" msgstr "Zwijaj do ikony w zasobniku" #: ../src/pref.c:3971 msgid "Enable xqf tray icon. You need to restart xqf for this to take effect." msgstr "" "Włącz ikonę XQF w zasobniku. Musisz zrestartować XQF aby ta opcja zadziałała." #. On Exit #: ../src/pref.c:3984 msgid "On Exit" msgstr "Przy Wyjściu" #: ../src/pref.c:3997 msgid "Save server lists" msgstr "Zapisz listę serwerów" #: ../src/pref.c:4012 msgid "Save server information" msgstr "Zapisz informacje o serwerze" #: ../src/pref.c:4029 msgid "Save player information" msgstr "Zapisz informacje o graczu" #. When launching a Game #: ../src/pref.c:4045 msgid "When launching a game..." msgstr "Podczas uruchamiania gry..." #: ../src/pref.c:4059 msgid "Terminate XQF" msgstr "Zamknij XQF" #: ../src/pref.c:4074 msgid "Iconify XQF window" msgstr "Zwiń XQF" #: ../src/pref.c:4089 msgid "Create LaunchInfo.txt" msgstr "Stwórz LaunchInfo.txt" #: ../src/pref.c:4095 msgid "" "Creates the file ~/.qf/LaunchInfo.txt with: ping ip:port name map curplayers " "maxplayers" msgstr "" "Tworzy plik ~/.qf/LaunchInfo.txt z: Pingiem IP:Port Nazwa_gracza Mapa " "ilość_graczy max_ilość_graczy" #: ../src/pref.c:4101 msgid "Execute prelaunch" msgstr "Wykonaj 'prelaunch'" #: ../src/pref.c:4107 msgid "Executes ~/.qf/PreLaunch (if it exists) before launching the game" msgstr "Wykonuje ~/.qf/PreLaunch przed startem gry (jeśli istnieje)" #: ../src/pref.c:4116 msgid "Stop current song in XMMS" msgstr "Zatrzymaj aktualną piosenkę w XMMS" #: ../src/pref.c:4119 msgid "" "Stopping XMMS will release /dev/dsp. Activate this option if you use XMMS " "and have a cheap soundcard that allows only one application to open /dev/dsp." msgstr "" "Zatrzymanie XMMS zwolni /dev/dsp. Zaznacz tą opcję jeżeli używasz xmms i " "posiadasz kartę dźwiękową która umożliwia otwieranie /dev/dsp tylko przez " "jedną aplikację w tym samym czasie." #. QStat preferences -- maxsimultaneous & maxretries #: ../src/pref.c:4158 msgid "QStat Options" msgstr "Opcje Qstat" #. maxsimultaneous #: ../src/pref.c:4169 msgid "Number of simultaneous servers to query" msgstr "Liczba serwerów sprawdzana jednocześnie" #. maxretries #: ../src/pref.c:4193 msgid "Number of retries" msgstr "Ilość powtórzeń" #. srcip #: ../src/pref.c:4212 msgid "Source IP Address" msgstr "Adres IP serwera źródłowego" #: ../src/pref.c:4233 msgid "Source Port Range" msgstr "Zakres portów serwera źródłowego" #. Translator: sound test button #: ../src/pref.c:4296 msgid "Test" msgstr "Test" #. Sound Enable / Disable frame #. Sounds Enable / Disable #: ../src/pref.c:4313 msgid "Sound Enable / Disable" msgstr "Włącz / Wyłącz dźwięki" #: ../src/pref.c:4327 msgid "Enable Sound" msgstr "Włącz dźwięki" #. Sound Player #: ../src/pref.c:4338 msgid "Player program" msgstr "Program odtwarzający" #. Sound Files frame #. Sounds preferences -- player and various sounds #: ../src/pref.c:4366 msgid "Sound Files" msgstr "Pliki dźwiękowe" #. Sound XQF Start #: ../src/pref.c:4378 msgid "XQF Start" msgstr "Start XQF" #. Sound XQF Quit #: ../src/pref.c:4410 msgid "XQF Quit" msgstr "Wyjście z XQF" #. Sound Update Done #: ../src/pref.c:4442 msgid "Update Done" msgstr "Aktualizacja zakończona" #. Sound Refresh Done #: ../src/pref.c:4475 msgid "Refresh Done" msgstr "Odświeżanie zakończone" #. Sound Stop #: ../src/pref.c:4508 ../src/xqf.c:3071 ../src/trayicon.c:462 msgid "Stop" msgstr "Stop" #. Sound Server Connect #: ../src/pref.c:4541 msgid "Server Connect" msgstr "Połączenie z serwerem" #. Sound Redial Success Start #: ../src/pref.c:4574 msgid "Redial Success" msgstr "Ponawianie zakończone sukcesem" #: ../src/pref.c:4702 msgid "XQF: Preferences" msgstr "XQF: Ustawienia" # src/pref.c #: ../src/pref.c:4722 msgid "General" msgstr "Ogólne" #: ../src/pref.c:4734 msgid "Games" msgstr "Gry" #: ../src/pref.c:4739 msgid "Appearance" msgstr "Wygląd" #: ../src/pref.c:4744 msgid "QStat" msgstr "QStat" #: ../src/pref.c:4749 msgid "Sounds" msgstr "Dźwięki" #: ../src/pref.c:4754 msgid "Scripts" msgstr "Skrypty" #: ../src/pref.c:4895 msgid "Unable to get user name/home/tmpdir" msgstr "" "Nie można uzyskać nazwy użytkownika, katalogu domowego lub tymczasowego" #. translator: %s = game name, e.g. Quake 3 Arena #: ../src/pref.c:5227 #, c-format msgid "Searching for %s maps" msgstr "Szukam map do gry %s" #: ../src/pref.c:5281 msgid "Game Command Selection" msgstr "Wybór pliku wykonywalnego gry" #: ../src/pref.c:5290 msgid "Game Directory Selection" msgstr "Wybór katalogu gry" #: ../src/pref.c:5295 msgid "Sound Player Selection" msgstr "Wybór odtwarzacza dźwięku" #: ../src/pref.c:5300 msgid "XQF Start Sound Selection" msgstr "Wybór dźwięku startu XQF" #: ../src/pref.c:5305 msgid "XQF Quit Sound Selection" msgstr "Wybór dźwięku wyjścia XQF" #: ../src/pref.c:5310 msgid "Update Done Sound Selection" msgstr "Wybór dźwięku zakończenia aktualizacji" #: ../src/pref.c:5315 msgid "Refresh Done Sound Selection" msgstr "Wybór dźwięku zakończenia Odświeżania" #: ../src/pref.c:5320 msgid "Stop Sound Selection" msgstr "Wybór dźwięku Stop" #: ../src/pref.c:5325 msgid "Server Connect Sound Selection" msgstr "Wybór dźwięku połączenia z serwerem" #: ../src/pref.c:5330 msgid "Redial Success Sound Selection" msgstr "Wybór dźwięku ponawiania połączenia zakończonego sukcesem" #: ../src/psearch.c:51 msgid "Exact Match" msgstr "Dokładne dopasowanie" #: ../src/psearch.c:52 msgid "Substring" msgstr "Podciąg" #: ../src/psearch.c:53 msgid "Regular Expression" msgstr "Wyrażenie regularne" #: ../src/psearch.c:174 msgid "Find Player" msgstr "Znajdź gracza" #. Pattern Entry #: ../src/psearch.c:185 msgid "Find Player:" msgstr "Znajdź gracza:" #: ../src/psearch.c:394 msgid "Player not found." msgstr "Gracz nie znaleziony." #: ../src/psearch.c:398 msgid "XQF: End of server list reached" msgstr "XQF: Osiągnięto koniec listy serwerów" #: ../src/psearch.c:399 msgid "Continue search from beginning?" msgstr "Zacząć wyszukiwanie od początku?" #. Message #: ../src/rcon.c:550 msgid "Cmd:" msgstr "Polecenie:" #. Send Button #: ../src/rcon.c:577 msgid "Send" msgstr "Wyślij" #. Status Button #: ../src/rcon.c:586 msgid "Status" msgstr "Status" #. Clear Button #: ../src/rcon.c:595 msgid "Clear" msgstr "Wyczyść" #: ../src/rcon.c:617 ../src/statistics.c:849 msgid "Close" msgstr "Zamknij" #: ../src/rcon.c:717 #, c-format msgid "Usage: %s [server type] \n" msgstr "Użycie: %s [typ serwera] \n" #: ../src/rcon.c:718 #, fuzzy, c-format msgid " server type is either --qws, --hws, --hls or --dm3s.\n" msgstr " typ serwera to --qws, --hws lub --hls.\n" #: ../src/rcon.c:719 #, c-format msgid " If no server type is specified, Q3 style rcon is assumed.\n" msgstr "" " Jeżeli typ serwera nie jest określony przyjmuje się konsolę w typu Quake " "3.\n" #. translator: readline prompt #: ../src/rcon.c:756 msgid "Password: " msgstr "Hasło:" #: ../src/redial.c:123 #, c-format msgid "" "Waiting for free slots on\n" "%s" msgstr "" "Czekam na wolne miejsca na:\n" "%s" #: ../src/redial.c:125 #, c-format msgid "" "Refreshing\n" "%s" msgstr "" "Odświeżanie\n" "%s" #. * window code modified from glade #: ../src/redial.c:179 ../src/redial.c:184 msgid "XQF: Redialing" msgstr "XQF: Ponawianie połączenia" #: ../src/redial.c:196 msgid "" "***\n" "***" msgstr "" "***\n" "***" #: ../src/redial.c:219 msgid "Launch now" msgstr "Uruchom teraz" #: ../src/source.c:66 msgid "Standard" msgstr "Standard" #: ../src/source.c:67 msgid "Gamespy" msgstr "Gamespy" #: ../src/source.c:68 msgid "http" msgstr "http" #: ../src/source.c:70 msgid "File" msgstr "Plik" #: ../src/source.c:122 msgid "Retry" msgstr "Ponów" #: ../src/source.c:122 msgid "Skip" msgstr "Opóść" #: ../src/source.c:123 #, c-format msgid "" "Cannot write to file %s\n" "System Error: %s\n" msgstr "" "Nie mogę zapisywać do pliku %s\n" "Błąd systemu: %s\n" #. translator: %s == url, eg gmaster://bla.blub.org #: ../src/source.c:891 #, c-format msgid "You have to specify a port number for %s." msgstr "Musisz podać numer portu dla %s." #: ../src/source.c:905 #, c-format msgid "'gsmtype' options missing for master %s." msgstr "Brakuje opcja 'gsmtype' dla serwera źródłowego %s." #: ../src/source.c:1439 msgid "Favorites" msgstr "Ulubione" #: ../src/srv-prop.c:423 msgid "IP Address:" msgstr "Adres IP:" #: ../src/srv-prop.c:433 msgid "Port:" msgstr "Port:" #: ../src/srv-prop.c:447 msgid "Host Name:" msgstr "Nazwa hosta:" #: ../src/srv-prop.c:461 msgid "Country:" msgstr "Kraj:" #: ../src/srv-prop.c:489 msgid "Refreshed:" msgstr "Odświeżony:" #. translator: last time and date the server answered the query #: ../src/srv-prop.c:507 msgid "Last answer:" msgstr "Ostatnia odpowiedź:" #: ../src/srv-prop.c:564 msgid "Reserved Slots:" msgstr "Zarezerwowane miejsca:" #. Sources #: ../src/srv-prop.c:583 msgid "Sources" msgstr "Źródła" #: ../src/srv-prop.c:635 msgid "Custom CFG:" msgstr "Własna konfiguracja:" #: ../src/srv-prop.c:684 msgid "Server Password" msgstr "Hasło Serwera" #: ../src/srv-prop.c:690 msgid "Spectator Password" msgstr "Hasło Obserwatora" #: ../src/srv-prop.c:697 msgid "RCon/Admin Password" msgstr "Hasło RCon/Admina" #: ../src/srv-prop.c:728 msgid "This server sucks" msgstr "Ten serwer jest do kitu" #: ../src/srv-prop.c:771 ../src/xqf.c:2603 ../src/xqf.c:2741 msgid "Properties" msgstr "Właściwości" #: ../src/srv-prop.c:816 msgid "Info" msgstr "Informacje" #: ../src/srv-prop.c:821 msgid "Passwords" msgstr "Hasła" #: ../src/srv-prop.c:826 msgid "Comment" msgstr "Komentarz" #: ../src/stat.c:728 msgid "Allies" msgstr "Alianci" #: ../src/stat.c:728 msgid "Axis" msgstr "Oś" #: ../src/stat.c:734 msgid "Red" msgstr "Czerwoni" #: ../src/stat.c:734 msgid "Blue" msgstr "Niebiescy" #: ../src/stat.c:1376 #, c-format msgid "" "UT2004 CD Key not found, cannot query master '%s'.\n" "Make sure the working directory is set correctly." msgstr "" "CD Key do UT2004 nie został znaleziony, nie można zrealizować zapytania do " "serwera źródłowego '%s'.\n" "Upewnij się że katalog gry jest poprawnie ustawiony." #: ../src/stat.c:1559 #, c-format msgid "Failed to create a temporary file %s: %s" msgstr "Nie można utworzyć pliku tymczasowego %s: %s" #. The space behind up and down is to make the strings different from #. those in flt-player.c because their meaning is different in german #: ../src/statistics.c:82 ../src/statistics.c:93 msgid "Servers" msgstr "Serwery" #: ../src/statistics.c:82 msgid "Up " msgstr "Działające" #: ../src/statistics.c:82 msgid "Timeout" msgstr "Timeout" #: ../src/statistics.c:82 msgid "Down " msgstr "Niedziałające" #: ../src/statistics.c:82 msgid "Info n/a" msgstr "Informacja N/D" #: ../src/statistics.c:82 ../src/statistics.c:504 ../src/xqf-ui.c:88 msgid "Players" msgstr "Gracze" #: ../src/statistics.c:86 ../src/statistics.c:90 msgid "unknown" msgstr "nieznany" #: ../src/statistics.c:94 msgid "OS/CPU" msgstr "OS/CPU" #: ../src/statistics.c:95 ../src/xqf-ui.c:65 msgid "Country" msgstr "Kraje" #: ../src/statistics.c:450 ../src/statistics.c:498 ../src/statistics.c:503 msgid "Total" msgstr "Razem" #: ../src/statistics.c:493 msgid "CPU \\ OS" msgstr "CPU \\ OS" #: ../src/statistics.c:721 msgid "All Games" msgstr "Wszystkie gry" #: ../src/statistics.c:803 ../src/statistics.c:812 msgid "Statistics" msgstr "Statystyki" #. error converting time to string representation, shouldn't happen #: ../src/utils.c:903 msgid "" msgstr "" #: ../src/utils.c:1126 msgid "Can't open source file for reading" msgstr "Nie mogę odczytać pliku źródłowego" #: ../src/utils.c:1133 msgid "Can't open destination file for writing" msgstr "Nie mogę zapisywać do pliku docelowego" #: ../src/utils.c:1141 msgid "write error on destination file" msgstr "zapisuj błędy w pliku docelowym" #: ../src/utils.c:1148 msgid "read error on source file" msgstr "Nie mogę odczytać pliku źródłowego" #: ../src/xqf-ui.c:58 msgid "Type" msgstr "Typ" #: ../src/xqf-ui.c:61 msgid "Address" msgstr "Adres" #: ../src/xqf-ui.c:68 ../src/xqf-ui.c:153 msgid "Ping" msgstr "Ping" #: ../src/xqf-ui.c:74 msgid "TO" msgstr "TO" #: ../src/xqf-ui.c:80 msgid "Priv" msgstr "Priv" #. Translator: "PunkBuster" #: ../src/xqf-ui.c:85 msgid "PB" msgstr "PB" #. Translator: Max as in max players #: ../src/xqf-ui.c:93 msgid "Max" msgstr "Max" #: ../src/xqf-ui.c:96 msgid "Map" msgstr "Mapa" #: ../src/xqf-ui.c:108 msgid "GameType" msgstr "Typ Gry" #: ../src/xqf-ui.c:135 msgid "Frags" msgstr "Fragi" #: ../src/xqf-ui.c:147 msgid "Skin" msgstr "Skin" #: ../src/xqf-ui.c:159 msgid "Time" msgstr "Czas" #: ../src/xqf-ui.c:179 msgid "Rule" msgstr "Parametr" #: ../src/xqf-ui.c:185 msgid "Value" msgstr "Wartość" #: ../src/xqf-ui.c:575 msgid "Source" msgstr "Źródło" #: ../src/xqf.c:349 #, c-format msgid "%d server" msgstr "Serwerów: %d" #: ../src/xqf.c:349 #, c-format msgid "%d servers" msgstr "Serwerów: %d" #. server filter #: ../src/xqf.c:597 #, c-format msgid "None <--" msgstr "Żaden <--" #: ../src/xqf.c:599 ../src/xqf.c:3201 ../src/xqf.c:3258 ../src/xqf.c:3403 #, c-format msgid "None" msgstr "Żaden" #: ../src/xqf.c:613 #, c-format msgid "Filter %d <--" msgstr "Filtr %d <--" #: ../src/xqf.c:615 #, c-format msgid "Filter %d" msgstr "Filtr %d" #: ../src/xqf.c:637 #, c-format msgid "No Server Filter Active" msgstr "Żaden filtr serwera nie jest aktywny" #: ../src/xqf.c:644 #, c-format msgid "Server Filter: %s" msgstr "Filtr serwera: %s" #: ../src/xqf.c:648 #, c-format msgid "Server Filter: %d" msgstr "Filtr serwera: %d" #: ../src/xqf.c:815 msgid "Updating lists..." msgstr "Aktualizuję listę ..." #: ../src/xqf.c:821 #, c-format msgid "Resolving host names: %d/%d" msgstr "Uzyskiwanie nazwy hosta: %d/%d" #: ../src/xqf.c:825 #, c-format msgid "Refreshing: %d/%d" msgstr "Odświeżanie: %d/%d" #: ../src/xqf.c:831 #, c-format msgid "Resolving host addresses: %d/%d" msgstr "Uzyskiwanie adresu hosta: %d/%d" #: ../src/xqf.c:958 msgid "" "You said this servers sucks.\n" "Do you want to risk a game this time?" msgstr "" "Zaznaczyłeś że ten serwer jest do kitu.\n" "Czy pomimo tego chcesz zaryzykować grę na nim?" #: ../src/xqf.c:970 #, c-format msgid "" "This server is not compatible with the version of %s you have installed.\n" "Launch client anyway?" msgstr "" "Ten serwer nie jest kompatybilny z wersją %s którą posiadasz.\n" "Czy pomimo tego chcesz się połączyć?" #: ../src/xqf.c:982 #, c-format msgid "" "Server %s:%d is %s.\n" "\n" "Launch client anyway?" msgstr "" "Serwer %s:%d jest %s.\n" "\n" "Czy pomimo tego chcesz się połączyć?" #: ../src/xqf.c:995 #, c-format msgid "" "Server %s:%d is full.\n" "\n" "Launch client anyway?" msgstr "" "Serwer %s:%d jest pełny.\n" "\n" "Czy pomimo tego chcesz się połączyć?" #: ../src/xqf.c:1108 ../src/xqf.c:1128 ../src/xqf.c:2003 msgid "Save Password" msgstr "Zapisz hasło" #: ../src/xqf.c:1108 msgid "Spectator Password:" msgstr "Hasło obserwatora:" #: ../src/xqf.c:1128 ../src/xqf.c:2003 msgid "Server Password:" msgstr "Hasło serwera:" #: ../src/xqf.c:1279 msgid "Spectator" msgstr "Obserwator" #: ../src/xqf.c:1280 ../src/xqf.c:1283 msgid "Demo name:" msgstr "Nazwa Dema:" #: ../src/xqf.c:1525 #, c-format msgid "Host %s not found" msgstr "Host %s nie został znaleziony" #: ../src/xqf.c:1545 ../src/xqf.c:3815 #, c-format msgid "\"%s\" is not valid host[:port] combination." msgstr "\"%s\" nie jest prawidłowym wyrażeniem host[:port]" #: ../src/xqf.c:1646 #, fuzzy msgid "Remove selected servers from all lists?" msgstr "Odśwież zaznaczone serwery" #. translator: %s == url #: ../src/xqf.c:1791 #, c-format msgid "" "For Gslist support you must install the 'gslist' program available from\n" "%s\n" "Don't forget that you need to run 'gslist -u' before you can use it." msgstr "" "Aby używać Gslist musisz zainstalować program 'gslist' dostępny na\n" "%s\n" "Nie zapomnij uruchomić 'gslist -u' zanim zaczniesz go używać." #: ../src/xqf.c:1862 msgid "You have to select the server you want to delete" msgstr "Musisz wybrać serwer który chcesz usunąć" #: ../src/xqf.c:1868 #, c-format msgid "" "Master%s to delete:\n" "\n" "%s" msgstr "" "Serwer %s do usunięcia:\n" "\n" "%s" #: ../src/xqf.c:1891 #, c-format msgid "Find Player: %s" msgstr "Znajdź gracza: %s" #: ../src/xqf.c:1983 msgid "Done." msgstr "Zrobione." #: ../src/xqf.c:2525 ../src/xqf.c:3081 msgid "Connect" msgstr "Połącz" #: ../src/xqf.c:2530 ../src/xqf.c:3090 msgid "Observe" msgstr "Obserwuj" #: ../src/xqf.c:2535 ../src/xqf.c:3098 msgid "Record Demo" msgstr "Nagraj demo" #: ../src/xqf.c:2549 msgid "Add new Server" msgstr "Dodaj nowy serwer" #: ../src/xqf.c:2554 msgid "Add to Favorites" msgstr "Dodaj do Ulubionych" #: ../src/xqf.c:2559 #, fuzzy msgid "Remove" msgstr "Zm. naz." #: ../src/xqf.c:2564 ../src/xqf.c:2613 msgid "Copy" msgstr "Kopiuj" #: ../src/xqf.c:2569 msgid "Copy+" msgstr "Kopiuj+" #: ../src/xqf.c:2577 ../src/xqf.c:3055 ../src/trayicon.c:452 msgid "Refresh" msgstr "Odśwież" #: ../src/xqf.c:2582 msgid "Refresh Selected" msgstr "Odśwież zaznaczone" #: ../src/xqf.c:2590 msgid "DNS Lookup" msgstr "Zapytanie DNS" #: ../src/xqf.c:2598 msgid "RCon" msgstr "RCon" #: ../src/xqf.c:2621 msgid "_Statistics" msgstr "_Statystyki" #: ../src/xqf.c:2629 msgid "_Exit" msgstr "_Wyjście" #: ../src/xqf.c:2640 ../src/xqf.c:2705 msgid "Add _Master" msgstr "Dodaj _Serwer Źródłowy" #: ../src/xqf.c:2645 ../src/xqf.c:2710 msgid "_Rename Master" msgstr "_Zmień_nazwę_Serwera_Źródłowego" #: ../src/xqf.c:2650 ../src/xqf.c:2715 msgid "D_elete Master" msgstr "_Usuń Serwer Źródłowy" #: ../src/xqf.c:2655 ../src/xqf.c:2720 msgid "_Clear Servers" msgstr "Usuń serwery" #: ../src/xqf.c:2665 ../src/xqf.c:2825 msgid "_Add new Server" msgstr "Dodaj nowy serwer" #: ../src/xqf.c:2670 ../src/xqf.c:2830 msgid "Add to _Favorites" msgstr "Dodaj do Ulubionych" #: ../src/xqf.c:2675 ../src/xqf.c:2835 #, fuzzy msgid "_Remove" msgstr "Zm. naz." #: ../src/xqf.c:2680 msgid "_Copy" msgstr "_Kopiuj" #: ../src/xqf.c:2685 msgid "_Copy+" msgstr "_Kopiuj+" #: ../src/xqf.c:2693 msgid "Add Default Masters" msgstr "Dodaj domyślny Serwer Źródłowy" #: ../src/xqf.c:2699 msgid "Add Gslist Masters" msgstr "Dodaj Serwer Źródłowy Gslist" #: ../src/xqf.c:2728 msgid "_Find Player" msgstr "_Znajdź gracza" #: ../src/xqf.c:2733 msgid "Find A_gain" msgstr "_Ponów Szukanie" #: ../src/xqf.c:2751 msgid "_Refresh" msgstr "Odśwież" #: ../src/xqf.c:2756 msgid "Refresh _Selected" msgstr "Odśwież zaznaczone" #: ../src/xqf.c:2761 msgid "_Update From Master" msgstr "Zaktualizuj z Serwera Źródłowego" #: ../src/xqf.c:2769 msgid "Show _Host Names" msgstr "Pokaż nazwy _hostów" #: ../src/xqf.c:2774 msgid "Show Default _Port" msgstr "Pokaż domyślny _port" #: ../src/xqf.c:2800 msgid "_Connect" msgstr "_Połącz" #: ../src/xqf.c:2805 msgid "_Observe" msgstr "_Obserwuj" #: ../src/xqf.c:2810 msgid "Record _Demo" msgstr "Nagraj _Demo" #: ../src/xqf.c:2841 msgid "DNS _Lookup" msgstr "Zapytanie _DNS" #: ../src/xqf.c:2849 msgid "_RCon" msgstr "_RCon" #: ../src/xqf.c:2854 msgid "_Properties" msgstr "_Właściwości" # src/xqf.c #: ../src/xqf.c:2864 msgid "_General" msgstr "_Ogólne" #: ../src/xqf.c:2870 msgid "_Games" msgstr "_Gry" #: ../src/xqf.c:2876 msgid "_Appearance" msgstr "_Wygląd" #: ../src/xqf.c:2882 msgid "_QStat" msgstr "_QStat" #: ../src/xqf.c:2888 msgid "_Sounds" msgstr "_Dźwięki" #: ../src/xqf.c:2894 msgid "S_cripts" msgstr "_Skrypty" #: ../src/xqf.c:2904 msgid "_Server Filter" msgstr "Filtr _Serwera" #: ../src/xqf.c:2909 msgid "Player _Filter" msgstr "Filtr _Gracza" #: ../src/xqf.c:2919 msgid "_About" msgstr "_O Programie" #: ../src/xqf.c:2930 msgid "_File" msgstr "_Plik" #: ../src/xqf.c:2935 msgid "_Edit" msgstr "_Edycja" #: ../src/xqf.c:2940 msgid "_View" msgstr "_Widok" #: ../src/xqf.c:2945 msgid "_Server" msgstr "_Serwer" #: ../src/xqf.c:2950 msgid "_Preferences" msgstr "_Preferencje" #: ../src/xqf.c:2956 msgid "_Server Filters" msgstr "Filtry Serwera" #: ../src/xqf.c:2962 msgid "_Help" msgstr "Pomoc" #: ../src/xqf.c:3005 msgid "Mark as Red" msgstr "Oznacz na Czerwono" #: ../src/xqf.c:3012 msgid "Mark as Green" msgstr "Oznacz na Zielono" #: ../src/xqf.c:3019 msgid "Mark as Blue" msgstr "Oznacz na Niebiesko" #: ../src/xqf.c:3026 msgid "Add to Player Filter" msgstr "Dodaj do Filtru Gracza" #: ../src/xqf.c:3047 ../src/trayicon.c:457 msgid "Update" msgstr "Aktualizuj" #: ../src/xqf.c:3047 msgid "Update from master" msgstr "Aktualizuj z Serwera Źródłowego" #: ../src/xqf.c:3055 msgid "Refresh current list" msgstr "Odśwież aktualną Listę" #: ../src/xqf.c:3063 msgid "Ref.Sel." msgstr "Odśw.Zazn." #: ../src/xqf.c:3063 msgid "Refresh selected servers" msgstr "Odśwież zaznaczone serwery" #: ../src/xqf.c:3098 msgid "Record" msgstr "Nagraj" #. Translators: e.g. Server Filter #: ../src/xqf.c:3116 #, c-format msgid "%s Filter Enable / Disable" msgstr "Filtr %sa Włącz / Wyłącz" #. Translators: e.g. Server Filter Configuration #: ../src/xqf.c:3138 #, c-format msgid "%s Filter Configuration" msgstr "Konfiguracja filtra %s" #: ../src/xqf.c:3240 msgid "Configure" msgstr "Konfiguruj" #: ../src/xqf.c:3383 msgid "Filters" msgstr "Filtry" #: ../src/xqf.c:3552 msgid "Quick Filter:" msgstr "Szybki Filtr:" #: ../src/xqf.c:3729 msgid "no sound player configured" msgstr "nie ustawiono programu odtwarzającego" #: ../src/xqf.c:3767 msgid "" "Usage:\n" "\txqf [OPTIONS]\n" "\n" "OPTIONS:\n" "\t--launch \"[SERVERTYPE] IP\"\tlaunch game on specified server\n" "\t--add \"[SERVERTYPE] IP\"\tadd specified server to favorites\n" "\t--debug \t\t\tset debug level\n" "\t--version\t\t\tprint version and exit\n" msgstr "" "Użycie:\n" "\txqf [OPCJE]\n" "\n" "OPCJE:\n" "\t--launch \"[TYP_SERWERA] IP\"\tzacznij grę na określonym serwerze\n" "\t--add \"[TYP_SERWERA] IP\"\tdodaj określony serwer do Ulubionych\n" "\t--debug \t\t\tokreśl poziom wiadomości debugingu\n" "\t--version\t\t\twypisz wersję i wyjdź\n" #: ../src/xqf.c:4019 msgid "Reading server lists" msgstr "Odczytywanie listy serwerów" #: ../src/xqf.c:4036 #, c-format msgid "You need at least qstat version %s for xqf to function properly" msgstr "Potrzebujesz Qstat w wersji co najmniej %s aby XQF działał prawidłowo." #: ../src/xqf.c:4040 msgid "Loading icons ..." msgstr "Ładowanie ikon ..." #: ../src/xqf.c:4046 msgid "Starting ..." msgstr "Uruchamianie ..." #: ../src/splash.c:61 msgid "XQF: Loading" msgstr "XQF: Ładowanie" #: ../src/splash.c:90 msgid "Loading ..." msgstr "Ładowanie ..." #. translator: %s = file name #: ../src/country-filter.c:220 ../src/loadpixmap.c:213 ../src/loadpixmap.c:226 #: ../src/loadpixmap.c:245 ../src/loadpixmap.c:257 #, c-format msgid "Error loading pixmap file: %s" msgstr "Błąd przy ładowaniu mapy bitowej %s" #: ../src/trayicon.c:376 ../src/trayicon.c:382 ../src/trayicon.c:390 #: ../src/trayicon.c:396 ../src/trayicon.c:410 #, c-format msgid "Error in file: %s line: %d\n" msgstr "Błąd w pliku: %s, linia: %d\n" #. translator: show main window #: ../src/trayicon.c:473 msgid "Show" msgstr "Pokaż" #. translator: hide main window #: ../src/trayicon.c:479 msgid "Hide" msgstr "Ukryj" #: ../src/trayicon.c:484 msgid "Exit" msgstr "Wyjdź" #~ msgid "XQF" #~ msgstr "XQF" #~ msgid "Install ..." #~ msgstr "Instaluj ..." #~ msgid "vm_cgame fix" #~ msgstr "vm_cgame fix" #~ msgid "Rocketarena fix" #~ msgstr "Rocketarena fix" #~ msgid "Remove from Favorites" #~ msgstr "Usuń z Ulubionych" #~ msgid "_Remove from Favorites" #~ msgstr "Usuń z Ulubionych" xqf-1.0.5/po/ru.po0000644002404400000620000015203510520643117010641 00000000000000# Russian translation of xqf. # Copyright (C) 2004 Free Software Foundation, Inc. # This file is distributed under the same license as the xqf package. # Dan Korostelev , 2004. # msgid "" msgstr "" "Project-Id-Version: xqf 0.9.14\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2006-10-28 13:56+0200\n" "PO-Revision-Date: 2004-03-28 21:24+0400\n" "Last-Translator: Dan Korostelev \n" "Language-Team: Russian\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../xqf.desktop.in.h:1 #, fuzzy msgid "Game Server Browser" msgstr "Браузер игровых серверов XQF" #: ../xqf.desktop.in.h:2 msgid "Locate and connect to game servers" msgstr "Поиск и подключение к игровым серверам" #: ../xqf.desktop.in.h:3 ../src/dialogs.c:492 msgid "XQF Game Server Browser" msgstr "Браузер игровых серверов XQF" #: ../src/addmaster.c:111 msgid "You have to specify a name and an address." msgstr "Вы должны указать имя и адрес сервера" #: ../src/addmaster.c:118 #, c-format msgid "Master address \"%s\" is not valid." msgstr "Адрес мастер-сервера \"%s\" не верен." #: ../src/addmaster.c:174 ../src/source.c:69 msgid "LAN" msgstr "ЛВС" #: ../src/addmaster.c:245 msgid "Rename Master" msgstr "Переименование мастер-сервера" #: ../src/addmaster.c:249 msgid "Add Master" msgstr "Добавление мастер-сервера" #. Master Name (Description) #: ../src/addmaster.c:263 msgid "Master Name" msgstr "Имя мастер-сервера" #. Master Address #: ../src/addmaster.c:319 msgid "Master Address" msgstr "Адрес мастер-сервера" #. Cancel Button #: ../src/addmaster.c:409 ../src/addserver.c:152 ../src/dialogs.c:421 #: ../src/filter.c:1619 ../src/filter.c:2122 ../src/game.c:1819 #: ../src/launch.c:339 ../src/pref.c:4784 ../src/psearch.c:224 #: ../src/redial.c:227 ../src/srv-prop.c:841 ../src/xqf.c:981 ../src/xqf.c:994 #: ../src/xqf.c:1867 msgid "Cancel" msgstr "Отмена" #: ../src/addserver.c:91 ../src/addserver.c:188 msgid "Add Server" msgstr "Добавление сервера" #. Server Entry #: ../src/addserver.c:102 msgid "Server:" msgstr "Адрес сервера:" #: ../src/dialogs.c:124 ../src/dialogs.c:199 ../src/dialogs.c:279 msgid "XQF: Warning!" msgstr "XQF: Внимание!" #. OK Button #. gtk_button_box_set_child_size(GTK_BUTTON_BOX(hbuttonbox1), 79, 38); #. OK Button #: ../src/dialogs.c:149 ../src/dialogs.c:410 ../src/dialogs.c:600 #: ../src/filter.c:1630 ../src/filter.c:2110 ../src/pref.c:4792 #: ../src/psearch.c:213 ../src/srv-prop.c:849 msgid "OK" msgstr "OK" #: ../src/dialogs.c:224 ../src/dialogs.c:304 ../src/filter.c:1050 #: ../src/psearch.c:398 ../src/xqf.c:957 ../src/xqf.c:969 ../src/xqf.c:1645 msgid "Yes" msgstr "Да" #: ../src/dialogs.c:236 ../src/dialogs.c:316 ../src/filter.c:1051 #: ../src/psearch.c:398 ../src/xqf.c:957 ../src/xqf.c:969 ../src/xqf.c:1645 msgid "No" msgstr "Нета" #: ../src/dialogs.c:326 ../src/xqf.c:994 msgid "Redial" msgstr "Переподключиться" #: ../src/dialogs.c:493 #, c-format msgid "Version %s" msgstr "Версия %s" #. translators can use the copyright symbol instead of (C) #: ../src/dialogs.c:496 msgid "Copyright (C) 1998-2002 Roman Pozlevich" msgstr "Copyright·(C)·1998-2002·Роман·Позлевич" #: ../src/dialogs.c:499 msgid "Maintainers:" msgstr "Сопровождающие:" #: ../src/dialogs.c:505 msgid "Contributors:" msgstr "Помогавшие:" #: ../src/dialogs.c:509 msgid "Bug reports and feature requests:" msgstr "" "Присылайте сообщения об ошибках и запросы на привнесение новых возможностей " "по адресам:" #: ../src/dialogs.c:556 msgid "About XQF" msgstr "О программе" #: ../src/dialogs.c:583 msgid "[placeholder, do not translate]" msgstr "" #: ../src/filter.c:97 msgid "Server" msgstr "серверов" #: ../src/filter.c:98 msgid "S Filter" msgstr "Фильтры серверов" #: ../src/filter.c:99 msgid "SF Cfg" msgstr "Конфигурация фильтра серверов" #: ../src/filter.c:111 msgid "Player" msgstr "игроков" #: ../src/filter.c:112 msgid "P Filter" msgstr "Фильтры игроков" #: ../src/filter.c:113 msgid "PF Cfg" msgstr "Конфигурация фильтра игроков" #: ../src/filter.c:1011 msgid "Enter filter name" msgstr "Введите имя фильтра" #: ../src/filter.c:1049 msgid "Delete server filter" msgstr "Удаление фильтра серверов" #: ../src/filter.c:1052 #, c-format msgid "Really delete server filter \"%s\"?" msgstr "Вы действительно хотите удалить фильтр \"%s\"?" #: ../src/filter.c:1257 msgid "Server Filter" msgstr "Фильтры серверов" #: ../src/filter.c:1271 ../src/flt-player.c:821 ../src/pref.c:2821 msgid "New" msgstr "Добавить" #: ../src/filter.c:1278 msgid "Rename" msgstr "Переименовать" #. FIXME: plural #: ../src/filter.c:1285 ../src/flt-player.c:827 ../src/pref.c:2829 #: ../src/xqf.c:1867 msgid "Delete" msgstr "Удалить" #: ../src/filter.c:1292 msgid "Server would pass filter if" msgstr "Условия прохождения сервером фильтрации" #. row=0..1 #. max ping #: ../src/filter.c:1313 msgid "ping is less than" msgstr "Время пинга меньше, чем" #. GAMECONTAINS Filter -- baa #. http://developer.gnome.org/doc/API/gtk/gtktable.html #: ../src/filter.c:1334 msgid "the game contains the string" msgstr "Строка названия игры содержит" #. row=1..2 #. max timeouts #: ../src/filter.c:1352 msgid "the number of retries is fewer than" msgstr "Число повторных попыток меньше, чем" #. GAMETYPE Filter -- baa #. http://developer.gnome.org/doc/API/gtk/gtktable.html #: ../src/filter.c:1371 msgid "the game type contains the string" msgstr "Строка типа игры содержит" #. row=2..3 #. not full #: ../src/filter.c:1388 msgid "it is not full" msgstr "Сервер не полон" #. Version Filter -- baa #: ../src/filter.c:1395 msgid "the version contains the string" msgstr "Строка версии содержит" #: ../src/filter.c:1414 msgid "it is not empty" msgstr "Сервер не пуст" #. Map filter #: ../src/filter.c:1423 msgid "the map contains the string" msgstr "Строка названия карты содержит" #: ../src/filter.c:1441 msgid "cheats are not allowed" msgstr "Разрешены чит-коды" #. Server name filter #: ../src/filter.c:1450 msgid "the server name contains the string" msgstr "Строка имени сервера содержит" #: ../src/filter.c:1468 msgid "no password required" msgstr "Не требуется пароль" #: ../src/filter.c:1479 ../src/filter.c:1958 msgid "Country filter:" msgstr "Фильтр стран:" #: ../src/filter.c:1520 #, fuzzy msgid "select..." msgstr "выберете..." #: ../src/filter.c:1533 #, fuzzy msgid "clear" msgstr "очистить" #: ../src/filter.c:1591 msgid "XQF: Filters" msgstr "XQF: Фильтры" #. window caption for country filter #: ../src/filter.c:1949 msgid "Configure Country Filter" msgstr "Настройки фильтра стран" #: ../src/filter.c:2091 msgid "Show all countries" msgstr "Показывать все страны" #: ../src/flt-player.c:69 ../src/flt-player.c:75 msgid "string" msgstr "строка полностью" #: ../src/flt-player.c:70 msgid "substr" msgstr "подстрока" #: ../src/flt-player.c:71 msgid "regexp" msgstr "рег.выр." #: ../src/flt-player.c:76 msgid "substring" msgstr "подстрока" #: ../src/flt-player.c:77 msgid "regular expression" msgstr "регулярное выражение" #: ../src/flt-player.c:448 ../src/psearch.c:116 msgid "XQF: Error" msgstr "XQF: Ошибка" #: ../src/flt-player.c:448 ../src/psearch.c:117 #, c-format msgid "" "Regular Expression Error!\n" "\n" "%s\n" "\n" "%s." msgstr "" "Ошибка в регулярном выражении!\n" "\n" "%s\n" "\n" "%s." #. Pattern Entry #: ../src/flt-player.c:666 ../src/flt-player.c:754 msgid "Pattern" msgstr "Шаблон имени" #. Comment #: ../src/flt-player.c:701 msgid "Pattern Comment" msgstr "Комментарий к шаблону" #: ../src/flt-player.c:754 msgid "Mode" msgstr "Режим" #: ../src/flt-player.c:760 msgid "Player Filter" msgstr "Фильтры игроков" #: ../src/flt-player.c:839 msgid "Up" msgstr "Вверх" #: ../src/flt-player.c:845 msgid "Down" msgstr "Вниз" #: ../src/game.c:212 msgid "" "Note: Soldier of Fortune will not connect to a server correctly\n" "without creating a startup script for the game. Please see the\n" "XQF documentation for more information." msgstr "" "Внимание:·Soldier·of·Fortune·не·сможет·правильно·подключиться·к·серверу·без\n" "создания·специального··файла-сценария·для·игры.··Пожалуйста,·обратитесь·к\n" "документации·XQF·для·получения·дальнейшей·информации." #: ../src/game.c:216 msgid "" "Note: Unreal Tournament will not launch correctly without\n" "modifications to the game's startup script. Please see the\n" "XQF documentation for more information." msgstr "" "Внимание:·Unreal Tournament·не·сможет·правильно·подключиться·к·серверу \n" "без модификаций файла-сценария·для·запуска игры.··Пожалуйста,·обратитесь·к\n" "документации·XQF·для·получения·дальнейшей·информации." #: ../src/game.c:220 msgid "Sample Command Line: wine hl.exe -- hl.exe -console" msgstr "Пример командной строки: wine hl.exe -- hl.exe -console" #: ../src/game.c:223 msgid "" "Note: Savage will not launch correctly without\n" "modifications to the game's startup script. Please see the\n" "XQF documentation for more information." msgstr "" "Внимание: Unreal·Tournament не сможет корректно запуститься без·\n" "модификаций·файла-сценария для запуска·игры. Пожалуйста, обратитесь к\n" "документации XQF для получения дальнейшей информации." #. %s = game name e.g. QuakeWorld #: ../src/game.c:1691 #, c-format msgid "%s command line is empty." msgstr "Командная строка %s пуста." #. directory name, game name #. %s directory, game name #: ../src/game.c:1698 ../src/game.c:1807 #, c-format msgid "" "\"%s\" is not a directory\n" "Please specify correct %s working directory." msgstr "" "\"%s\" не является каталогом\n" "Пожалуйста, укажите правильный рабочий каталог." #. game name #: ../src/game.c:1710 #, c-format msgid "Please specify correct %s working directory." msgstr "Пожалуйста, укажите корректный рабочий каталог %s" #. directory, subdirectory, game name #: ../src/game.c:1716 #, c-format msgid "" "Directory \"%s\" doesn't contain \"%s\" subdirectory.\n" "Please specify correct %s working directory." msgstr "" "Каталог \"%s\" не содержит подкаталог %s.\n" "Пожалуйста, укажите корректный рабочий каталог %s." #. %s Quake3 #: ../src/game.c:1773 #, c-format msgid "" "~/.q3a directory doesn't exist or doesn't contain\n" "\"baseq3\" (\"demoq3\") subdirectory.\n" "Please run %s client at least once before running XQF\n" "or specify correct %s working directory." msgstr "" "Каталог ~/.q3a не существует или не содержит\n" "подкаталога \"baseq3\" (\"demoq3\")\n" "Пожалуйста запустите игру %s хотя бы один раз перед запуском XQF\n" "или укажите корректный рабочий каталог %s." #. %s directory, Quake3 #: ../src/game.c:1782 #, c-format msgid "" "\"%s\" directory doesn't exist or doesn't contain \"baseq3\" (\"demoq3\") " "subdirectory.\n" "Please specify correct %s working directory\n" "or leave it empty (~/.q3a is used by default)" msgstr "" "Каталог \"%s\" не существует или не содержит подкаталога \"baseq3\" (\"demoq3" "\")\n" "Пожалуйста, укажите корректный рабочий каталог %s\n" "или оставьте поле пустым (по умолчанию будет использован ~/.q3a)" #: ../src/game.c:1819 ../src/launch.c:339 ../src/xqf.c:981 ../src/xqf.c:994 msgid "Launch" msgstr "Запуск" #. %s frontend.cfg #: ../src/game.c:1821 #, c-format msgid "" "Cannot write to file \"%s\".\n" "\n" "Launch client anyway?" msgstr "" "Невозможно произвести запись в файл \"%s\".\n" "\n" "Все равно запустить игру?" #: ../src/game.c:2448 msgid "" "The server has Punkbuster enabled but it is not going\n" "to be set on the command line.\n" "You may have problems connecting.\n" "You can fix this in the game preferences." msgstr "" "На этом сервере включен PunkBuster, но его\n" "поддержка не включена в командной строке.\n" "Возможно, у вас возникнут проблемы при подключении.\n" "Вы можете исправить это в настройках игры." #: ../src/launch.c:70 ../src/launch.c:195 msgid "XQF: ERROR!" msgstr "XQF: ОШИБКА!" #: ../src/launch.c:70 #, c-format msgid "" "ERROR!\n" "\n" "%s(%s) failed: %s" msgstr "" "ERROR!\n" "\n" "%s(%s) потерпел неудачу: %s" #: ../src/launch.c:195 #, c-format msgid "" "ERROR!\n" "\n" "%s" msgstr "" "ОШИБКА!\n" "\n" "%s" #: ../src/launch.c:340 #, c-format msgid "" "There is %s client running.\n" "\n" "Launch %s client?" msgstr "" "Запущена игра %s.\n" "\n" "Запустить %s?" #: ../src/pref.c:646 msgid "com_soundmegs and com_zonemegs must be lower than com_hunkmegs" msgstr "com_soundmegs and com_zonemegs must be lower than com_hunkmegs" #: ../src/pref.c:1232 msgid "Invalid source IP address" msgstr "" #: ../src/pref.c:1244 msgid "Invalid source port range" msgstr "" #. Top (Shirt) Color #: ../src/pref.c:1592 ../src/pref.c:1691 msgid "Top" msgstr "Верхний" #. Bottom (Pants) Color #: ../src/pref.c:1608 ../src/pref.c:1707 msgid "Bottom" msgstr "Нижний" #. Player Name #: ../src/pref.c:1854 ../src/pref.c:1965 ../src/pref.c:2025 ../src/pref.c:2077 #: ../src/xqf-ui.c:54 ../src/xqf-ui.c:129 msgid "Name" msgstr "Имя" #: ../src/pref.c:1875 ../src/xqf-ui.c:141 msgid "Colors" msgstr "Цвета" #: ../src/pref.c:1908 msgid "Login name" msgstr "Логин" #: ../src/pref.c:1950 msgid "Skin/Colors" msgstr "Шкурка и цвета" #: ../src/pref.c:1986 msgid "Team" msgstr "Команда" #: ../src/pref.c:2044 msgid "Model/Skin" msgstr "Модель и шкурка" #: ../src/pref.c:2131 msgid "--- Anything ---" msgstr "--- Что угодно ---" #: ../src/pref.c:2132 msgid "Axe" msgstr "Топор" #: ../src/pref.c:2133 msgid "Shotgun" msgstr "Ружье" #: ../src/pref.c:2134 msgid "Super Shotgun" msgstr "Супер-ружье" #: ../src/pref.c:2135 msgid "Nailgun" msgstr "Гвоздомет" #: ../src/pref.c:2136 msgid "Super Nailgun" msgstr "Супер-гвоздомет" #: ../src/pref.c:2137 msgid "Grenade Launcher" msgstr "Гранатомет" #: ../src/pref.c:2138 msgid "Rocket Launcher" msgstr "Ракетомет" #: ../src/pref.c:2139 msgid "ThunderBolt" msgstr "Электропушка" #: ../src/pref.c:2187 msgid "Use skins" msgstr "Использовать шкурки" #: ../src/pref.c:2193 msgid "Don't use skins" msgstr "Не использовать шкурки" #: ../src/pref.c:2199 msgid "Don't download new skins" msgstr "Не скачивать новые шкурки" #: ../src/pref.c:2241 msgid "You must configure a command line first" msgstr "Сначала вы должны настроить командную строку" #: ../src/pref.c:2283 msgid "Game not found" msgstr "Игра не найдена" #. %s name of a game #: ../src/pref.c:2285 #, c-format msgid "%s not found" msgstr "%s не найден" #: ../src/pref.c:2333 #, c-format msgid "" "An entry already exists for the game %s.\n" "\n" "A default entry for this game will not be added.\n" "\n" "Delete the entry and try again." msgstr "" "Для игры %s уже существует запись.\n" "\n" "Запись по умолчанию для этой игры добавлена не будет.\n" "\n" "Удалите запись и повторите попытку." #: ../src/pref.c:2375 msgid "There are no defaults for this game" msgstr "Для этой игры нет параметров по умолчанию" #: ../src/pref.c:2436 msgid "" "There is already an entry for this game.\n" "\n" "To modify it, select it from the list, modify it\n" "and then click Add/Update." msgstr "" "Для этой игры уже есть запись.\n" "\n" "Чтобы изменить ее, выберете ее из списка, модифицируйте\n" "под ваши нужды и нажмите кнопку \"Добавить/Обновить\"" #: ../src/pref.c:2440 msgid "You must enter both a game and at least one argument." msgstr "Вы должны ввести название игры и по крайней мере один параметр" #: ../src/pref.c:2539 msgid "Invoking" msgstr "Запуск" #: ../src/pref.c:2546 msgid "*** Not Implemented ***" msgstr "*** Не реализовано ***" #: ../src/pref.c:2558 msgid "Custom Args" msgstr "Особые параметры" #: ../src/pref.c:2570 msgid "Command Line" msgstr "Коммандная строка" #. translator: button for command suggestion #. translator: button for directory guess #: ../src/pref.c:2597 ../src/pref.c:2635 msgid "Suggest" msgstr "Поздсказка" #: ../src/pref.c:2603 msgid "Searches the path for the game executable" msgstr "Поиск исполняемого файла игры в каталоге" #. /// #: ../src/pref.c:2610 msgid "Working Directory" msgstr "Рабочий каталог" #: ../src/pref.c:2640 msgid "Tries to guess the working directory based on the command line" msgstr "Подобрать рабочий каталог, основываясь на значении коммандной строки" #: ../src/pref.c:2658 msgid "Custom CFG" msgstr "Особая конфигурация" #: ../src/pref.c:2763 ../src/xqf-ui.c:102 msgid "Game" msgstr "Игра" #: ../src/pref.c:2771 msgid "Arguments" msgstr "Параметры" #: ../src/pref.c:2779 msgid "Game and Arguments" msgstr "Игра и параметры" #: ../src/pref.c:2802 #, fuzzy msgid "Enter the game name from the game column" msgstr "Введите название игры из колонки игр" #: ../src/pref.c:2811 msgid "Enter the arguments separated by spaces" msgstr "Введите параметры через запятую" #: ../src/pref.c:2837 msgid "Add Defaults" msgstr "Добавить параметры по умолчанию" #: ../src/pref.c:2845 msgid "Add/Update" msgstr "Добавить/Обновить" #. Common Options #: ../src/pref.c:3000 msgid "Common Options" msgstr "Общие настройки" #: ../src/pref.c:3011 msgid "Disable CD Audio" msgstr "Отключить CD-музыку" #. Disable Sound #: ../src/pref.c:3019 msgid "Disable Sound" msgstr "Отключить звук" #: ../src/pref.c:3043 msgid "Do not set (use game default)" msgstr "Не устанавливать (использовать настройки игры)" #: ../src/pref.c:3044 msgid "Automatically calculate from server ping time" msgstr "Посчитать автоматически, основываясь на времени пинга до сервера" #: ../src/pref.c:3045 msgid "Fixed value" msgstr "Фиксированное значение" #: ../src/pref.c:3113 msgid "Masterserver Protocol Version" msgstr "Версия протокола мастер-сервера" #: ../src/pref.c:3136 msgid "set fs_game on connect" msgstr "set fs_game on connect" #: ../src/pref.c:3145 msgid "set cl_punkbuster on connect" msgstr "set cl_punkbuster on connect" #: ../src/pref.c:3154 #, fuzzy msgid "enable console" msgstr "Включить звуки" #: ../src/pref.c:3216 msgid "Pass memory settings on command line" msgstr "Передавать установки памяти в командную строку" #. Mega Byte #: ../src/pref.c:3234 ../src/pref.c:3257 ../src/pref.c:3280 ../src/pref.c:3304 msgid "MB" msgstr "MB" #: ../src/pref.c:3238 msgid "com_hunkmegs" msgstr "com_hunkmegs" #: ../src/pref.c:3261 msgid "com_zonemegs" msgstr "com_zonemegs" #: ../src/pref.c:3284 msgid "com_soundmegs" msgstr "com_soundmegs" #: ../src/pref.c:3308 msgid "cg_precachedmodels" msgstr "cg_precachedmodels" #: ../src/pref.c:3317 msgid "Preset values" msgstr "Предустановленные значениея" #: ../src/pref.c:3324 msgid "Default" msgstr "По умолчанию" #: ../src/pref.c:3330 msgid "128MB" msgstr "128MB" #: ../src/pref.c:3336 msgid ">256MB" msgstr "больше 256MB" #: ../src/pref.c:3355 ../src/pref.c:3584 ../src/pref.c:3590 msgid "Options" msgstr "Настройки" #: ../src/pref.c:3358 msgid "Memory" msgstr "Память" #. QW Specific Features #. 'w_switch' & 'b_switch' control #: ../src/pref.c:3387 msgid "The highest weapon that Quake should switch to..." msgstr "Лучше оружие, на которое Quake должен переключиться" #: ../src/pref.c:3400 msgid "upon a weapon pickup" msgstr "После взятия оружия" #: ../src/pref.c:3418 msgid "upon a backpack pickup" msgstr "После взятия рюкзака" #: ../src/pref.c:3439 msgid "Disable auto-aiming" msgstr "Выключить авто-прицеливание" #: ../src/pref.c:3477 msgid "Skins" msgstr "Шкурки" #: ../src/pref.c:3499 msgid "Rate" msgstr "Частота пакетов" #. 'pushlatency' #: ../src/pref.c:3523 msgid "pushlatency" msgstr "Задержка движенияа" #. Troubleshooting #: ../src/pref.c:3538 msgid "Troubleshooting" msgstr "Устранение проблем" #: ../src/pref.c:3551 msgid "Disable delta-compression (cl_nodelta)" msgstr "Отключить дельта-компрессию (cl_nodelta)" #: ../src/pref.c:3565 msgid "Disable player/entity prediction (cl_predict_players)" msgstr "" "Отключить предугадывание движения игроков/обьектов (cl_predict_players)" #: ../src/pref.c:3583 msgid "Weapons" msgstr "Оружие" #: ../src/pref.c:3585 ../src/pref.c:3591 ../src/pref.c:3596 ../src/pref.c:3601 msgid "Player Profile" msgstr "Профиль игрока" #: ../src/pref.c:3677 msgid "Icons" msgstr "Значки" #: ../src/pref.c:3677 msgid "Text" msgstr "Текст" #: ../src/pref.c:3677 msgid "Both" msgstr "Вместе" #: ../src/pref.c:3683 msgid "Server List" msgstr "Список серверов" #: ../src/pref.c:3696 msgid "Show host names" msgstr "Показывать имена хостов" #: ../src/pref.c:3701 msgid "Show hostnames instead of IP addresses if possible" msgstr "Показывать имена хостов вместо IP-адресов, если это возможно" #: ../src/pref.c:3712 msgid "Show default port" msgstr "Показывать порт по умолчанию" #: ../src/pref.c:3727 msgid "Do not count bots as players" msgstr "Не считать ботов игроками" #: ../src/pref.c:3743 msgid "Sort servers real-time during refresh" msgstr "Производить сортировку списка серверов сразу при освежении" #: ../src/pref.c:3758 msgid "Refresh on update" msgstr "" "Производить освежение информации о серверах при обновлении списка серверов" #: ../src/pref.c:3774 msgid "Resolve hostnames on update" msgstr "Проверять имена хостов по при обновлении списка серверов" #: ../src/pref.c:3778 msgid "Enable or disable DNS resolution of IP addresses" msgstr "Проверка IP-адресов по DNS" #: ../src/pref.c:3792 msgid "Show only configured games" msgstr "Показывать только настроенные игры" #: ../src/pref.c:3808 msgid "Use custom color settings" msgstr "" #: ../src/pref.c:3810 msgid "" "Use XQF's color settings instead of the system ones. You need to restart XQF " "for this setting to take effect. Note that you may need to install the gtk-" "engines package." msgstr "" #. Toolbar #: ../src/pref.c:3831 msgid "Toolbar" msgstr "Панель инструментов" #. Toolbar Tips #: ../src/pref.c:3856 msgid "Tooltips" msgstr "Подсказки" #. On Startup #: ../src/pref.c:3899 msgid "On Startup" msgstr "При запуске" #: ../src/pref.c:3912 msgid "Refresh Favorites" msgstr "Освежить избранные" #: ../src/pref.c:3925 msgid "Show splash screen" msgstr "Показать заставку" #: ../src/pref.c:3939 msgid "Scan for maps" msgstr "Произвести поиск карт" #: ../src/pref.c:3944 msgid "" "Scan game directories for installed maps. xqf will take longer to start up " "when enabled." msgstr "" "Сканировать каталоги игр на наличие установленых карт. При включении этой " "опции XQF будет дольше запускаться." #: ../src/pref.c:3951 msgid "scan now" msgstr "Сканировать сейчас" #: ../src/pref.c:3967 msgid "Minimize to system tray" msgstr "" #: ../src/pref.c:3971 msgid "Enable xqf tray icon. You need to restart xqf for this to take effect." msgstr "" #. On Exit #: ../src/pref.c:3984 msgid "On Exit" msgstr "При выходе" #: ../src/pref.c:3997 msgid "Save server lists" msgstr "Сохранить списки серверов" #: ../src/pref.c:4012 msgid "Save server information" msgstr "Сохранить информацию о серверах" #: ../src/pref.c:4029 msgid "Save player information" msgstr "Сохранить информацию об игроках" #. When launching a Game #: ../src/pref.c:4045 msgid "When launching a game..." msgstr "При запуске игры" #: ../src/pref.c:4059 msgid "Terminate XQF" msgstr "Выйти из XQF" #: ../src/pref.c:4074 msgid "Iconify XQF window" msgstr "Свернуть окно XQF" #: ../src/pref.c:4089 msgid "Create LaunchInfo.txt" msgstr "Создать файл LaunchInfo.txt" #: ../src/pref.c:4095 msgid "" "Creates the file ~/.qf/LaunchInfo.txt with: ping ip:port name map curplayers " "maxplayers" msgstr "" "Создать файл ~/.qf/LaunchInfo.txt с информации о пинге, ip-адресе, имени " "сервера, текущей карте, количестве игроков и максимальном количестве игроков." #: ../src/pref.c:4101 msgid "Execute prelaunch" msgstr "Запустить файл PreLaunch" #: ../src/pref.c:4107 msgid "Executes ~/.qf/PreLaunch (if it exists) before launching the game" msgstr "" "Если существует файл ~/.qf/Prelaunch, запустить его перед запуском игры." #: ../src/pref.c:4116 msgid "Stop current song in XMMS" msgstr "Остановить текущую песню в XMMS" #: ../src/pref.c:4119 msgid "" "Stopping XMMS will release /dev/dsp. Activate this option if you use XMMS " "and have a cheap soundcard that allows only one application to open /dev/dsp." msgstr "" "Остановка XMMS освободит устройство /dev/dsp. Включите эту опцию, если вы " "используете XMMSи у вас установлена недорогая звуковая карта, не " "позволяющаяя использовать /dev/dsp нескольким приложениям одновременно." #. QStat preferences -- maxsimultaneous & maxretries #: ../src/pref.c:4158 msgid "QStat Options" msgstr "Настройки QStat" #. maxsimultaneous #: ../src/pref.c:4169 msgid "Number of simultaneous servers to query" msgstr "Количество опрашиваемых одновременно серверов" #. maxretries #: ../src/pref.c:4193 msgid "Number of retries" msgstr "Количество повторных попыток" #. srcip #: ../src/pref.c:4212 #, fuzzy msgid "Source IP Address" msgstr "IP-адрес:" #: ../src/pref.c:4233 msgid "Source Port Range" msgstr "" #. Translator: sound test button #: ../src/pref.c:4296 msgid "Test" msgstr "Тест" #. Sound Enable / Disable frame #. Sounds Enable / Disable #: ../src/pref.c:4313 msgid "Sound Enable / Disable" msgstr "Включить/выключить звук" #: ../src/pref.c:4327 msgid "Enable Sound" msgstr "Включить звуки" #. Sound Player #: ../src/pref.c:4338 msgid "Player program" msgstr "Программа-воспроизведения" #. Sound Files frame #. Sounds preferences -- player and various sounds #: ../src/pref.c:4366 msgid "Sound Files" msgstr "Файлы звуков" #. Sound XQF Start #: ../src/pref.c:4378 msgid "XQF Start" msgstr "Запуск XQF" #. Sound XQF Quit #: ../src/pref.c:4410 msgid "XQF Quit" msgstr "Выход из XQF" #. Sound Update Done #: ../src/pref.c:4442 msgid "Update Done" msgstr "Завершение обновления списков" #. Sound Refresh Done #: ../src/pref.c:4475 msgid "Refresh Done" msgstr "Завершение освежения информации" #. Sound Stop #: ../src/pref.c:4508 ../src/xqf.c:3071 ../src/trayicon.c:462 msgid "Stop" msgstr "Остановить" #. Sound Server Connect #: ../src/pref.c:4541 msgid "Server Connect" msgstr "Подключение к серверу" #. Sound Redial Success Start #: ../src/pref.c:4574 msgid "Redial Success" msgstr "Успешное переподключение" #: ../src/pref.c:4702 msgid "XQF: Preferences" msgstr "XQF: Настройки" #: ../src/pref.c:4722 msgid "General" msgstr "Общие" #: ../src/pref.c:4734 msgid "Games" msgstr "Игры" #: ../src/pref.c:4739 msgid "Appearance" msgstr "Внешний вид" #: ../src/pref.c:4744 msgid "QStat" msgstr "QStat" #: ../src/pref.c:4749 msgid "Sounds" msgstr "Звуки" #: ../src/pref.c:4754 msgid "Scripts" msgstr "" #: ../src/pref.c:4895 msgid "Unable to get user name/home/tmpdir" msgstr "\t" #. translator: %s = game name, e.g. Quake 3 Arena #: ../src/pref.c:5227 #, c-format msgid "Searching for %s maps" msgstr "Поиск карт для %s" #: ../src/pref.c:5281 msgid "Game Command Selection" msgstr "Выбор исполняемого файла игры" #: ../src/pref.c:5290 msgid "Game Directory Selection" msgstr "Выбор рабочего каталога игры" #: ../src/pref.c:5295 msgid "Sound Player Selection" msgstr "Выбор программы воспроизведения" #: ../src/pref.c:5300 msgid "XQF Start Sound Selection" msgstr "Выбор звука запуска XQF" #: ../src/pref.c:5305 msgid "XQF Quit Sound Selection" msgstr "Выбор звука выхода из XQF" #: ../src/pref.c:5310 msgid "Update Done Sound Selection" msgstr "Выбор звука завершения обновления списков" #: ../src/pref.c:5315 msgid "Refresh Done Sound Selection" msgstr "Выбор звука завершения освежения информации" #: ../src/pref.c:5320 msgid "Stop Sound Selection" msgstr "Выбор звука остановки" #: ../src/pref.c:5325 msgid "Server Connect Sound Selection" msgstr "Выбор звука подключения к серверу" #: ../src/pref.c:5330 msgid "Redial Success Sound Selection" msgstr "Выбор звука успешного переподключения" #: ../src/psearch.c:51 msgid "Exact Match" msgstr "Точное соответствие" #: ../src/psearch.c:52 msgid "Substring" msgstr "Подстрока" #: ../src/psearch.c:53 msgid "Regular Expression" msgstr "Регулярное выражение" #: ../src/psearch.c:174 msgid "Find Player" msgstr "Поиск игрока" #. Pattern Entry #: ../src/psearch.c:185 msgid "Find Player:" msgstr "Найти:" #: ../src/psearch.c:394 msgid "Player not found." msgstr "Игрок не найден." #: ../src/psearch.c:398 msgid "XQF: End of server list reached" msgstr "XQF: Достигнут конец списка серверов" #: ../src/psearch.c:399 msgid "Continue search from beginning?" msgstr "Продолжить поиск с начала?" #. Message #: ../src/rcon.c:550 msgid "Cmd:" msgstr "Команда" #. Send Button #: ../src/rcon.c:577 msgid "Send" msgstr "Послать" #. Status Button #: ../src/rcon.c:586 msgid "Status" msgstr "Статус" #. Clear Button #: ../src/rcon.c:595 msgid "Clear" msgstr "Очистить" #: ../src/rcon.c:617 ../src/statistics.c:849 msgid "Close" msgstr "Закрыть" #: ../src/rcon.c:717 #, c-format msgid "Usage: %s [server type] \n" msgstr "Использование: %s [тип сервера] <порт>\n" #: ../src/rcon.c:718 #, fuzzy, c-format msgid " server type is either --qws, --hws, --hls or --dm3s.\n" msgstr " server type может быть только --qws, --hws или --hls.\n" #: ../src/rcon.c:719 #, c-format msgid " If no server type is specified, Q3 style rcon is assumed.\n" msgstr "" " Если тип сервера не указан, предполагается использования RCon в стиле " "Quake3.\n" #. translator: readline prompt #: ../src/rcon.c:756 msgid "Password: " msgstr "Пароль:" #: ../src/redial.c:123 #, c-format msgid "" "Waiting for free slots on\n" "%s" msgstr "" "Ожидание свободных мест на\n" "%s" #: ../src/redial.c:125 #, c-format msgid "" "Refreshing\n" "%s" msgstr "" "Освежение\n" "%s" #. * window code modified from glade #: ../src/redial.c:179 ../src/redial.c:184 msgid "XQF: Redialing" msgstr "XQF: Переподключение" #: ../src/redial.c:196 msgid "" "***\n" "***" msgstr "" "***\n" "***" #: ../src/redial.c:219 msgid "Launch now" msgstr "Запустить сейчас" #: ../src/source.c:66 msgid "Standard" msgstr "Обычный" #: ../src/source.c:67 msgid "Gamespy" msgstr "GameSpy" #: ../src/source.c:68 msgid "http" msgstr "HTTP" #: ../src/source.c:70 msgid "File" msgstr "Файл" #: ../src/source.c:122 msgid "Retry" msgstr "Повтор" #: ../src/source.c:122 #, fuzzy msgid "Skip" msgstr "Пропуск" #: ../src/source.c:123 #, c-format msgid "" "Cannot write to file %s\n" "System Error: %s\n" msgstr "" "Запись в файл %s невозможна\n" "Ошибка системы: %s\n" #. translator: %s == url, eg gmaster://bla.blub.org #: ../src/source.c:891 #, c-format msgid "You have to specify a port number for %s." msgstr "Вы должны указать номер порта для %s." #: ../src/source.c:905 #, c-format msgid "'gsmtype' options missing for master %s." msgstr "" #: ../src/source.c:1439 msgid "Favorites" msgstr "Избранные" #: ../src/srv-prop.c:423 msgid "IP Address:" msgstr "IP-адрес:" #: ../src/srv-prop.c:433 msgid "Port:" msgstr "Порт:" #: ../src/srv-prop.c:447 msgid "Host Name:" msgstr "Имя хоста:" #: ../src/srv-prop.c:461 msgid "Country:" msgstr "Страна:" #: ../src/srv-prop.c:489 msgid "Refreshed:" msgstr "Обновлен:" #. translator: last time and date the server answered the query #: ../src/srv-prop.c:507 msgid "Last answer:" msgstr "Последний раз отвечал:" #: ../src/srv-prop.c:564 msgid "Reserved Slots:" msgstr "Зарезервированные места:" #. Sources #: ../src/srv-prop.c:583 msgid "Sources" msgstr "Источники" #: ../src/srv-prop.c:635 msgid "Custom CFG:" msgstr "Особая конфигурация" #: ../src/srv-prop.c:684 msgid "Server Password" msgstr "Пароль для входа на сервер" #: ../src/srv-prop.c:690 msgid "Spectator Password" msgstr "Пароль наблюдатель" #: ../src/srv-prop.c:697 msgid "RCon/Admin Password" msgstr "Пароль администратора" #: ../src/srv-prop.c:728 msgid "This server sucks" msgstr "Это плохой сервер" #: ../src/srv-prop.c:771 ../src/xqf.c:2603 ../src/xqf.c:2741 msgid "Properties" msgstr "Изменить свойства" #: ../src/srv-prop.c:816 msgid "Info" msgstr "Информация" #: ../src/srv-prop.c:821 msgid "Passwords" msgstr "Пароли" #: ../src/srv-prop.c:826 msgid "Comment" msgstr "Комментарий" #: ../src/stat.c:728 msgid "Allies" msgstr "Союзники" #: ../src/stat.c:728 msgid "Axis" msgstr "" #: ../src/stat.c:734 msgid "Red" msgstr "Красный" #: ../src/stat.c:734 msgid "Blue" msgstr "Синий" #: ../src/stat.c:1376 #, c-format msgid "" "UT2004 CD Key not found, cannot query master '%s'.\n" "Make sure the working directory is set correctly." msgstr "" #: ../src/stat.c:1559 #, c-format msgid "Failed to create a temporary file %s: %s" msgstr "Невозможно создать временный файл %s: %s" #. The space behind up and down is to make the strings different from #. those in flt-player.c because their meaning is different in german #: ../src/statistics.c:82 ../src/statistics.c:93 msgid "Servers" msgstr "Серверы" #: ../src/statistics.c:82 msgid "Up " msgstr "Работают" #: ../src/statistics.c:82 msgid "Timeout" msgstr "Тайм-аут\t" #: ../src/statistics.c:82 msgid "Down " msgstr "Не работают" #: ../src/statistics.c:82 msgid "Info n/a" msgstr "Информация недоступна" #: ../src/statistics.c:82 ../src/statistics.c:504 ../src/xqf-ui.c:88 msgid "Players" msgstr "Игроки" #: ../src/statistics.c:86 ../src/statistics.c:90 msgid "unknown" msgstr "Неизвестно" #: ../src/statistics.c:94 msgid "OS/CPU" msgstr "ОС/Процессор" #: ../src/statistics.c:95 ../src/xqf-ui.c:65 #, fuzzy msgid "Country" msgstr "Страна:" #: ../src/statistics.c:450 ../src/statistics.c:498 ../src/statistics.c:503 msgid "Total" msgstr "Всего" #: ../src/statistics.c:493 msgid "CPU \\ OS" msgstr "Процессор \\ ОС" #: ../src/statistics.c:721 #, fuzzy msgid "All Games" msgstr "Игры" #: ../src/statistics.c:803 ../src/statistics.c:812 msgid "Statistics" msgstr "Статистика" #. error converting time to string representation, shouldn't happen #: ../src/utils.c:903 msgid "" msgstr "" #: ../src/utils.c:1126 msgid "Can't open source file for reading" msgstr "" #: ../src/utils.c:1133 msgid "Can't open destination file for writing" msgstr "" #: ../src/utils.c:1141 msgid "write error on destination file" msgstr "" #: ../src/utils.c:1148 msgid "read error on source file" msgstr "" #: ../src/xqf-ui.c:58 #, fuzzy msgid "Type" msgstr "Тип игры" #: ../src/xqf-ui.c:61 msgid "Address" msgstr "Адрес" #: ../src/xqf-ui.c:68 ../src/xqf-ui.c:153 msgid "Ping" msgstr "Пинг" #: ../src/xqf-ui.c:74 msgid "TO" msgstr "" #: ../src/xqf-ui.c:80 msgid "Priv" msgstr "Частный" #. Translator: "PunkBuster" #: ../src/xqf-ui.c:85 msgid "PB" msgstr "" #. Translator: Max as in max players #: ../src/xqf-ui.c:93 #, fuzzy msgid "Max" msgstr "Карта" #: ../src/xqf-ui.c:96 msgid "Map" msgstr "Карта" #: ../src/xqf-ui.c:108 msgid "GameType" msgstr "Тип игры" #: ../src/xqf-ui.c:135 msgid "Frags" msgstr "Очки" #: ../src/xqf-ui.c:147 msgid "Skin" msgstr "Шкурка" #: ../src/xqf-ui.c:159 msgid "Time" msgstr "Время игры" #: ../src/xqf-ui.c:179 msgid "Rule" msgstr "Правило" #: ../src/xqf-ui.c:185 msgid "Value" msgstr "Значение" #: ../src/xqf-ui.c:575 msgid "Source" msgstr "Источник" #: ../src/xqf.c:349 #, c-format msgid "%d server" msgstr "%d серверов" #: ../src/xqf.c:349 #, c-format msgid "%d servers" msgstr "%d серверов" #. server filter #: ../src/xqf.c:597 #, c-format msgid "None <--" msgstr "Нет <--" #: ../src/xqf.c:599 ../src/xqf.c:3201 ../src/xqf.c:3258 ../src/xqf.c:3403 #, c-format msgid "None" msgstr "Нет" #: ../src/xqf.c:613 #, c-format msgid "Filter %d <--" msgstr "Фильтр %d <--" #: ../src/xqf.c:615 #, c-format msgid "Filter %d" msgstr "Фильтр %d" #: ../src/xqf.c:637 #, c-format msgid "No Server Filter Active" msgstr "Все фильтры серверов выключены" #: ../src/xqf.c:644 #, c-format msgid "Server Filter: %s" msgstr "Фильтр серверов: %s" #: ../src/xqf.c:648 #, c-format msgid "Server Filter: %d" msgstr "Фильтр серверов: %d" #: ../src/xqf.c:815 msgid "Updating lists..." msgstr "Обновление списков..." #: ../src/xqf.c:821 #, c-format msgid "Resolving host names: %d/%d" msgstr "Проверка имен хостов: %d/%d" #: ../src/xqf.c:825 #, c-format msgid "Refreshing: %d/%d" msgstr "Освежение информации: %d/%d" #: ../src/xqf.c:831 #, c-format msgid "Resolving host addresses: %d/%d" msgstr "Проверка адресов хостов: %d/%d" #: ../src/xqf.c:958 msgid "" "You said this servers sucks.\n" "Do you want to risk a game this time?" msgstr "" "Вы указали, что это плохой сервер.\n" "Хотите рискнуть поиграть на нем сейчас?" #: ../src/xqf.c:970 #, c-format msgid "" "This server is not compatible with the version of %s you have installed.\n" "Launch client anyway?" msgstr "" #: ../src/xqf.c:982 #, c-format msgid "" "Server %s:%d is %s.\n" "\n" "Launch client anyway?" msgstr "" "Сервер %s:%d %s\n" "\n" "Все равно запустить игру?" #: ../src/xqf.c:995 #, c-format msgid "" "Server %s:%d is full.\n" "\n" "Launch client anyway?" msgstr "" "Сервер %s %d уже полон.\n" "\n" "Все равно запустить игру?" #: ../src/xqf.c:1108 ../src/xqf.c:1128 ../src/xqf.c:2003 msgid "Save Password" msgstr "Сохранить пароль" #: ../src/xqf.c:1108 msgid "Spectator Password:" msgstr "Пароль наблюдателя:" #: ../src/xqf.c:1128 ../src/xqf.c:2003 msgid "Server Password:" msgstr "Пароль сервера:" #: ../src/xqf.c:1279 msgid "Spectator" msgstr "Наблюдатель" #: ../src/xqf.c:1280 ../src/xqf.c:1283 msgid "Demo name:" msgstr "Название Демо:" #: ../src/xqf.c:1525 #, c-format msgid "Host %s not found" msgstr "Хост %s не найден" #: ../src/xqf.c:1545 ../src/xqf.c:3815 #, c-format msgid "\"%s\" is not valid host[:port] combination." msgstr "\"%s\" не является верной комбинацией хост[:порт]." #: ../src/xqf.c:1646 #, fuzzy msgid "Remove selected servers from all lists?" msgstr "Освежить иформацию о выбранных серверах" #. translator: %s == url #: ../src/xqf.c:1791 #, c-format msgid "" "For Gslist support you must install the 'gslist' program available from\n" "%s\n" "Don't forget that you need to run 'gslist -u' before you can use it." msgstr "" #: ../src/xqf.c:1862 msgid "You have to select the server you want to delete" msgstr "Вы должны выбрать сервер, который хотите удалить." #: ../src/xqf.c:1868 #, c-format msgid "" "Master%s to delete:\n" "\n" "%s" msgstr "Следующие мастер-серверы будут удалены" #: ../src/xqf.c:1891 #, c-format msgid "Find Player: %s" msgstr "Поиск игрока: %s" #: ../src/xqf.c:1983 msgid "Done." msgstr "Сделано." #: ../src/xqf.c:2525 ../src/xqf.c:3081 msgid "Connect" msgstr "Подключиться" #: ../src/xqf.c:2530 ../src/xqf.c:3090 msgid "Observe" msgstr "Наблюдать" #: ../src/xqf.c:2535 ../src/xqf.c:3098 msgid "Record Demo" msgstr "Записать Демо" #: ../src/xqf.c:2549 msgid "Add new Server" msgstr "Добавить новый сервер..." #: ../src/xqf.c:2554 msgid "Add to Favorites" msgstr "Добавить в избранные" #: ../src/xqf.c:2559 #, fuzzy msgid "Remove" msgstr "Переименовать" #: ../src/xqf.c:2564 ../src/xqf.c:2613 msgid "Copy" msgstr "Скопировать адрес" #: ../src/xqf.c:2569 msgid "Copy+" msgstr "Cкопировать информацию" #: ../src/xqf.c:2577 ../src/xqf.c:3055 ../src/trayicon.c:452 msgid "Refresh" msgstr "Освежить" #: ../src/xqf.c:2582 msgid "Refresh Selected" msgstr "Освежить выбранное" #: ../src/xqf.c:2590 msgid "DNS Lookup" msgstr "Проверить по DNS" #: ../src/xqf.c:2598 msgid "RCon" msgstr "Удаленное управление" #: ../src/xqf.c:2621 msgid "_Statistics" msgstr "_Статистика..." #: ../src/xqf.c:2629 msgid "_Exit" msgstr "Вы_ход" #: ../src/xqf.c:2640 ../src/xqf.c:2705 msgid "Add _Master" msgstr "Добавить _мастер-сервер..." #: ../src/xqf.c:2645 ../src/xqf.c:2710 msgid "_Rename Master" msgstr "Пе_реименовать мастер-сервер" #: ../src/xqf.c:2650 ../src/xqf.c:2715 msgid "D_elete Master" msgstr "Удалить маст_ер-сервер" #: ../src/xqf.c:2655 ../src/xqf.c:2720 #, fuzzy msgid "_Clear Servers" msgstr "Серверы" #: ../src/xqf.c:2665 ../src/xqf.c:2825 msgid "_Add new Server" msgstr "Доб_авить новый сервер..." #: ../src/xqf.c:2670 ../src/xqf.c:2830 msgid "Add to _Favorites" msgstr "Добавить в _избранне" #: ../src/xqf.c:2675 ../src/xqf.c:2835 #, fuzzy msgid "_Remove" msgstr "Переименовать" #: ../src/xqf.c:2680 msgid "_Copy" msgstr "_Скопировать адрес" #: ../src/xqf.c:2685 msgid "_Copy+" msgstr "С_копировать информацию" #: ../src/xqf.c:2693 msgid "Add Default Masters" msgstr "Добавить мастер-серверы по умолчанию" #: ../src/xqf.c:2699 #, fuzzy msgid "Add Gslist Masters" msgstr "Добавить мастер-серверы по умолчанию" #: ../src/xqf.c:2728 msgid "_Find Player" msgstr "_Найти игрока..." #: ../src/xqf.c:2733 msgid "Find A_gain" msgstr "Найти след_ующего" #: ../src/xqf.c:2751 msgid "_Refresh" msgstr "_Освежить" #: ../src/xqf.c:2756 msgid "Refresh _Selected" msgstr "Освежить _выбранное" #: ../src/xqf.c:2761 msgid "_Update From Master" msgstr "Обновить _списки" #: ../src/xqf.c:2769 msgid "Show _Host Names" msgstr "Показывать имя _хоста" #: ../src/xqf.c:2774 msgid "Show Default _Port" msgstr "Показывать основной _порт" #: ../src/xqf.c:2800 msgid "_Connect" msgstr "Под_ключиться" #: ../src/xqf.c:2805 msgid "_Observe" msgstr "_Наблюдатель" #: ../src/xqf.c:2810 msgid "Record _Demo" msgstr "Записать _Демо" #: ../src/xqf.c:2841 msgid "DNS _Lookup" msgstr "_Проверить по DNS" #: ../src/xqf.c:2849 msgid "_RCon" msgstr "Удаленное уп_равление" #: ../src/xqf.c:2854 msgid "_Properties" msgstr "_Изменить свойства" #: ../src/xqf.c:2864 msgid "_General" msgstr "_Общие" #: ../src/xqf.c:2870 msgid "_Games" msgstr "_Игры" #: ../src/xqf.c:2876 msgid "_Appearance" msgstr "_Внешний вид" #: ../src/xqf.c:2882 #, fuzzy msgid "_QStat" msgstr "QStat" #: ../src/xqf.c:2888 #, fuzzy msgid "_Sounds" msgstr "Звуки" #: ../src/xqf.c:2894 msgid "S_cripts" msgstr "" #: ../src/xqf.c:2904 msgid "_Server Filter" msgstr "Фильтры _серверов" #: ../src/xqf.c:2909 msgid "Player _Filter" msgstr "_Фильтры игроков" #: ../src/xqf.c:2919 msgid "_About" msgstr "_О программе" #: ../src/xqf.c:2930 msgid "_File" msgstr "_Файл" #: ../src/xqf.c:2935 msgid "_Edit" msgstr "_Правка" #: ../src/xqf.c:2940 msgid "_View" msgstr "_Вид" #: ../src/xqf.c:2945 msgid "_Server" msgstr "_Сервер" #: ../src/xqf.c:2950 msgid "_Preferences" msgstr "_Настройки" #: ../src/xqf.c:2956 msgid "_Server Filters" msgstr "Фильтр _серверов" #: ../src/xqf.c:2962 msgid "_Help" msgstr "_Справка" #: ../src/xqf.c:3005 msgid "Mark as Red" msgstr "Пометить красным" #: ../src/xqf.c:3012 msgid "Mark as Green" msgstr "Пометить зеленым" #: ../src/xqf.c:3019 msgid "Mark as Blue" msgstr "Пометить синим" #: ../src/xqf.c:3026 msgid "Add to Player Filter" msgstr "Добавить к фильтрам игроков" #: ../src/xqf.c:3047 ../src/trayicon.c:457 msgid "Update" msgstr "Обновить списки" #: ../src/xqf.c:3047 msgid "Update from master" msgstr "Обновить списки серверов с мастер-сервера" #: ../src/xqf.c:3055 msgid "Refresh current list" msgstr "Освежить информацию о всех серверах в текущем списке" #: ../src/xqf.c:3063 msgid "Ref.Sel." msgstr "Осв. выбранное" #: ../src/xqf.c:3063 msgid "Refresh selected servers" msgstr "Освежить иформацию о выбранных серверах" #: ../src/xqf.c:3098 #, fuzzy msgid "Record" msgstr "Запись" #. Translators: e.g. Server Filter #: ../src/xqf.c:3116 #, c-format msgid "%s Filter Enable / Disable" msgstr "Включить/выключить фильтры %s" #. Translators: e.g. Server Filter Configuration #: ../src/xqf.c:3138 #, c-format msgid "%s Filter Configuration" msgstr "Конфигурация фильтра %s" #: ../src/xqf.c:3240 msgid "Configure" msgstr "Настроить" #: ../src/xqf.c:3383 msgid "Filters" msgstr "Фильтры" #: ../src/xqf.c:3552 #, fuzzy msgid "Quick Filter:" msgstr "Фильтры серверов" #: ../src/xqf.c:3729 #, fuzzy msgid "no sound player configured" msgstr "Показывать только настроенные игры" #: ../src/xqf.c:3767 msgid "" "Usage:\n" "\txqf [OPTIONS]\n" "\n" "OPTIONS:\n" "\t--launch \"[SERVERTYPE] IP\"\tlaunch game on specified server\n" "\t--add \"[SERVERTYPE] IP\"\tadd specified server to favorites\n" "\t--debug \t\t\tset debug level\n" "\t--version\t\t\tprint version and exit\n" msgstr "" "Использование:\n" "\txqf [ОПЦИИ]\n" "\n" "\t--launch \"[ТИПСЕРВЕРА] IP-адрес\"\tзапустить игру на указанном сервере\n" "\t--add \"[ТИПСЕРВЕРА] IP-адрес\"\tдобавить указанный сервер в избранные\n" "\t--debug <уровень>\t\t\tустановить уровень отладки\n" "\t--version\t\t\t\tвывести версию программы и выйти\n" #: ../src/xqf.c:4019 msgid "Reading server lists" msgstr "Чтение списков серверов" #: ../src/xqf.c:4036 #, c-format msgid "You need at least qstat version %s for xqf to function properly" msgstr "Вам необходимо иметь QStat версии %s, чтобы XQF работал корректно" #: ../src/xqf.c:4040 #, fuzzy msgid "Loading icons ..." msgstr "Загрузка..." #: ../src/xqf.c:4046 msgid "Starting ..." msgstr "Запуск..." #: ../src/splash.c:61 msgid "XQF: Loading" msgstr "XQF: Загрузка" #: ../src/splash.c:90 msgid "Loading ..." msgstr "Загрузка..." #. translator: %s = file name #: ../src/country-filter.c:220 ../src/loadpixmap.c:213 ../src/loadpixmap.c:226 #: ../src/loadpixmap.c:245 ../src/loadpixmap.c:257 #, c-format msgid "Error loading pixmap file: %s" msgstr "" #: ../src/trayicon.c:376 ../src/trayicon.c:382 ../src/trayicon.c:390 #: ../src/trayicon.c:396 ../src/trayicon.c:410 #, c-format msgid "Error in file: %s line: %d\n" msgstr "" #. translator: show main window #: ../src/trayicon.c:473 msgid "Show" msgstr "" #. translator: hide main window #: ../src/trayicon.c:479 msgid "Hide" msgstr "" #: ../src/trayicon.c:484 #, fuzzy msgid "Exit" msgstr "Вы_ход" #~ msgid "XQF" #~ msgstr "XQF" #~ msgid "Generic Gamespy" #~ msgstr "Обычный сервер системы GameSpy" #~ msgid "" #~ "Note: You need to create a qstat config file for this game to work.\n" #~ "Please see the XQF documentation for more information." #~ msgstr "" #~ "Внимание: Вам необходимо создать файл конфигурации QStat, чтобы эта игра " #~ "работала.\n" #~ "Пожалуйста, обратитесь к документации XQF для получения дальнейшей " #~ "информации." #~ msgid "Guess" #~ msgstr "Подобрать" #~ msgid "vm_cgame fix" #~ msgstr "vm_cgame fix" #~ msgid "Rocketarena fix" #~ msgstr "Исправление для Rocketarena" #~ msgid "QuakeForge workaround (uses base/ instead of id1/)" #~ msgstr "" #~ "Учет особенностей QuakeForge (использование каталога base/ вместо id1/)" #~ msgid "OS" #~ msgstr "ОС" #~ msgid "Remove from Favorites" #~ msgstr "Удалить из избранных" #~ msgid "_Remove from Favorites" #~ msgstr "_Удалить из избранных" #~ msgid "_QStat Options" #~ msgstr "_QStat" #~ msgid "_Sound Options" #~ msgstr "_Звук" xqf-1.0.5/po/POTFILES.in0000644002404400000620000000115210145416362011424 00000000000000# List of source files containing translatable strings. xqf.desktop.in # Package source files src/addmaster.c src/addserver.c #src/config.c #src/debug.c src/dialogs.c #src/dns.c src/filter.c src/flt-player.c src/game.c #src/history.c #src/host.c src/launch.c #src/menus.c #src/pixmaps.c src/pref.c src/psearch.c #src/rc.c src/rcon.c src/redial.c #src/server.c #src/skin.c #src/skin_pcx.c #src/sort.c src/source.c #src/srv-info.c #src/srv-list.c src/srv-prop.c src/stat.c src/statistics.c src/utils.c src/xqf-ui.c src/xqf.c #src/xutils.c #src/zipped.c src/splash.c src/country-filter.c src/loadpixmap.c src/trayicon.c xqf-1.0.5/po/ChangeLog0000644002404400000620000000305010523105071011410 000000000000002006-10-28 Jordi Mallach * pl.po: Fix syntax errors. 2006-10-24 Jordi Mallach * pl.po: New Polish translation by Miłosz Kosobucki . * ca.po: Updated Catalan translation. 2005-09-20 Jordi Mallach * ca.po: Updated Catalan translation. 2004-11-22 Jordi Mallach * ca.po: Updated Catalan translation. * es.po: Updated Spanish translation. 2004-08-13 Jordi Mallach * Makevars: Fix DOMAIN so intltool actually works. * ca.po: Updated Catalan translation. * es.po: Updated Spanish translation. 2004-07-12 Jordi Mallach * ca.po: Updated Catalan translation. 2004-04-11 Jordi Mallach * da.po: Updated Danish translation by Morten Brix Pedersen . 2004-03-30 Jordi Mallach * ru.po: Added Russian translation by Dan Korostelev . 2004-03-16 Jordi Mallach * ca.po: Updated Catalan translation. * es.po: Updated Spanish translation. 2004-02-02 Jordi Mallach * LINGUAS: Removed, not supported by glib-gettextize. * POTFILES.in: Added xqf.desktop.in. * ca.po: Updated Catalan translation. 2003-10-28 Jordi Mallach * ca.po: Updated Catalan translation, recoded as UTF-8. * da.po, de.po, es.po, fr.po: Recoded as UTF-8. 2003-10-28 Jordi Mallach * LINGUAS: Added, imported from configure.in. xqf-1.0.5/po/Makefile.in.in0000755002404400000620000001705210520653073012331 00000000000000# Makefile for program source directory in GNU NLS utilities package. # Copyright (C) 1995, 1996, 1997 by Ulrich Drepper # # This file file be copied and used freely without restrictions. It can # be used in projects which are not available under the GNU Public License # but which still want to provide support for the GNU gettext functionality. # Please note that the actual code is *not* freely available. # # - Modified by Owen Taylor to use GETTEXT_PACKAGE # instead of PACKAGE and to look for po2tbl in ./ not in intl/ # # - Modified by jacob berkman to install # Makefile.in.in and po2tbl.sed.in for use with glib-gettextize # # - Modified by Rodney Dawes for use with intltool # # We have the following line for use by intltoolize: # INTLTOOL_MAKEFILE GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ PACKAGE = @PACKAGE@ VERSION = @VERSION@ SHELL = /bin/sh @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ top_builddir = .. VPATH = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ datadir = @datadir@ datarootdir = @datarootdir@ libdir = @libdir@ localedir = $(libdir)/locale gnulocaledir = $(datadir)/locale gettextsrcdir = $(datadir)/glib-2.0/gettext/po subdir = po install_sh = @install_sh@ mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ CC = @CC@ GENCAT = @GENCAT@ GMSGFMT = @GMSGFMT@ MSGFMT = @MSGFMT@ XGETTEXT = @XGETTEXT@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ MSGMERGE = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --dist GENPOT = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --pot DEFS = @DEFS@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ INCLUDES = -I.. -I$(top_srcdir)/intl COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) SOURCES = POFILES = @POFILES@ GMOFILES = @GMOFILES@ DISTFILES = ChangeLog Makefile.in.in POTFILES.in \ $(POFILES) $(SOURCES) EXTRA_DISTFILES = POTFILES.skip Makevars LINGUAS POTFILES = \ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ INSTOBJEXT = @INSTOBJEXT@ .SUFFIXES: .SUFFIXES: .c .o .po .pox .gmo .mo .msg .cat .c.o: $(COMPILE) $< .po.pox: $(MAKE) $(GETTEXT_PACKAGE).pot $(MSGMERGE) $< $(GETTEXT_PACKAGE).pot -o $*.pox .po.mo: $(MSGFMT) -o $@ $< .po.gmo: file=`echo $* | sed 's,.*/,,'`.gmo \ && rm -f $$file && $(GMSGFMT) -o $$file $< .po.cat: sed -f ../intl/po2msg.sed < $< > $*.msg \ && rm -f $@ && $(GENCAT) $@ $*.msg all: all-@USE_NLS@ all-yes: $(CATALOGS) all-no: $(GETTEXT_PACKAGE).pot: $(POTFILES) $(GENPOT) install: install-exec install-data install-exec: install-data: install-data-@USE_NLS@ install-data-no: all install-data-yes: all if test -n "$(MKINSTALLDIRS)"; then \ $(MKINSTALLDIRS) $(DESTDIR)$(datadir); \ else \ $(SHELL) $(top_srcdir)/mkinstalldirs $(DESTDIR)$(datadir); \ fi @catalogs='$(CATALOGS)'; \ for cat in $$catalogs; do \ cat=`basename $$cat`; \ case "$$cat" in \ *.gmo) destdir=$(gnulocaledir);; \ *) destdir=$(localedir);; \ esac; \ lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \ dir=$(DESTDIR)$$destdir/$$lang/LC_MESSAGES; \ if test -n "$(MKINSTALLDIRS)"; then \ $(MKINSTALLDIRS) $$dir; \ else \ $(SHELL) $(top_srcdir)/mkinstalldirs $$dir; \ fi; \ if test -r $$cat; then \ $(INSTALL_DATA) $$cat $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \ echo "installing $$cat as $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT)"; \ else \ $(INSTALL_DATA) $(srcdir)/$$cat $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \ echo "installing $(srcdir)/$$cat as" \ "$$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT)"; \ fi; \ if test -r $$cat.m; then \ $(INSTALL_DATA) $$cat.m $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \ echo "installing $$cat.m as $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m"; \ else \ if test -r $(srcdir)/$$cat.m ; then \ $(INSTALL_DATA) $(srcdir)/$$cat.m \ $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \ echo "installing $(srcdir)/$$cat as" \ "$$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m"; \ else \ true; \ fi; \ fi; \ done if test "$(PACKAGE)" = "glib"; then \ if test -n "$(MKINSTALLDIRS)"; then \ $(MKINSTALLDIRS) $(DESTDIR)$(gettextsrcdir); \ else \ $(SHELL) $(top_srcdir)/mkinstalldirs $(DESTDIR)$(gettextsrcdir); \ fi; \ $(INSTALL_DATA) $(srcdir)/Makefile.in.in \ $(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \ else \ : ; \ fi # Define this as empty until I found a useful application. installcheck: uninstall: catalogs='$(CATALOGS)'; \ for cat in $$catalogs; do \ cat=`basename $$cat`; \ lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \ rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \ rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \ rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \ rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \ done if test "$(PACKAGE)" = "glib"; then \ rm -f $(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \ fi check: all $(GETTEXT_PACKAGE).pot dvi info tags TAGS ID: mostlyclean: rm -f core core.* *.pox $(GETTEXT_PACKAGE).pot *.old.po cat-id-tbl.tmp rm -fr *.o rm -f .intltool-merge-cache clean: mostlyclean distclean: clean rm -f Makefile Makefile.in POTFILES rm -f *.mo *.msg *.cat *.cat.m $(GMOFILES) maintainer-clean: distclean @echo "This command is intended for maintainers to use;" @echo "it deletes files that may require special tools to rebuild." rm -f Makefile.in.in distdir = ../$(GETTEXT_PACKAGE)-$(VERSION)/$(subdir) dist distdir: $(DISTFILES) dists="$(DISTFILES)"; \ extra_dists="$(EXTRA_DISTFILES)"; \ for file in $$extra_dists; do \ test -f $$file && dists="$$dists $$file"; \ done; \ for file in $$dists; do \ ln $(srcdir)/$$file $(distdir) 2> /dev/null \ || cp -p $(srcdir)/$$file $(distdir); \ done update-po: Makefile $(MAKE) $(GETTEXT_PACKAGE).pot tmpdir=`pwd`; \ catalogs='$(CATALOGS)'; \ for cat in $$catalogs; do \ cat=`basename $$cat`; \ lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \ echo "$$lang:"; \ result="`$(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang`"; \ if $$result; then \ if cmp $(srcdir)/$$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ rm -f $$tmpdir/$$lang.new.po; \ else \ if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \ :; \ else \ echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \ rm -f $$tmpdir/$$lang.new.po; \ exit 1; \ fi; \ fi; \ else \ echo "msgmerge for $$cat failed!"; \ rm -f $$tmpdir/$$lang.new.po; \ fi; \ done # POTFILES is created from POTFILES.in by stripping comments, empty lines # and Intltool tags (enclosed in square brackets), and appending a full # relative path to them POTFILES: POTFILES.in ( posrcprefix='$(top_srcdir)/'; \ rm -f $@-t $@ \ && (sed -e '/^#/d' \ -e 's/^[[].*] *//' \ -e '/^[ ]*$$/d' \ -e "s@^@ $$posrcprefix@" $(srcdir)/$@.in \ | sed -e '$$!s/$$/ \\/') > $@-t \ && chmod a-w $@-t \ && mv $@-t $@ ) Makefile: Makefile.in.in ../config.status POTFILES cd .. \ && CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \ $(SHELL) ./config.status # Tell versions [3.59,3.63) of GNU make not to export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xqf-1.0.5/src/0000777002404400000620000000000010523106503010076 500000000000000xqf-1.0.5/src/tga/0000777002404400000620000000000010523106504010652 500000000000000xqf-1.0.5/src/tga/tga.c0000644002404400000620000001527710311303124011511 00000000000000/* Copyright (C) 1997-2001 Id Software, Inc. 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. */ /* taken from quake2 */ #include #include #include #include #ifdef STANDALONE #define xqf_warning(x) fputs(x, stderr) #else #include "debug.h" #endif static inline unsigned short LittleShort(const unsigned char* buf) { return buf[0] + (buf[1]<<8); } typedef unsigned char byte; typedef struct _TargaHeader { unsigned char id_length, colormap_type, image_type; unsigned short colormap_index, colormap_length; unsigned char colormap_size; unsigned short x_origin, y_origin, width, height; unsigned char pixel_size, attributes; } TargaHeader; #define CHECK(x) do { if(buf_p+x>buffer+length) { xqf_warning("image data %d bytes to short", x); goto error_out;} } while(0) unsigned char* LoadTGA (const unsigned char* buffer, size_t length, unsigned *width, unsigned *height) { unsigned columns = 0, rows = 0, numPixels = 0; byte *pixbuf = NULL; int row = 0, column = 0; const byte *buf_p = NULL; TargaHeader targa_header = {0}; byte *targa_rgba = NULL; buf_p = buffer; CHECK(18); targa_header.id_length = *buf_p++; targa_header.colormap_type = *buf_p++; targa_header.image_type = *buf_p++; targa_header.colormap_index = LittleShort(buf_p); buf_p+=2; targa_header.colormap_length = LittleShort(buf_p); buf_p+=2; targa_header.colormap_size = *buf_p; ++buf_p; targa_header.x_origin = LittleShort(buf_p); buf_p+=2; targa_header.y_origin = LittleShort(buf_p); buf_p+=2; targa_header.width = LittleShort(buf_p); buf_p+=2; targa_header.height = LittleShort(buf_p); buf_p+=2; targa_header.pixel_size = *buf_p++; targa_header.attributes = *buf_p++; #if 0 printf("id_length: %hhu\n", targa_header.id_length); printf("colormap_type: %hhu\n", targa_header.colormap_type); printf("image_type: %hhu\n", targa_header.image_type); printf("colormap_index: %hu\n", targa_header.colormap_index); printf("colormap_length: %hu\n", targa_header.colormap_length); printf("colormap_size: %hhu\n", targa_header.colormap_size); printf("x_origin: %hu\n", targa_header.x_origin); printf("y_origin: %hu\n", targa_header.y_origin); printf("width: %hx\n", targa_header.width); printf("height: %hx\n", targa_header.height); printf("pixel_size: %hhu\n", targa_header.pixel_size); printf("attributes: %hhu\n", targa_header.attributes); #endif if (targa_header.image_type!=2 && targa_header.image_type!=10) { xqf_warning("Only type 2 and 10 targa RGB images supported"); return NULL; } if (targa_header.colormap_type !=0 || (targa_header.pixel_size!=32 && targa_header.pixel_size!=24)) { xqf_warning("Only 32 or 24 bit images supported (no colormaps)"); return NULL; } columns = targa_header.width; rows = targa_header.height; numPixels = columns * rows * 4; if(!rows || !columns) { xqf_warning("invalid image size: %ux%u", rows, columns); return NULL; } if(numPixels > 0x7FFFFFFF) { xqf_warning("image too big: %ux%u", rows, columns); return NULL; } if (width) *width = columns; if (height) *height = rows; targa_rgba = g_malloc (numPixels); CHECK(targa_header.id_length); if (targa_header.id_length != 0) buf_p += targa_header.id_length; // skip TARGA image comment if (targa_header.image_type==2) { // Uncompressed, RGB images for(row=rows-1; row>=0; row--) { pixbuf = targa_rgba + row*columns*4; for(column=0; column=0; row--) { pixbuf = targa_rgba + row*columns*4; for(column=0; column0) row--; else goto breakOut; pixbuf = targa_rgba + row*columns*4; } } } else { // non run-length packet for(j=0;j0) row--; else goto breakOut; pixbuf = targa_rgba + row*columns*4; } } } } breakOut:; } } return targa_rgba; error_out: g_free(targa_rgba); return NULL; } xqf-1.0.5/src/tga/tga.h0000644002404400000620000000243010311303124011501 00000000000000/* XQF - Quake server browser and launcher * load TGA image from memory * Copyright (C) 2004 Ludwig Nussel * * 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 */ #ifndef _TGA_H_ #define _TGA_H_ /** \brief load TGA image from memory * * @param buffer memory region containing the TGA image * @param length length of the image * @param width output width * @param height output heigth * @return pointer to image memory in RGBA format. Size is width*heigth*4. Must * be freed manually */ unsigned char* LoadTGA (const unsigned char* buffer, size_t length, unsigned *width, unsigned *height); #endif xqf-1.0.5/src/tga/Makefile.am0000644002404400000620000000107410107425132012623 00000000000000INCLUDES = -I$(top_srcdir)/intl \ -I$(top_srcdir)/src \ -DLOCALEDIR=\"$(localedir)\" \ -DPACKAGE_DATA_DIR=\"$(pkgdatadir)\" \ -DPIXMAPSDIR=\"$(datadir)/pixmaps\" \ $(GTK_CFLAGS) \ $(QSTAT23) \ $(DEBUG) \ $(COMPRESSION) \ $(GDK_PIXBUF_CFLAGS) \ $(PACKAGE_CFLAGS) \ $(OLD_GTK_SUPPORT) libtga_a_SOURCES=memtopixmap.c memtopixmap.h tga.c tga.h noinst_LIBRARIES=libtga.a EXTRA_PROGRAMS=memtopixmap memtopixmap_CFLAGS = -DSTANDALONE $(INCLUDES) memtopixmap_SOURCES = $(libtga_a_SOURCES) memtopixmap_LDADD = @INTLLIBS@ $(GTK_LIBS) $(GDK_PIXBUF_LIBS) @PACKAGE_LIBS@ xqf-1.0.5/src/tga/Makefile.in0000644002404400000620000004467710523105435012657 00000000000000# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : EXTRA_PROGRAMS = memtopixmap$(EXEEXT) subdir = src/tga DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/src/gnuconfig.h CONFIG_CLEAN_FILES = LIBRARIES = $(noinst_LIBRARIES) AR = ar ARFLAGS = cru libtga_a_AR = $(AR) $(ARFLAGS) libtga_a_LIBADD = am_libtga_a_OBJECTS = memtopixmap.$(OBJEXT) tga.$(OBJEXT) libtga_a_OBJECTS = $(am_libtga_a_OBJECTS) am__objects_1 = memtopixmap-memtopixmap.$(OBJEXT) \ memtopixmap-tga.$(OBJEXT) am_memtopixmap_OBJECTS = $(am__objects_1) memtopixmap_OBJECTS = $(am_memtopixmap_OBJECTS) am__DEPENDENCIES_1 = memtopixmap_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libtga_a_SOURCES) $(memtopixmap_SOURCES) DIST_SOURCES = $(libtga_a_SOURCES) $(memtopixmap_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_XQFRCON_FALSE = @BUILD_XQFRCON_FALSE@ BUILD_XQFRCON_TRUE = @BUILD_XQFRCON_TRUE@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COMPRESSION = @COMPRESSION@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEBUG = @DEBUG@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DUMMY_LIBGDKPIXBUF_FALSE = @DUMMY_LIBGDKPIXBUF_FALSE@ DUMMY_LIBGDKPIXBUF_ORIG = @DUMMY_LIBGDKPIXBUF_ORIG@ DUMMY_LIBGDKPIXBUF_SONAME = @DUMMY_LIBGDKPIXBUF_SONAME@ DUMMY_LIBGDKPIXBUF_TRUE = @DUMMY_LIBGDKPIXBUF_TRUE@ DUMMY_LIBGEOIP_FALSE = @DUMMY_LIBGEOIP_FALSE@ DUMMY_LIBGEOIP_ORIG = @DUMMY_LIBGEOIP_ORIG@ DUMMY_LIBGEOIP_SONAME = @DUMMY_LIBGEOIP_SONAME@ DUMMY_LIBGEOIP_TRUE = @DUMMY_LIBGEOIP_TRUE@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GDK_PIXBUF_CFLAGS = @GDK_PIXBUF_CFLAGS@ GDK_PIXBUF_CONFIG = @GDK_PIXBUF_CONFIG@ GDK_PIXBUF_LIBS = @GDK_PIXBUF_LIBS@ GEOIP_LIB = @GEOIP_LIB@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_CONFIG = @GLIB_CONFIG@ GLIB_LIBS = @GLIB_LIBS@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_CONFIG = @GTK_CONFIG@ GTK_LIBS = @GTK_LIBS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@ INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@ INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_ICONV = @INTLTOOL_ICONV@ INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@ INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_MSGFMT = @INTLTOOL_MSGFMT@ INTLTOOL_MSGMERGE = @INTLTOOL_MSGMERGE@ INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@ INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@ INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@ INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@ INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@ INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@ INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@ INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@ INTLTOOL_XGETTEXT = @INTLTOOL_XGETTEXT@ INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@ INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MSGFMT = @MSGFMT@ OBJEXT = @OBJEXT@ OLD_GTK_SUPPORT = @OLD_GTK_SUPPORT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_CFLAGS = @PACKAGE_CFLAGS@ PACKAGE_LIBS = @PACKAGE_LIBS@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ QSTATEXEC = @QSTATEXEC@ RANLIB = @RANLIB@ RELEASE = @RELEASE@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ XQFRCON_LIBS = @XQFRCON_LIBS@ ac_ct_CC = @ac_ct_CC@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ datadir = @datadir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ INCLUDES = -I$(top_srcdir)/intl \ -I$(top_srcdir)/src \ -DLOCALEDIR=\"$(localedir)\" \ -DPACKAGE_DATA_DIR=\"$(pkgdatadir)\" \ -DPIXMAPSDIR=\"$(datadir)/pixmaps\" \ $(GTK_CFLAGS) \ $(QSTAT23) \ $(DEBUG) \ $(COMPRESSION) \ $(GDK_PIXBUF_CFLAGS) \ $(PACKAGE_CFLAGS) \ $(OLD_GTK_SUPPORT) libtga_a_SOURCES = memtopixmap.c memtopixmap.h tga.c tga.h noinst_LIBRARIES = libtga.a memtopixmap_CFLAGS = -DSTANDALONE $(INCLUDES) memtopixmap_SOURCES = $(libtga_a_SOURCES) memtopixmap_LDADD = @INTLLIBS@ $(GTK_LIBS) $(GDK_PIXBUF_LIBS) @PACKAGE_LIBS@ all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/tga/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu src/tga/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) libtga.a: $(libtga_a_OBJECTS) $(libtga_a_DEPENDENCIES) -rm -f libtga.a $(libtga_a_AR) libtga.a $(libtga_a_OBJECTS) $(libtga_a_LIBADD) $(RANLIB) libtga.a memtopixmap$(EXEEXT): $(memtopixmap_OBJECTS) $(memtopixmap_DEPENDENCIES) @rm -f memtopixmap$(EXEEXT) $(LINK) $(memtopixmap_LDFLAGS) $(memtopixmap_OBJECTS) $(memtopixmap_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memtopixmap-memtopixmap.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memtopixmap-tga.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memtopixmap.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tga.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` memtopixmap-memtopixmap.o: memtopixmap.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(memtopixmap_CFLAGS) $(CFLAGS) -MT memtopixmap-memtopixmap.o -MD -MP -MF "$(DEPDIR)/memtopixmap-memtopixmap.Tpo" -c -o memtopixmap-memtopixmap.o `test -f 'memtopixmap.c' || echo '$(srcdir)/'`memtopixmap.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/memtopixmap-memtopixmap.Tpo" "$(DEPDIR)/memtopixmap-memtopixmap.Po"; else rm -f "$(DEPDIR)/memtopixmap-memtopixmap.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='memtopixmap.c' object='memtopixmap-memtopixmap.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(memtopixmap_CFLAGS) $(CFLAGS) -c -o memtopixmap-memtopixmap.o `test -f 'memtopixmap.c' || echo '$(srcdir)/'`memtopixmap.c memtopixmap-memtopixmap.obj: memtopixmap.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(memtopixmap_CFLAGS) $(CFLAGS) -MT memtopixmap-memtopixmap.obj -MD -MP -MF "$(DEPDIR)/memtopixmap-memtopixmap.Tpo" -c -o memtopixmap-memtopixmap.obj `if test -f 'memtopixmap.c'; then $(CYGPATH_W) 'memtopixmap.c'; else $(CYGPATH_W) '$(srcdir)/memtopixmap.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/memtopixmap-memtopixmap.Tpo" "$(DEPDIR)/memtopixmap-memtopixmap.Po"; else rm -f "$(DEPDIR)/memtopixmap-memtopixmap.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='memtopixmap.c' object='memtopixmap-memtopixmap.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(memtopixmap_CFLAGS) $(CFLAGS) -c -o memtopixmap-memtopixmap.obj `if test -f 'memtopixmap.c'; then $(CYGPATH_W) 'memtopixmap.c'; else $(CYGPATH_W) '$(srcdir)/memtopixmap.c'; fi` memtopixmap-tga.o: tga.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(memtopixmap_CFLAGS) $(CFLAGS) -MT memtopixmap-tga.o -MD -MP -MF "$(DEPDIR)/memtopixmap-tga.Tpo" -c -o memtopixmap-tga.o `test -f 'tga.c' || echo '$(srcdir)/'`tga.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/memtopixmap-tga.Tpo" "$(DEPDIR)/memtopixmap-tga.Po"; else rm -f "$(DEPDIR)/memtopixmap-tga.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tga.c' object='memtopixmap-tga.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(memtopixmap_CFLAGS) $(CFLAGS) -c -o memtopixmap-tga.o `test -f 'tga.c' || echo '$(srcdir)/'`tga.c memtopixmap-tga.obj: tga.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(memtopixmap_CFLAGS) $(CFLAGS) -MT memtopixmap-tga.obj -MD -MP -MF "$(DEPDIR)/memtopixmap-tga.Tpo" -c -o memtopixmap-tga.obj `if test -f 'tga.c'; then $(CYGPATH_W) 'tga.c'; else $(CYGPATH_W) '$(srcdir)/tga.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/memtopixmap-tga.Tpo" "$(DEPDIR)/memtopixmap-tga.Po"; else rm -f "$(DEPDIR)/memtopixmap-tga.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tga.c' object='memtopixmap-tga.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(memtopixmap_CFLAGS) $(CFLAGS) -c -o memtopixmap-tga.obj `if test -f 'tga.c'; then $(CYGPATH_W) 'tga.c'; else $(CYGPATH_W) '$(srcdir)/tga.c'; fi` uninstall-info-am: ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-info-am .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-noinstLIBRARIES ctags distclean distclean-compile \ distclean-generic distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-exec install-exec-am install-info \ install-info-am install-man install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ uninstall-am uninstall-info-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xqf-1.0.5/src/tga/memtopixmap.c0000644002404400000620000001644610311303124013275 00000000000000/* XQF - Quake server browser and launcher * render a chunk of memory as GdkPixmap and GdkBitmap * Copyright (C) 2004 Ludwig Nussel * * 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 */ #include "gnuconfig.h" #include #include #include #include #include #include #include #include #include #include "tga.h" #include "memtopixmap.h" #ifdef STANDALONE #define xqf_warning(fmt, rem...) fprintf(stderr, fmt, ##rem) #else #include "debug.h" #endif static void data_free(guchar* pixels, gpointer data) { g_free(data); } GdkPixbuf* renderMemToPixbuf(const guchar* mem, size_t len) { GdkPixbufLoader* loader = NULL; gboolean ok = FALSE; GdkPixbuf* pixbuf = NULL; #ifdef USE_GTK2 GError *err=NULL; #endif if(!mem) return NULL; if(!len) return NULL; #if 0 { int fd = open("mapshot.tga", O_WRONLY|O_CREAT|O_TRUNC, 0644 ); write(fd, mem, len); close(fd); } #endif loader = gdk_pixbuf_loader_new(); g_return_val_if_fail(loader!=NULL, NULL); #ifdef USE_GTK2 ok = gdk_pixbuf_loader_write(loader, mem, len,&err); if(err != NULL) { xqf_warning("%s", err->message); g_error_free(err); } err = NULL; gdk_pixbuf_loader_close(loader,&err); if(err != NULL) { xqf_warning("%s", err->message); g_error_free(err); } #else ok = gdk_pixbuf_loader_write(loader, mem, len); gdk_pixbuf_loader_close(loader); #endif if(!ok) { unsigned h = 0, w = 0; unsigned char* data; g_free(loader); loader = NULL; data = LoadTGA(mem, len, &w, &h); if(!data) return NULL; // printf("%dx%d\n", w, h); pixbuf = gdk_pixbuf_new_from_data (data, GDK_COLORSPACE_RGB, TRUE, 8, w, h, w*4, data_free, data); } else { pixbuf = gdk_pixbuf_loader_get_pixbuf(loader); g_free(loader); } return pixbuf; } void renderMemToGtkPixmap(const guchar* mem, size_t len, GdkPixmap **pix, GdkBitmap **mask, guint* width, guint* height, unsigned char brightness) { GdkPixbuf* pixbuf = renderMemToPixbuf(mem, len); if(pixbuf) { GdkPixbuf* pixbuf_tmp = NULL; pixbuf_tmp = pixbuf; pixbuf = gdk_pixbuf_scale_simple(pixbuf,320,240,GDK_INTERP_TILES); *height = gdk_pixbuf_get_height(pixbuf); *width = gdk_pixbuf_get_width(pixbuf); if(brightness && gdk_pixbuf_get_n_channels (pixbuf) >= 3) // brightness correction { unsigned x, y; unsigned w = gdk_pixbuf_get_width (pixbuf); unsigned h = gdk_pixbuf_get_height (pixbuf); unsigned rs = gdk_pixbuf_get_rowstride (pixbuf); unsigned c = gdk_pixbuf_get_n_channels (pixbuf); unsigned char* p = gdk_pixbuf_get_pixels (pixbuf); register unsigned tmp; for(y=0; y < h; ++y) { for(x=0; x < w; ++x, p+=c) { tmp = p[0] + brightness; p[0] = (tmp>0xFF)?0xFF:tmp; tmp = p[1] + brightness; p[1] = (tmp>0xFF)?0xFF:tmp; tmp = p[2] + brightness; p[2] = (tmp>0xFF)?0xFF:tmp; } if(x*cwindow, widget->style->fg_gc[GTK_STATE_NORMAL], 0, 0, gdk_pixbuf_get_width(pixbuf), gdk_pixbuf_get_height(pixbuf), GDK_RGB_DITHER_MAX, rgbbuf, gdk_pixbuf_get_width(pixbuf) * 3); return TRUE; } void pixbuf2rgbbuf(GdkPixbuf* pixbuf) { guchar* buf; guchar* pos; unsigned w; unsigned h; unsigned rs; unsigned x; unsigned y; unsigned c; w = gdk_pixbuf_get_width (pixbuf); h = gdk_pixbuf_get_height (pixbuf); rs = gdk_pixbuf_get_rowstride (pixbuf); c = gdk_pixbuf_get_n_channels (pixbuf); printf("%d(%d)x%d %d\n", w, rs, h, c); pos = rgbbuf = g_new0(guchar, h*w*3); buf = gdk_pixbuf_get_pixels (pixbuf); for(y=0; y < h; ++y) { for(x=0; x < w; ++x) { *pos++ = *buf++; *pos++ = *buf++; *pos++ = *buf++; buf++; } if(x*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 */ #ifndef _MEMTOPIXMAP_H_ #define _MEMTOPIXMAP_H_ void renderMemToGtkPixmap(const guchar* mem, size_t len, GdkPixmap **pix, GdkBitmap **mask, guint* width, guint* height, unsigned char brightness); #endif xqf-1.0.5/src/xpm/0000777002404400000620000000000010523106503010702 500000000000000xqf-1.0.5/src/xpm/warsow.xpm0000644002404400000620000000116410331676453012705 00000000000000/* XPM */ static char * warsow_xpm[] = { "16 16 17 1", " c None", ". c #050506", "+ c #352257", "@ c #47223A", "# c #343334", "$ c #563933", "% c #882B06", "& c #762E2D", "* c #533592", "= c #783761", "- c #5D5A5D", "; c #EC4800", "> c #837C7C", ", c #9A9B98", "' c #B1B3B0", ") c #BCBEBA", "! c #F4F6F3", ". *+++++++++++@.", ".**+---------->-", ".**.'!!!!!!!!!!!", ".**#!)##########", ".*+-!-*.>#+==@&@", ".*.))++-!!====&$", ".*#!!,,!'!!-@&&&", ".+-!!!!'.,!!!!-&", ".*....)!)!,>!!$%", ".*****#)!>&.'!%&", ".****==@>&&$!>;%", "-=-----$---)!$;%", "!!!!!!!!!!!!)%;%", "----------->$%;%", ".@@@@&&&%%%%%;;.", "............... "}; xqf-1.0.5/src/xpm/bf1942.xpm0000644002404400000620000000116410000510630012243 00000000000000/* XPM */ static char * bf1942_xpm[] = { "16 16 17 1", " c None", ". c #12120E", "+ c #A5B386", "@ c #7D895D", "# c #4C4F39", "$ c #C6DAA6", "% c #575F3D", "& c #C1D2A0", "* c #5F673F", "= c #91A070", "- c #1A1E16", "; c #22261E", "> c #B2C292", ", c #6A744D", "' c #2A2A22", ") c #3D3E35", "! c #E5EAD2", " ", " ", " #***,% ", ")*,,)@>>=+ ", "#,@#@,&+&&> ", "*@=@#&>+&&@& ", "))=,,#!+&++*# ", "));>=,#!+#+),% ", "))),+=,,#%*+#=@ ", " )))>@@@%*,*$), ", " )#;!%+@==*)+%*", " ##)+=+===,*+*", " )))+,#@**.) ", " )->==) ", " )%) ", " "}; xqf-1.0.5/src/xpm/server-to.xpm0000644002404400000620000000071107201342721013274 00000000000000/* XPM */ static char * server_to_xpm[] = { "17 17 3 1", " c None", ". c #665D00", "+ c #DDCF00", " ", " ", " ", " ", " ", " ", " ", " ......... ", " .+++++++++. ", " ......... ", " ", " ", " ", " ", " ", " ", " "}; xqf-1.0.5/src/xpm/buddy-red.xpm0000644002404400000620000000071307201342721013227 00000000000000/* XPM */ static char * buddy_red_xpm[] = { "18 17 2 1", " c None", ". c #FF0000", " ", " .... ", " ...... ", " ........ ", " ........ ", " ........ ", " ........ ", " ...... ", " .... ", " ", " ", " ", " ", " ", " ", " ", " "}; xqf-1.0.5/src/xpm/server-up.xpm0000644002404400000620000000071107201342721013276 00000000000000/* XPM */ static char * server_up_xpm[] = { "17 17 3 1", " c None", ". c #004900", "+ c #00C900", " ", " ", " ", " ", " ", " ", " .. ", " .+. ", " .+. ", " .. .+. ", " .+. .+. ", " .+. .+. ", " .+.+. ", " .+. ", " . ", " ", " "}; xqf-1.0.5/src/xpm/cod.xpm0000644002404400000620000000116107753545135012133 00000000000000/* XPM */ static char * cod_xpm[] = { "16 16 17 1", " c None", ". c #76765A", "+ c #C3C2A3", "@ c #4D4D49", "# c #AFA996", "$ c #D5CCB2", "% c #383838", "& c #B9B79F", "* c #292929", "= c #424242", "- c #A19F8F", "; c #E5DEC9", "> c #7A7A56", ", c #928F84", "' c #6D6D63", ") c #5C5C57", "! c #82825A", " ", " . ", " +@ ", " #$% ", " $&* ", " $&@= ", " -&;+$;#@>&&$- ", " =@,+;$'##,% ", " *%@.;&)*% ", " @!,),)= ", " '&#))#' ", " -$@@)-!% ", " $)= .+) ", " )-% ,, ", " * ) ", " "}; xqf-1.0.5/src/xpm/punkbuster.xpm0000644002404400000620000000347407552614614013575 00000000000000/* XPM */ static char *punkbuster_xpm[]={ "17 17 72 2", "Qt c None", ".0 c #0d1350", ".S c #101d5b", ".f c #132c6b", ".K c #162e6e", ".W c #163071", ".1 c #182562", ".N c #203f7f", ".b c #22255f", ".M c #244483", ".m c #244988", ".r c #25326b", ".7 c #254f93", ".R c #2564ab", ".V c #2763aa", ".c c #2a3871", ".H c #2b5696", ".P c #2c65a9", ".6 c #2d5696", ".y c #30376e", ".8 c #3065a8", "## c #31589e", ".X c #324379", ".9 c #346fb1", ".j c #36528b", ".d c #38518b", ".J c #3a6aa8", ".L c #3b629d", ".t c #3c65a2", ".3 c #3c6eae", ".D c #406eaa", ".O c #4073b1", ".q c #426da7", "#c c #4475b4", ".5 c #461a54", ".g c #4a699e", ".x c #4b74ad", ".2 c #4e7ab2", ".I c #527cb2", ".T c #536092", "#d c #56518c", "#. c #585491", ".Q c #5d376b", "#b c #5d76af", "#e c #5f538c", ".i c #5f87b8", ".n c #678bbc", ".z c #684c84", ".G c #6997c9", ".Z c #6c427c", ".h c #6e8fbe", ".l c #781b4d", ".E c #7c739f", ".Y c #845d8e", ".p c #85a4cb", ".C c #8aadd3", ".A c #8da5c8", ".s c #8f2153", ".F c #8fb3d9", ".4 c #901444", "#f c #981d4f", ".u c #98add1", ".w c #98b5d7", "#a c #a1204f", ".# c #a8274f", ".U c #aa2d5d", ".a c #ae345b", ".k c #b33054", ".e c #b42f57", ".o c #c5c6de", ".B c #c9d2e8", ".v c #f0e4f0", "QtQtQtQtQtQt.#.#.#.#.#QtQtQtQtQtQt", "QtQtQtQt.a.aQt.b.c.dQt.a.#QtQtQtQt", "QtQtQt.eQtQt.f.g.h.i.jQtQt.#QtQtQt", "QtQt.k.#Qt.l.m.n.o.p.q.rQtQt.#QtQt", "Qt.#.#.#.#.s.t.u.v.w.x.yQtQtQt.#Qt", "Qt.aQt.#.#.#.z.A.B.C.DQtQtQtQt.aQt", ".#QtQtQt.#.#.#.E.F.G.HQtQtQtQtQt.#", ".#QtQtQtQt.#.#.#.I.J.KQtQtQtQtQt.#", ".#QtQtQtQtQt.#.#.#.L.M.NQtQtQtQt.#", ".#QtQtQtQtQtQt.#.#.#.O.PQtQtQtQt.#", ".#QtQtQtQtQtQt.Q.#.#.#.R.SQtQtQt.#", "Qt.aQtQtQtQtQt.T.U.#.V.V.WQtQt.aQt", "Qt.#QtQtQtQtQt.X.Y.Z.V.V.VQtQt.#Qt", "QtQt.#QtQtQt.0.1.2.3.V.V.#.#.#QtQt", "QtQtQt.#.4.5.6.7.8.9#.##.#.#QtQtQt", "QtQtQtQt.##a#b#c#d#e#f.#.#QtQtQtQt", "QtQtQtQtQtQt.#.#.#.#.#QtQtQtQtQtQt"}; xqf-1.0.5/src/xpm/server-down.xpm0000644002404400000620000000071307201342721013623 00000000000000/* XPM */ static char * server_down_xpm[] = { "17 17 3 1", " c None", ". c #7F0000", "+ c #FF0000", " ", " ", " ", " .. .. ", " .+. .+. ", " .+. .+. ", " .+. .+. ", " .+.+. ", " .+. ", " .+.+. ", " .+. .+. ", " .+. .+. ", " .+. .+. ", " .. .. ", " ", " ", " "}; xqf-1.0.5/src/xpm/locked_punkbuster.xpm0000644002404400000620000000464507554022575015120 00000000000000/* XPM */ static char *locked_punkbuster_xpm[]={ "34 17 74 2", "Qt c None", ".2 c #0d1350", ".U c #101d5b", ".f c #132c6b", ".M c #162e6e", ".Y c #163071", ".3 c #182562", ".P c #203f7f", ".b c #22255f", ".O c #244483", ".n c #244988", ".s c #25326b", ".9 c #254f93", ".T c #2564ab", ".X c #2763aa", ".c c #2a3871", ".J c #2b5696", ".R c #2c65a9", ".8 c #2d5696", ".A c #30376e", "#. c #3065a8", "#b c #31589e", ".Z c #324379", "## c #346fb1", ".j c #36528b", ".d c #38518b", ".L c #3a6aa8", ".N c #3b629d", ".v c #3c65a2", ".5 c #3c6eae", ".F c #406eaa", ".Q c #4073b1", ".r c #426da7", "#e c #4475b4", ".7 c #461a54", ".g c #4a699e", ".z c #4b74ad", ".4 c #4e7ab2", ".K c #527cb2", ".V c #536092", "#f c #56518c", "#a c #585491", ".S c #5d376b", "#d c #5d76af", "#g c #5f538c", ".i c #5f87b8", ".o c #678bbc", ".B c #684c84", ".I c #6997c9", ".1 c #6c427c", ".h c #6e8fbe", ".m c #781b4d", ".G c #7c739f", ".t c #7f0000", ".0 c #845d8e", ".q c #85a4cb", ".E c #8aadd3", ".C c #8da5c8", ".u c #8f2153", ".H c #8fb3d9", ".6 c #901444", "#h c #981d4f", ".w c #98add1", ".y c #98b5d7", "#c c #a1204f", ".# c #a8274f", ".W c #aa2d5d", ".a c #ae345b", ".l c #b33054", ".e c #b42f57", ".p c #c5c6de", ".D c #c9d2e8", ".x c #f0e4f0", ".k c #ff0000", "QtQtQtQtQtQt.#.#.#.#.#QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQt.a.aQt.b.c.dQt.a.#QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQt.eQtQt.f.g.h.i.jQtQt.#QtQtQtQtQtQtQtQtQtQt.k.k.kQtQtQtQtQtQtQt", "QtQt.l.#Qt.m.n.o.p.q.r.sQtQt.#QtQtQtQtQtQtQtQt.k.t.t.t.kQtQtQtQtQtQt", "Qt.#.#.#.#.u.v.w.x.y.z.AQtQtQt.#QtQtQtQtQt.t.k.tQtQtQt.t.k.tQtQtQtQt", "Qt.aQt.#.#.#.B.C.D.E.FQtQtQtQt.aQtQtQtQtQt.t.k.tQtQtQt.t.k.tQtQtQtQt", ".#QtQtQt.#.#.#.G.H.I.JQtQtQtQtQt.#QtQtQtQt.t.k.tQtQtQt.t.k.tQtQtQtQt", ".#QtQtQtQt.#.#.#.K.L.MQtQtQtQtQt.#QtQtQt.t.t.t.t.t.t.t.t.t.t.tQtQtQt", ".#QtQtQtQtQt.#.#.#.N.O.PQtQtQtQt.#QtQtQt.t.k.k.k.k.k.k.k.k.k.tQtQtQt", ".#QtQtQtQtQtQt.#.#.#.Q.RQtQtQtQt.#QtQtQt.t.kQtQtQtQtQtQtQt.k.tQtQtQt", ".#QtQtQtQtQtQt.S.#.#.#.T.UQtQtQt.#QtQtQt.t.k.k.k.k.k.k.k.k.k.tQtQtQt", "Qt.aQtQtQtQtQt.V.W.#.X.X.YQtQt.aQtQtQtQt.t.kQtQtQtQtQtQtQt.k.tQtQtQt", "Qt.#QtQtQtQtQt.Z.0.1.X.X.XQtQt.#QtQtQtQt.t.k.k.k.k.k.k.k.k.k.tQtQtQt", "QtQt.#QtQtQt.2.3.4.5.X.X.#.#.#QtQtQtQtQt.t.t.t.t.t.t.t.t.t.t.tQtQtQt", "QtQtQt.#.6.7.8.9#.###a#b.#.#QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQt.##c#d#e#f#g#h.#.#QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQt.#.#.#.#.#QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt"}; xqf-1.0.5/src/xpm/update.xpm0000644002404400000620000000140107201342721012625 00000000000000/* XPM */ static char * update_xpm[] = { "24 24 3 1", " c None", ". c #000000", "+ c #FFFFFF", " . . ", " .. .. .. .. ", " .+++++++++. ", " +++++++++ ", " .+++++++++. ", " .. .. .. .. ", " . .+++++++++. ", " .. +++++++++ ", "........ .+++++++++. ", "......... .. .. .. .. ", ".......... .+++++++++. ", "........... +++++++++ ", ".......... .+++++++++. ", "......... .. .. .. .. ", "........ .+++++++++. ", " .. +++++++++ ", " . .+++++++++. ", " .. .. .. .. ", " .+++++++++. ", " +++++++++ ", " .+++++++++. ", " .. .. .. . ", " . . ", " "}; xqf-1.0.5/src/xpm/ut2004.xpm0000644002404400000620000000116410014521504012301 00000000000000/* XPM */ static char * ut2004_xpm[] = { "16 16 17 1", " c None", ". c #2B2941", "+ c #D4AD72", "@ c #878398", "# c #7E6F6D", "$ c #5150D6", "% c #EDDABD", "& c #695D7C", "* c #6F6CF3", "= c #8785DC", "- c #3D3D9F", "; c #E1CFB4", "> c #5C5264", ", c #B9ABAA", "' c #AC8E6B", ") c #4D4B5B", "! c #32316D", " ==, ", " @==**$$= ", " ;,****$=,&$ ", " ;%;*$**=;#-$#", " ;%%%'$-,%;---&", " %+';;,-!,;;!!!-", " ,>$;%'-!,;+!!!!", ",&$$,+'!!,'+!..)", "@$--,'#!.'++...#", "----'+#!!'++..! ", "--!-'''!!,++.)# ", ")!!-+++@,+++,' ", "#!!&'++++#''# ", " >..)>#'&.># ", " &)....)& ", " @##' "}; xqf-1.0.5/src/xpm/observe.xpm0000644002404400000620000000140207201342721013011 00000000000000/* XPM */ static char * observe_xpm[] = { "24 24 3 1", " c None", ". c #FFEF00", "+ c #6F87DB", " ", " ", " . ", " ... ", " ..... ", " ....... ", " ......... +++++ ", " .........+++++++++ ", "........+++++++++++++ ", " .....+++..+++++ +++ ", " ..++...++++ ++ ++ ", " +....+++++++ + ", " ++...+++++++ ++ ", " ++...+++++ ++ ", " ..+++++++++++++ ", " .....+++++++++ ", " ......+++++ ", " ....... ", " ...... ", " ..... ", " .... ", " ... ", " .. ", " "}; xqf-1.0.5/src/xpm/group-blue.xpm0000644002404400000620000000064507201342721013435 00000000000000/* XPM */ static char * group_blue_xpm[] = { "16 16 3 1", " c None", ". c #000000", "+ c #3048FF", " ", " ...... ", " .++++++. ", " .++++++++. ", " .++++++++++. ", " .++++++++++++. ", " .++++++++++++. ", " .++++++++++++. ", " .++++++++++++. ", " .++++++++++++. ", " .++++++++++++. ", " .++++++++++. ", " .++++++++. ", " .++++++. ", " ...... ", " "}; xqf-1.0.5/src/xpm/q.xpm0000644002404400000620000000066207201342721011613 00000000000000/* XPM */ static char * q_xpm[] = { "17 17 2 1", " c None", ". c #000000", " ", " . . ", " . . ", " . . ", " . . ", " . . ", " . . ", " . ... . ", " .. . .. ", " .. . .. ", " ... . ... ", " ......... ", " ..... ", " . ", " . ", " . ", " "}; xqf-1.0.5/src/xpm/noflag.xpm0000644002404400000620000000064110141427457012625 00000000000000/* XPM */ static char * noflag_xpm[] = { "21 14 1 1", " g None", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " "}; xqf-1.0.5/src/xpm/lan.png0000644002404400000620000000121107720004447012102 00000000000000PNG  IHDR  GbKGD pHYs  s tIME6]~IDATxUϋaǟyq&H %FCC-x {k@C :H [DtK@1ug9={<@l6fiۙL&jzM"T\.0LX! V٬=vB!]wnl6|>oBDQFv-zaDK4͜NgRYV^fQ`h4A0 p8qhl6;!D@ NzL&!eYDvL&X,TQUU$J|J"ȁ=PۓsGӴ~ d2j0 GOWn>{!}So0U'2 EQ~ʗvEQBv(\H?Z5U%`BWX,&IR\fYVUV ׷sЈW*Kw2<)lIENDB`xqf-1.0.5/src/xpm/sfilter-cfg.xpm0000644002404400000620000000142507201342721013556 00000000000000/* XPM */ static char * sfilter_cfg_xpm[] = { "24 24 4 1", " c None", ". c #000000", "+ c #FF0000", "@ c #00B000", " .... ", " + .... ", " ++ .... ", "++++++++.... ", "+++++++++... ", "++++++++++.. ", "+++++++++... ", "++++++++.... ", " ++ .... ", " + .... @ ", " .... @@ ", " @@@@@@@@@@@@@@@ ", " @@@@@@@@@@@@@@@@ ", " @@@@@@@@@@@@@@@@@ ", " @@@@@@@@@@@@@@@@ ", " @@@@@@@@@@@@@@@ . ", " .... @@ .. ", " .... @ ... ", " .... .... ", " ..... ", " ...... ", " ....... ", " ........ ", " "}; xqf-1.0.5/src/xpm/pfilter.xpm0000644002404400000620000000142107201342721013012 00000000000000/* XPM */ static char * pfilter_xpm[] = { "24 24 4 1", " c None", ". c #000000", "+ c #FF0000", "@ c #00B000", " ... ", " ..... ... ", " + ..... ... ", " ++ ..... . ", " +++++++..... ..... ", " ++++++++.... . ... .", " +++++++++... . ... .", " +++++++++... . ... .", " ++++++++.... . ... .", " +++++++..... . . ", " ++ ..... . . ", " + ..... . . ", " ..... @ . . ", " ..... @@ ", " @@@@@@@@@@@@@@@ ", " @@@@@@@@@@@@@@@@ ", " @@@@@@@@@@@@@@@@@ ", " @@@@@@@@@@@@@@@@@ ", " @@@@@@@@@@@@@@@@ ", " @@@@@@@@@@@@@@@ ", " ..... @@ ", " ..... @ ", " ..... ", " "}; xqf-1.0.5/src/xpm/descent3.xpm0000644002404400000620000000116607356576221013102 00000000000000/* XPM */ static char * descent3_xpm[] = { "16 16 17 1", " c None", ". c #313C65", "+ c #97AED4", "@ c #617CB1", "# c #4A5175", "$ c #F2F5F9", "% c #456098", "& c #839AC5", "* c #CDDAEB", "= c #7690BF", "- c #B7C5E0", "; c #5D6D97", "> c #34497B", ", c #4D6CA8", "' c #7387B6", ") c #6C87B7", "! c #39558F", " ='##%; ", " @..%...!#' ", " ;...;....@@# ", " '...;....>'>.@ ", " #..!&%>>>%&>>> ", "->..%&;!>>%&>>@&", "-..)!=,>!&+;!>&+", "-%;)),;%++)>%&++", "+,,@,,,),,,@+&,+", "=!!!,@!)%@'-&%@+", "=!!!,!=%%=$$,%&)", " @@@!@,!,+$-,@, ", " )!!%,!,++*)@=) ", " ,%@!!%*&&,== ", " =!!!%++@)& ", " @@,@@@ "}; xqf-1.0.5/src/xpm/green-plus.xpm0000644002404400000620000000031107201342721013423 00000000000000/* XPM */ static char * green_plus_xpm[] = { "9 9 2 1", ". c None", "+ c #007000", ".........", "....+....", "....+....", "....+....", ".+++++++.", "....+....", "....+....", "....+....", "........."}; xqf-1.0.5/src/xpm/group-red.xpm0000644002404400000620000000064407201342721013257 00000000000000/* XPM */ static char * group_red_xpm[] = { "16 16 3 1", " c None", ". c #000000", "+ c #FF0000", " ", " ...... ", " .++++++. ", " .++++++++. ", " .++++++++++. ", " .++++++++++++. ", " .++++++++++++. ", " .++++++++++++. ", " .++++++++++++. ", " .++++++++++++. ", " .++++++++++++. ", " .++++++++++. ", " .++++++++. ", " .++++++. ", " ...... ", " "}; xqf-1.0.5/src/xpm/refrsel.xpm0000644002404400000620000000142107201342721013007 00000000000000/* XPM */ static char * refrsel_xpm[] = { "24 24 4 1", " c None", ". c #000000", "+ c #FFFFFF", "@ c #829BFF", " . . ", " .. .. .. .. ", " .+++++++++. ", " +++++++++ ", " . .+++++++++. ", " .. .. .. .. .. ", " ...... .@@@@@@@@@. ", " ......... @@@@@@@@@ ", " .........@@@@@@@@@. ", " . .. .... .. .. .. ", " . . ...@@@@@@@@. ", ".. ..@@@@@@@@ ", ".. ..@@@@@@@@. ", "... . .. .. .. .. ", " ... .. ..@@@@@@@@@. ", " ......... @@@@@@@@@ ", " ......... .@@@@@@@@@. ", " ...... .. .. .. .. ", " .. .+++++++++. ", " . +++++++++ ", " .+++++++++. ", " .. .. .. . ", " . . ", " "}; xqf-1.0.5/src/xpm/sfs.xpm0000644002404400000620000000066407201344536012156 00000000000000/* XPM */ static char * sfs_xpm[] = { "17 17 2 1", " c None", ". c #000000", " .... ", " . ", " . ", " ... ", " . ", " . ", " .... ... ", " . . ", " . . ", " . . ", " ... ..... ", " . ", " . ", " ... ", " . ", " . ", " . "}; xqf-1.0.5/src/xpm/man-yellow.xpm0000644002404400000620000000045710201207134013431 00000000000000/* XPM */ static char *man_yellow_xpm[]={ "9 17 2 1", ". c None", "# c #ffdc3a", ".........", ".........", "...###...", "...###...", "...###...", "....#....", "..#####..", ".#.###.#.", ".#.###.#.", ".#.###.#.", ".#.###.#.", "...#.#...", "...#.#...", "...#.#...", "...#.#...", ".........", "........."}; xqf-1.0.5/src/xpm/postal2.xpm0000644002404400000620000000075507773152555012764 00000000000000/* XPM */ static char * postal2_xpm[] = { "16 16 8 1", " c None", ". c #6F1010", "+ c #92090B", "@ c #E20608", "# c #CE0808", "$ c #B00A0C", "% c #550C0C", "& c #C20607", " ", " ", " .. ", " +@@@@#+ ++$. ", " %#@+$@@. % +. ", " && +@+ +&. ", " && +@& .$+ ", " $#..&@$ %&$+% ", " $@@#&+ .+$+% ", " $@+. ", " %#@+ ", " .@@# ", " %$++ ", " ", " ", " "}; xqf-1.0.5/src/xpm/refresh.xpm0000644002404400000620000000136307201342721013010 00000000000000/* XPM */ static char * refresh_xpm[] = { "24 24 2 1", " c None", ". c #000000", " ", " ", " ", " ", " . ", " .. ", " ...... ", " ......... ", " ......... ", " . .. ... ", " . . ... ", " .. .. ", " .. .. ", " ... . . ", " ... .. . ", " ......... ", " ......... ", " ...... ", " .. ", " . ", " ", " ", " ", " "}; xqf-1.0.5/src/xpm/man-red.xpm0000644002404400000620000000045707201342721012700 00000000000000/* XPM */ static char * man_red_xpm[] = { "9 17 2 1", " c None", ". c #FF0000", " ", " ", " ... ", " ... ", " ... ", " . ", " ..... ", " . ... . ", " . ... . ", " . ... . ", " . ... . ", " . . ", " . . ", " . . ", " . . ", " ", " "}; xqf-1.0.5/src/xpm/sfilter.xpm0000644002404400000620000000142107201342721013015 00000000000000/* XPM */ static char * sfilter_xpm[] = { "24 24 4 1", " c None", ". c #000000", "+ c #FF0000", "@ c #00B000", " ", " ..... ", " + ..... ", " ++ ..... ", " +++++++++..... ", " ++++++++++.... ", " +++++++++++... ", " +++++++++++... ", " ++++++++++.... ", " +++++++++..... ", " ++ ..... ", " + ..... ", " ..... @ ", " ..... @@ ", " @@@@@@@@@@@@@@@@@ ", " @@@@@@@@@@@@@@@@@@ ", " @@@@@@@@@@@@@@@@@@@ ", " @@@@@@@@@@@@@@@@@@@ ", " @@@@@@@@@@@@@@@@@@ ", " @@@@@@@@@@@@@@@@@ ", " ..... @@ ", " ..... @ ", " ..... ", " "}; xqf-1.0.5/src/xpm/record.xpm0000644002404400000620000000140107201342721012621 00000000000000/* XPM */ static char * record_xpm[] = { "24 24 3 1", " c None", ". c #000000", "+ c #FFEF00", " ", " ..... ..... ", " ..... + ..... ", " . ..+++......... . ", " . .+++++........ . ", " . +++++++....... . ", " ...+++++++++ ..... ", " ..+++++++++++ ..... ", " .+++++++++++++ . . ", " . ++++++++++++ . . ", " . .+++++++++++ . . ", " ..... +++++++++ ..... ", " ..... ++++++ ..... ", " . . ++++++ . . ", " . . ++++++ . . ", " . . ++++++++ . . ", " ..... ++++++++ ..... ", " ..... +++++++ ..... ", " . .......++++++. . ", " . .........+++++ . ", " . ...........++++ . ", " ..... +++.. ", " ..... ..++. ", " "}; xqf-1.0.5/src/xpm/server-error.xpm0000644002404400000620000000073307201342721014007 00000000000000/* XPM */ static char * server_error_xpm[] = { "17 17 4 1", " c None", ". c #7F0000", "+ c #FF0000", "@ c #FFFFFF", " ", " ", " ....... ", " .+++++++. ", " .+++++++++. ", " .+++++++++++. ", " .+++++++++++. ", " .+@@@@@@@@@+. ", " .+@@@@@@@@@+. ", " .+@@@@@@@@@+. ", " .+++++++++++. ", " .+++++++++++. ", " .+++++++++. ", " .+++++++. ", " ....... ", " ", " "}; xqf-1.0.5/src/xpm/rune.xpm0000644002404400000620000000101107355166567012337 00000000000000/* XPM */ static char * rune_xpm[] = { "16 16 10 1", " c None", ". c #E3E3E3", "+ c #1C1C1C", "@ c #000000", "# c #555555", "$ c #8E8E8E", "% c #AAAAAA", "& c #393939", "* c #C6C6C6", "= c #717171", " ", " .+@@@#$%%. ", " @@&*%&@@% ", " #@# #@@* ", " #@+@@@&. ", " #@#*#@@@@$ ", " %@# $@@= ", " %@# %@@% ", " @# %@+ ", " +# =@= ", " =$ #@. ", " %% @# ", " %% *@* ", " .. =& ", " &. ", " %% "}; xqf-1.0.5/src/xpm/et.xpm0000644002404400000620000000067707652322653012005 00000000000000/* XPM */ static char *et_xpm[]={ "17 17 3 1", ". c None", "a c #303030", "# c #c00000", ".................", "......#...#......", "......##.##......", "......##.##......", "#####.#...#.#####", "...#..#...#..#...", ".######...######.", ".................", "..####..#..####..", ".....#..#..#.....", ".aaa.#..#..#.aaa.", ".a...#..#..#..a..", ".aa..#.##.##..a..", ".a...##.##.#..a..", ".aaa.#..#..#..a..", "........#........", "................."}; xqf-1.0.5/src/xpm/Makefile.am0000644002404400000620000000014507746756415012704 00000000000000EXTRA_DIST=$(wildcard *.xpm) $(flag_DATA) flagdir = $(pkgdatadir)/default/flags flag_DATA = lan.png xqf-1.0.5/src/xpm/Makefile.in0000644002404400000620000002607310523105435012676 00000000000000# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = src/xpm DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/src/gnuconfig.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(flagdir)" flagDATA_INSTALL = $(INSTALL_DATA) DATA = $(flag_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_XQFRCON_FALSE = @BUILD_XQFRCON_FALSE@ BUILD_XQFRCON_TRUE = @BUILD_XQFRCON_TRUE@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COMPRESSION = @COMPRESSION@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEBUG = @DEBUG@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DUMMY_LIBGDKPIXBUF_FALSE = @DUMMY_LIBGDKPIXBUF_FALSE@ DUMMY_LIBGDKPIXBUF_ORIG = @DUMMY_LIBGDKPIXBUF_ORIG@ DUMMY_LIBGDKPIXBUF_SONAME = @DUMMY_LIBGDKPIXBUF_SONAME@ DUMMY_LIBGDKPIXBUF_TRUE = @DUMMY_LIBGDKPIXBUF_TRUE@ DUMMY_LIBGEOIP_FALSE = @DUMMY_LIBGEOIP_FALSE@ DUMMY_LIBGEOIP_ORIG = @DUMMY_LIBGEOIP_ORIG@ DUMMY_LIBGEOIP_SONAME = @DUMMY_LIBGEOIP_SONAME@ DUMMY_LIBGEOIP_TRUE = @DUMMY_LIBGEOIP_TRUE@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GDK_PIXBUF_CFLAGS = @GDK_PIXBUF_CFLAGS@ GDK_PIXBUF_CONFIG = @GDK_PIXBUF_CONFIG@ GDK_PIXBUF_LIBS = @GDK_PIXBUF_LIBS@ GEOIP_LIB = @GEOIP_LIB@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_CONFIG = @GLIB_CONFIG@ GLIB_LIBS = @GLIB_LIBS@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_CONFIG = @GTK_CONFIG@ GTK_LIBS = @GTK_LIBS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@ INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@ INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_ICONV = @INTLTOOL_ICONV@ INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@ INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_MSGFMT = @INTLTOOL_MSGFMT@ INTLTOOL_MSGMERGE = @INTLTOOL_MSGMERGE@ INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@ INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@ INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@ INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@ INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@ INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@ INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@ INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@ INTLTOOL_XGETTEXT = @INTLTOOL_XGETTEXT@ INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@ INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MSGFMT = @MSGFMT@ OBJEXT = @OBJEXT@ OLD_GTK_SUPPORT = @OLD_GTK_SUPPORT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_CFLAGS = @PACKAGE_CFLAGS@ PACKAGE_LIBS = @PACKAGE_LIBS@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ QSTATEXEC = @QSTATEXEC@ RANLIB = @RANLIB@ RELEASE = @RELEASE@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ XQFRCON_LIBS = @XQFRCON_LIBS@ ac_ct_CC = @ac_ct_CC@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ datadir = @datadir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ EXTRA_DIST = $(wildcard *.xpm) $(flag_DATA) flagdir = $(pkgdatadir)/default/flags flag_DATA = lan.png all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/xpm/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu src/xpm/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh uninstall-info-am: install-flagDATA: $(flag_DATA) @$(NORMAL_INSTALL) test -z "$(flagdir)" || $(mkdir_p) "$(DESTDIR)$(flagdir)" @list='$(flag_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(flagDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(flagdir)/$$f'"; \ $(flagDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(flagdir)/$$f"; \ done uninstall-flagDATA: @$(NORMAL_UNINSTALL) @list='$(flag_DATA)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(flagdir)/$$f'"; \ rm -f "$(DESTDIR)$(flagdir)/$$f"; \ done tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(DATA) installdirs: for dir in "$(DESTDIR)$(flagdir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-flagDATA install-exec-am: install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-flagDATA uninstall-info-am .PHONY: all all-am check check-am clean clean-generic distclean \ distclean-generic distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-exec \ install-exec-am install-flagDATA install-info install-info-am \ install-man install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic pdf pdf-am ps ps-am uninstall \ uninstall-am uninstall-flagDATA uninstall-info-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xqf-1.0.5/src/xpm/hl.xpm0000644002404400000620000000066307201342721011757 00000000000000/* XPM */ static char * hl_xpm[] = { "17 17 2 1", " c None", ". c #000000", " ", " ..... ", " .. .. ", " . . ", " . ... . ", " . ... . ", " . .. . ", " . ... . ", " . .. .. . ", " . .. .. . ", " . .. ... . ", " . .. ... . ", " . . ", " . . ", " .. .. ", " ..... ", " "}; xqf-1.0.5/src/xpm/hw.xpm0000644002404400000620000000066307201342721011772 00000000000000/* XPM */ static char * hw_xpm[] = { "17 17 2 1", " c None", ". c #006060", " ", " .. . ", " .. . ", " .. .. ", " .. .. ", " .. ... ", " .... ", " ... ", " .... ", " ... .. ", " ... .. ", " .. .. ", " .. . ", " .. . ", " . . ", " ", " "}; xqf-1.0.5/src/xpm/buddy-green.xpm0000644002404400000620000000071507201342721013557 00000000000000/* XPM */ static char * buddy_green_xpm[] = { "18 17 2 1", " c None", ". c #00D000", " ", " ", " ", " ", " ", " ", " ", " ", " .... ", " ...... ", " ........ ", " ........ ", " ........ ", " ........ ", " ...... ", " .... ", " "}; xqf-1.0.5/src/xpm/ssam.xpm0000644002404400000620000000075707574125506012340 00000000000000/* XPM */ /* extracted from SeriousSam.exe with wrestool */ static char * ssam_xpm[] = { "16 16 5 1", " c None", ". c #FF0000", "+ c #FFFF00", "@ c #000000", "# c #808000", " . ", " .+. ", " ....++.... ", " .+@++++++. ", " .+@+@@@@#+. ", "..++@#@@@@@@+...", " .++@+@@#@#@#+. ", " .++@#@+#@+@@+. ", " .++@#@@@@@@@+. ", "..+@@+@@#++@#+. ", " ..+++#@@@@@+...", " .+++++@@#+. ", " .+++++++++. ", " ....++.... ", " . .. . ", " .. "}; xqf-1.0.5/src/xpm/tremulous.xpm0000644002404400000620000000115010415666670013420 00000000000000/* XPM */ static char * tremulous_xpm[] = { "16 16 16 1", " c None", ". c #000000", "+ c #010101", "@ c #020202", "# c #030303", "$ c #040404", "% c #050505", "& c #060606", "* c #070707", "= c #080808", "- c #090909", "; c #0A0A0A", "> c #0B0B0B", ", c #0C0C0C", "' c #0D0D0D", ") c #0E0E0E", " & ", " =.+ ", " * +.. $ ", " -+ ...# #; ", " %@ +.. .* ", " +# )...,+& ", " @@+.... ", " %..... ", " $.....+ ", " -$+...... ", " ....., ", " *....++, ", " # #.@ # ", " & > ", " ' ", " "}; xqf-1.0.5/src/xpm/kp.xpm0000644002404400000620000000066307201342721011766 00000000000000/* XPM */ static char * kp_xpm[] = { "17 17 2 1", " c None", ". c #000000", " ", " .. ", " .... ", " .... ", " ..... ", " ....... ", " ........ ", " ....... . ", " ..... . ", " .... . ", " ..... ", " .... ", " .... ", " .... ", " ... ", " ", " "}; xqf-1.0.5/src/xpm/q1.xpm0000644002404400000620000000066307201342721011675 00000000000000/* XPM */ static char * q1_xpm[] = { "17 17 2 1", " c None", ". c #603000", " ", " . . ", " . . ", " . . ", " . . ", " . . ", " . . ", " . ... . ", " .. . .. ", " .. . .. ", " ... . ... ", " ......... ", " ..... ", " . ", " . ", " . ", " "}; xqf-1.0.5/src/xpm/sof2s.xpm0000644002404400000620000000066607545620035012423 00000000000000/* XPM */ static char * sof2s_xpm[] = { "17 17 2 1", " c None", ". c #000000", " .... ", " . ", " . ", " ... ", " . ", " . ", " .... ... ", " . . ", " . . ", " . . ", " ... ..... ", " ... . ", " . . . ", " . ... ", " ... . ", " . . ", " ..... . "}; xqf-1.0.5/src/xpm/aao.xpm0000644002404400000620000000116107710731675012125 00000000000000/* XPM */ static char * aao_xpm[] = { "16 16 17 1", " c None", ". c #030304", "+ c #E2E2E2", "@ c #222242", "# c #C6C6C6", "$ c #42424A", "% c #6A6E82", "& c #626672", "* c #555567", "= c #A64A5A", "- c #18182E", "; c #C4B0B4", "> c #8A162A", ", c #B26272", "' c #121226", ") c #FDFBFB", "! c #E1CBD0", "@@@@@@@@>>>>>>>>", "@''@@@@@>>>>>>>>", ".-@@@@@@>>>>>>>>", "..'@@@@->>>>>>>>", "..@@@@@*=>>>>>>>", "..'@@@';;>>>>>>>", "...-&%&#!=,,>>>>", "....&#))))!=>>>>", ">>>>>>!))#--....", ">>>>>>!))#@'....", ">>>>>>+=$+-.....", ">>>>>>=>-*....--", ">>>>>>>>@@...-@@", ">>>>>>>>@@----@@", ">>>>>>>>@@@@@@@@", ">>>>>>>>@@-@@@@@"}; xqf-1.0.5/src/xpm/q2.xpm0000644002404400000620000000066307201342721011676 00000000000000/* XPM */ static char * q2_xpm[] = { "17 17 2 1", " c None", ". c #006060", " ", " . . ", " . . ", " . . ", " . . ", " . . ", " . . ", " . ... ... . ", " .. . . .. ", " .. . . .. ", " .... .... ", " ......... ", " ..... ", " . . ", " . . ", " . . ", " "}; xqf-1.0.5/src/xpm/q3.xpm0000644002404400000620000000066307201342721011677 00000000000000/* XPM */ static char * q3_xpm[] = { "17 17 2 1", " c None", ". c #603000", " ", " . ", " . ", " . ", " . ", " . . . ", " . . . ", " . . . ", " ... . ... ", " ..... . ..... ", " ... . ... ", " . . . ", " . . . ", " . . . ", " . . . ", " . ", " "}; xqf-1.0.5/src/xpm/q4.xpm0000644002404400000620000000071210321470063011671 00000000000000/* XPM */ static char * q4_xpm[] = { "16 16 6 1", " c None", ". c #061C07", "+ c #0B210C", "@ c #112612", "# c #142915", "$ c #1A2E1B", " . . ", " . . ", " . . ", " . . ", " . . ", " . . ", " .. .. ", " .. .. .. ", " ... .. ... ", " ........ ", " ...... ", " .. ", " .. ", " .. ", " .. ", " "}; xqf-1.0.5/src/xpm/red-minus.xpm0000644002404400000620000000031007201342721013244 00000000000000/* XPM */ static char * red_minus_xpm[] = { "9 9 2 1", ". c None", "+ c #C00000", ".........", ".........", ".........", ".........", ".+++++++.", ".........", ".........", ".........", "........."}; xqf-1.0.5/src/xpm/group-green.xpm0000644002404400000620000000064607201342721013607 00000000000000/* XPM */ static char * group_green_xpm[] = { "16 16 3 1", " c None", ". c #000000", "+ c #00D000", " ", " ...... ", " .++++++. ", " .++++++++. ", " .++++++++++. ", " .++++++++++++. ", " .++++++++++++. ", " .++++++++++++. ", " .++++++++++++. ", " .++++++++++++. ", " .++++++++++++. ", " .++++++++++. ", " .++++++++. ", " .++++++. ", " ...... ", " "}; xqf-1.0.5/src/xpm/t2.xpm0000644002404400000620000000200507406747066011713 00000000000000/* XPM */ static char * t2_xpm[] = { "16 16 44 1", " c None", ". c #3E2802", "+ c #6C4602", "@ c #D08A00", "# c #553700", "$ c #493005", "% c #B17500", "& c #472E00", "* c #8A5A00", "= c #A26A00", "- c #392500", "; c #3D2B0B", "> c #966200", ", c #724A00", "' c #000000", ") c #38280C", "! c #696969", "~ c #77520E", "{ c #7F5200", "] c #35260D", "^ c #422C06", "/ c #4F3E1D", "( c #634206", "_ c #503403", ": c #865700", "< c #1B1100", "[ c #281900", "} c #2C1D04", "| c #9A6500", "1 c #2F2007", "2 c #925F00", "3 c #A96F00", "4 c #B57700", "5 c #241702", "6 c #C98500", "7 c #492F00", "8 c #CC8700", "9 c #603F00", "0 c #A66D00", "a c #D88F00", "b c #5C3C00", "c c #D48D00", "d c #513400", "e c #332100", " . . ", " +@# #@+ ", " $%%& &%%$ ", " *=- -=* ", " ;>,' ',>; ", " )!~{{{]]{{{~!) ", " ^/(_:>]]>:_(/^ ", " <[< {>]]>{ <[< ", " {>}}>{ ", " *|11|* ", " 231132 ", " 245542 ", " |6776| ", " 38998= ", " 0abbc0 ", " d9ee9d "}; xqf-1.0.5/src/xpm/stvef.xpm0000644002404400000620000000116007465224631012507 00000000000000/* XPM */ static char * ef_xpm[] = { "16 16 17 1", " c None", ". c #37100E", "+ c #50442E", "@ c #9A8C62", "# c #6A5B34", "$ c #A40202", "% c #6E6D6A", "& c #9E7F41", "* c #ADADAD", "= c #69210E", "- c #8F6016", "; c #924808", "> c #A92B03", ", c #96701F", "' c #87837B", ") c #724A1A", "! c #999691", " ", " ++ ", " )+) ", " -@') ", " %&**- ", " '*&#,***@)+>+; ", "'>.$=-***!-.$.>%", "'>%!&@**!!&'!#=&", "-.==-***!!@;.=.)", "%>)>-!*!'''-$==%", " #%%,!!&,,&,+++ ", " ,!- -, ", " #,- -+ ", " &- + ", " , ", " "}; xqf-1.0.5/src/xpm/hex.xpm0000644002404400000620000000066407201342721012141 00000000000000/* XPM */ static char * hex_xpm[] = { "17 17 2 1", " c None", ". c #800000", " ", " .. . ", " .. . ", " .. .. ", " .. .. ", " .. ... ", " .... ", " ... ", " .... ", " ... .. ", " ... .. ", " .. .. ", " .. . ", " .. . ", " . . ", " ", " "}; xqf-1.0.5/src/xpm/savage.xpm0000644002404400000620000000116407741114174012627 00000000000000/* XPM */ static char * savage_xpm[] = { "16 16 17 1", " c None", ". c #070504", "+ c #4C473B", "@ c #B6A382", "# c #82673F", "$ c #8A7654", "% c #4A3A25", "& c #D7C68F", "* c #463116", "= c #AA946D", "- c #584833", "; c #D2B256", "> c #99835E", ", c #C8B898", "' c #221A0F", ") c #DED4C4", "! c #6F522B", " =&,$> ", " ,,&,#$# ", " =)@,&$$!- ", " @@>,&#>#!- ", " =>>$,,>>>!! ", " $$#$>+++++>#->$", " @!*!$.....$!*!$", "=&!'#=$+.+$=!'#;", "=;#.#@=@.,=$!.>&", "!;>.>@=@.,>$#.;&", " >;-==>@.,=$!'&>", " #+->>@.,>$%*! ", " '%$.>-' ", " ..... ", " ", " "}; xqf-1.0.5/src/xpm/hl2.xpm0000644002404400000620000000066110175516612012045 00000000000000/* XPM */ static char *hl2_xpm[]={ "17 17 2 1", ". c None", "# c #000000", ".................", ".....###########.", "...##....####..##", "..#........###.##", ".#..###.....##..#", ".#..###.....#####", "#.....##.....###.", "#....###.....###.", "#...##.##....##..", "#...##.##....##..", "#..##...###..#...", ".#.##...###.#....", ".#..........#....", "..#........#.....", "...##....##......", ".....####........", "................."}; xqf-1.0.5/src/xpm/ut2.xpm0000644002404400000620000000610007556015302012063 00000000000000/* XPM */ static char *ut2_xpm[]={ "16 16 157 2", "Qt c None", "#s c #160f04", "#H c #171208", "#d c #21190c", "#r c #221a0d", "#G c #221b10", "al c #231c10", "aw c #241e13", "ax c #241e14", "a# c #272013", "av c #272117", "ay c #27221b", "#c c #2c2417", "#Q c #2c2519", "#B c #2d2519", "#V c #2d271f", "aq c #2f220c", "ak c #2f281e", "am c #302718", "#m c #30281c", "ar c #30291d", "au c #302b23", "#Y c #31291d", ".1 c #322a1d", "an c #35250b", "#Z c #352d21", "az c #35302a", ".9 c #362e21", "#e c #373126", ".0 c #3e3628", "#M c #3e3629", "#t c #3e3931", "at c #3e3b34", "aa c #3f3422", ".V c #3f372b", "#L c #40382b", "#I c #403b34", "aj c #403c34", "#C c #423828", ".N c #42392c", ".2 c #423a2f", "a. c #433c31", "#U c #473517", "#R c #473e2e", "#0 c #473f30", ".M c #473f32", "#K c #494134", "#. c #4a4133", "aA c #4a4640", "#x c #4b4336", ".W c #4c4336", "#n c #4e4535", ".# c #4e493e", "#q c #4f3c1c", "#F c #4f3d1d", "as c #4f3f26", "#W c #534631", ".H c #554e41", ".O c #554e43", "#w c #564d40", ".B c #575145", "ao c #584017", "#b c #5b4b2d", "#v c #5c5242", ".g c #5d574a", ".z c #5f5546", "#X c #605a4e", ".Z c #615235", ".A c #625a4c", "#i c #635a4d", ".p c #665f51", ".I c #685d48", ".a c #6a6354", ".4 c #6b5a3c", ".L c #6c5b39", ".5 c #6c6356", "#h c #6f675a", ".f c #726a5d", "#f c #746b58", "#g c #756346", ".R c #765e34", "#J c #766f62", "ag c #77581d", ".P c #777267", "ai c #785822", ".h c #7d786d", ".o c #7f6e50", ".u c #81796d", "#P c #825f21", "#u c #827660", "ap c #835f21", "#A c #836022", "#l c #836226", ".m c #867e72", ".e c #877f72", "#4 c #897857", ".j c #897f6c", "#9 c #8b7451", ".v c #8c8272", ".b c #8c857a", ".d c #8f887b", ".w c #90897b", ".t c #91887a", ".k c #91897d", "ab c #92733a", ".l c #948c7f", "#N c #99835a", ".c c #9b9488", "af c #9c701f", ".8 c #9c8048", "ah c #9e7628", "#O c #9e7728", ".U c #a28957", ".q c #a29c8f", "#k c #a37c2f", ".y c #a38650", "#y c #a48e64", ".G c #a49065", "#z c #a57e30", "#j c #a59371", ".C c #a8a399", ".n c #aa9f8c", "#1 c #b19a6c", "#3 c #b28b3e", "#8 c #b39353", "#p c #b48833", ".3 c #b6a68a", "ac c #be9036", ".i c #c0af8c", "#5 c #c2ac80", ".6 c #c2b293", ".S c #c4ab7a", "#o c #c6a25a", ".Q c #c7b18a", "#2 c #c99939", "ad c #cc9d3f", "#S c #cca659", "#7 c #cfa042", ".s c #cfb580", "#6 c #d1a344", "#a c #d3ad60", "#T c #d5a647", "ae c #daa948", "#D c #dab56c", "#E c #dcae53", "## c #dcbf85", ".x c #e1d3b7", ".K c #e5bf74", ".J c #e5d2aa", ".X c #eadbb8", ".7 c #ebcb8c", ".Y c #edce8f", ".F c #edd3a0", ".r c #eeddba", ".T c #f0d7a4", ".D c #f0ddb7", ".E c #f2ddb2", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQt.#.a.b.c.d.e.f.gQtQtQt", "QtQtQtQt.h.i.j.k.l.m.m.n.o.pQtQt", "QtQtQt.q.r.s.t.u.v.w.x.y.z.A.BQt", "QtQt.C.D.E.F.G.H.I.J.K.L.M.N.OQt", "Qt.P.Q.R.S.T.U.V.W.X.Y.Z.0.1.2Qt", "Qt.3.4.5.6.7.8.9#.###a#b#c#d#eQt", "#f#g#h#i#j#k#l#m#n#o#p#q#r#s#tQt", "#u#v#w#x#y#z#A#B#C#D#E#F#G#H#IQt", "#J#K#L#M#N#O#P#Q#R#S#T#U#V#WQtQt", "#X#Y#Z#0#1#2#3#4#5#6#7#8#9QtQtQt", "Qta.a#aaabacadaeafagahaiQtQtQtQt", "QtajakalamanaoapaqarasQtQtQtQtQt", "QtQtatauavawaxayazaAQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt"}; xqf-1.0.5/src/xpm/sn.xpm0000644002404400000620000000066307201342721011774 00000000000000/* XPM */ static char * sn_xpm[] = { "17 17 2 1", " c None", ". c #800000", " ", " ", " ", " ..... ", " ....... ", " .... ", " ........ ", " .... ", " ..... ", " ..... ", " ..... ", " .... ", " ... ", " ", " ", " ", " "}; xqf-1.0.5/src/xpm/netp.xpm0000644002404400000620000000116210127501452012314 00000000000000/* XPM */ static char * netp_xpm[] = { "16 16 17 1", " c None", ". c #1B120B", "+ c #1D2B1A", "@ c #1A2D27", "# c #274226", "$ c #2F403A", "% c #3F4F38", "& c #365437", "* c #3A5143", "= c #414D47", "- c #475A53", "; c #436242", "> c #46634C", ", c #4D6B4C", "' c #55785C", ") c #5F8668", "! c #FEFFFC", " ", " ", " ;% ", " ;&=>';, ", " >;%>#=&;; ", " =;=>@&;,$;%' ", "+>,-**#.>*;>=; ", "@*'##&@;;==;,;; ", " .*$&#&;;,,>>,&,", " @$#&,;;')*=>,&", " +*&%%))')> ", " ;;$*#%-') ", " &; @@$>-+ ", " ,; +$ ", " ", " "}; xqf-1.0.5/src/xpm/pfilter-cfg.xpm0000644002404400000620000000142507201342721013553 00000000000000/* XPM */ static char * pfilter_cfg_xpm[] = { "24 24 4 1", " c None", ". c #000000", "+ c #FF0000", "@ c #00B000", " .... ... ", " + .... ... ", " ++ .... ... ", "+++++++.... . ", "++++++++... ..... ", "+++++++++.. . ... .", "++++++++... . ... .", "+++++++.... . ... .", " ++ .... . ... .", " + .... @ . . ", " .... @@ . . ", " @@@@@@@@@@@@@@ . . ", " @@@@@@@@@@@@@@@ . . ", " @@@@@@@@@@@@@@@@ ", " @@@@@@@@@@@@@@@ ", " @@@@@@@@@@@@@@ . ", " .... @@ .. ", " .... @ ... ", " .... .... ", " ..... ", " ...... ", " ....... ", " ........ ", " "}; xqf-1.0.5/src/xpm/un.xpm0000644002404400000620000000533707556015301012005 00000000000000/* XPM */ static char *un_xpm[]={ "16 16 135 2", "Qt c None", "#f c #160f04", "#s c #171208", ".4 c #21190c", "#e c #221a0d", "#r c #221b10", "#3 c #231c10", "ab c #241e13", "ac c #241e14", "#S c #272013", "aa c #272117", "ad c #27221b", ".3 c #2c2417", "#A c #2c2519", "#m c #2d2519", "#F c #2d271f", "#8 c #2f220c", "#2 c #2f281e", "#4 c #302718", "## c #30281c", "#9 c #30291d", "a# c #302b23", ".b c #303030", "#H c #31291d", ".R c #322a1d", "#5 c #35250b", "#I c #352d21", "ae c #35302a", ".Y c #362e21", ".5 c #373126", ".Q c #3e3628", "#w c #3e3629", "#g c #3e3931", ".e c #3e3b34", "#T c #3f3422", ".L c #3f372b", "#v c #40382b", "#t c #403b34", "#n c #423828", ".F c #42392c", ".S c #423a2f", "#E c #473517", "#B c #473e2e", ".E c #473f32", "#u c #494134", ".Z c #4a4133", ".# c #4a4640", "#i c #4b4336", ".M c #4c4336", "#a c #4e4535", ".c c #4e493e", "#d c #4f3c1c", "#q c #4f3d1d", "a. c #4f3f26", "#G c #534631", ".z c #554e41", "#6 c #584017", ".a c #585858", ".2 c #5b4b2d", "#h c #5c5242", ".s c #5f5546", ".P c #615235", ".t c #625a4c", ".7 c #635a4d", ".A c #685d48", ".T c #6b5a3c", ".D c #6c5b39", ".U c #6c6356", ".6 c #6f675a", ".H c #765e34", "#Z c #77581d", "#1 c #785822", ".f c #7d786d", ".j c #7f6e50", ".n c #81796d", "#z c #825f21", "#7 c #835f21", "#l c #836022", "#. c #836226", ".h c #867e72", "#M c #897857", ".d c #897f6c", "#R c #8b7451", ".o c #8c8272", ".p c #90897b", ".m c #91887a", "#U c #92733a", "#x c #99835a", "#Y c #9c701f", ".X c #9c8048", "#0 c #9e7628", "#y c #9e7728", ".K c #a28957", ".9 c #a37c2f", ".r c #a38650", "#j c #a48e64", ".y c #a49065", "#k c #a57e30", ".8 c #a59371", ".u c #a8a399", ".i c #aa9f8c", "#J c #b19a6c", "#L c #b28b3e", "#Q c #b39353", "#c c #b48833", "#V c #be9036", ".g c #c0af8c", "#N c #c2ac80", ".V c #c2b293", ".I c #c4ab7a", "#b c #c6a25a", ".G c #c7b18a", "#K c #c99939", "#W c #cc9d3f", "#C c #cca659", "#P c #cfa042", ".l c #cfb580", "#O c #d1a344", ".1 c #d3ad60", "#D c #d5a647", "#X c #daa948", "#o c #dab56c", "#p c #dcae53", ".0 c #dcbf85", ".q c #e1d3b7", ".C c #e5bf74", ".B c #e5d2aa", ".N c #eadbb8", ".W c #ebcb8c", ".O c #edce8f", ".x c #edd3a0", ".k c #eeddba", ".J c #f0d7a4", ".v c #f0ddb7", ".w c #f2ddb2", "QtQtQtQtQt.#.a.a.a.b.#QtQtQtQtQt", "QtQtQt.#.#.c.a.d.d.d.#.#.#QtQtQt", "QtQt.#.e.f.g.d.d.d.h.h.i.j.#QtQt", "QtQt.e.e.k.l.m.n.o.p.q.r.s.tQtQt", "Qt.#.u.v.w.x.y.z.A.B.C.D.E.F.#Qt", "Qt.#.G.H.I.J.K.L.M.N.O.P.Q.R.SQt", "Qt.e.T.U.V.W.X.Y.Z.0.1.2.3.4.5Qt", "Qt.e.6.7.8.9#.###a#b#c#d#e#f#gQt", "Qt#h.e#i#j#k#l#m#n#o#p#q#r#s#tQt", "Qt#u#v#w#x#y#z#A#B#C#D#E#F#G.#Qt", "Qt#H#I.e#J#K#L#M#N#O#P#Q#R.e.#Qt", "QtQt#S#T#U#V#W#X#Y#Z#0#1.e.eQtQt", "QtQt#2#3#4#5#6#7#8#9a..e.e.eQtQt", "QtQtQta#aaabacadae.#.e.e.eQtQtQt", "QtQtQtQtQt.#.#.#.#.#.#QtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt"}; xqf-1.0.5/src/xpm/wo.xpm0000644002404400000620000000066307353364164012016 00000000000000/* XPM */ static char * wo_xpm[] = { "17 17 2 1", " c None", ". c #c00000", " ", " . . ", " .. .. ", " .. .. ", "..... . . .....", " . . . . ", " ...... ...... ", " ", " .... . .... ", " . . . ", " . . . ", " . . . ", " . .. .. ", " .. .. . ", " . . . ", " . ", " "}; xqf-1.0.5/src/xpm/hr2.xpm0000644002404400000620000000066407201342721012050 00000000000000/* XPM */ static char * hr2_xpm[] = { "17 17 2 1", " c None", ". c #603000", " ", " . ", " . ", " ......... ", " ......... ", " . ", " . ", " . ", " ............. ", " ............. ", " .. . .. ", " . . . ", " .. . .. ", " . . . ", " .. . .. ", " . . . ", " "}; xqf-1.0.5/src/xpm/buddy-blue.xpm0000644002404400000620000000071407201342721013405 00000000000000/* XPM */ static char * buddy_blue_xpm[] = { "18 17 2 1", " c None", ". c #3048FF", " ", " ", " ", " ", " ", " ", " ", " ", " .... ", " ...... ", " ........ ", " ........ ", " ........ ", " ........ ", " ...... ", " .... ", " "}; xqf-1.0.5/src/xpm/nexuiz.xpm0000644002404400000620000000116410250302622012665 00000000000000/* XPM */ static char * nexuiz_xpm[] = { "16 16 17 1", " c None", ". c #000300", "+ c #0B0D09", "@ c #181917", "# c #252624", "$ c #363835", "% c #424441", "& c #4D4E4C", "* c #565855", "= c #5F605E", "- c #656764", "; c #737572", "> c #7F817E", ", c #898B88", "' c #9FA19E", ") c #ABADAA", "! c #C1C3C0", " =- ", " ;.@; ", " '+.*'*%$- ", " &........+%", " =$+.......#...-", " ;$$@..#%-)!..@ ", " ,.@ ..& ", " =.% >..- ", " $.; ;.@ ", " ,.$ %.$ ", " #@ @.> ", " =# >.# ", " ;& $., ", " , !=.* ", " #& ", " "}; xqf-1.0.5/src/xpm/locked.xpm0000644002404400000620000000070607221023776012623 00000000000000/* XPM */ static char * locked_xpm[] = { "17 17 3 1", " c None", ". c #7F0000", "+ c #FF0000", " ", " ", " +++ ", " +...+ ", " .+. .+. ", " .+. .+. ", " .+. .+. ", " ........... ", " .+++++++++. ", " .+ +. ", " .+++++++++. ", " .+ +. ", " .+++++++++. ", " ........... ", " ", " ", " "}; xqf-1.0.5/src/xpm/man-black.xpm0000644002404400000620000000046107201342721013175 00000000000000/* XPM */ static char * man_black_xpm[] = { "9 17 2 1", " c None", ". c #000000", " ", " ", " ... ", " ... ", " ... ", " . ", " ..... ", " . ... . ", " . ... . ", " . ... . ", " . ... . ", " . . ", " . . ", " . . ", " . . ", " ", " "}; xqf-1.0.5/src/xpm/delete.xpm0000644002404400000620000000064110275437461012625 00000000000000/* XPM */ static char * delete_xpm[] = { "16 16 3 1", " c None", ". c #000000", "+ c #FFFFFF", " ", " ", " ", " .......... ", " .++....++.. ", " .+++..+++... ", " ..++++++..... ", " ...++++....... ", " ...++++....... ", " ..++++++..... ", " .+++..+++... ", " .++....++.. ", " .......... ", " ", " ", " "}; xqf-1.0.5/src/xpm/connect.xpm0000644002404400000620000000136307201342721013003 00000000000000/* XPM */ static char * connect_xpm[] = { "24 24 2 1", " c None", ". c #FFEF00", " ", " ", " . ", " ... ", " ..... ", " ....... ", " ......... ", " ........... ", " ............. ", " ............ ", " ........... ", " ......... ", " ...... ", " ...... ", " ...... ", " ........ ", " ........ ", " ....... ", " ...... ", " ..... ", " .... ", " ... ", " .. ", " "}; xqf-1.0.5/src/xpm/gamespy3d.xpm0000644002404400000620000000064407407243235013257 00000000000000/* XPM */ static char * gamespy3d_xpm[] = { "16 16 3 1", " c None", ". c #008000", "+ c #00FF00", " ", " .... ", " . +++. ", " .+ ++ ", " .+ ", " .+ .... ", " .+ .++ .... ", " .+ .+ . +++. ", " .+ .+ .+ +", " ....+ .+ ", " ++++ .... ", " +++. ", " .+", " . .+", " .... +", " ++++ "}; xqf-1.0.5/src/xpm/stop.xpm0000644002404400000620000000136007201342721012334 00000000000000/* XPM */ static char * stop_xpm[] = { "24 24 2 1", " c None", ". c #FF0000", " ", " . . ", " ... ... ", " ..... ..... ", " ....... ....... ", " ....... ....... ", " ....... ....... ", " ....... ....... ", " .............. ", " ............ ", " .......... ", " ........ ", " ........ ", " .......... ", " ............ ", " .............. ", " ....... ....... ", " ....... ....... ", " ....... ....... ", " ....... ....... ", " ..... ..... ", " ... ... ", " . . ", " "}; xqf-1.0.5/src/xpm/server-na.xpm0000644002404400000620000000071107201342721013250 00000000000000/* XPM */ static char * server_na_xpm[] = { "17 17 3 1", " c None", ". c #565656", "+ c #C6C6C6", " ", " ", " ", " ", " ", " ... ", " .+++. ", " .+++++. ", " .+++++. ", " .+++++. ", " .+++. ", " ... ", " ", " ", " ", " ", " "}; xqf-1.0.5/src/xpm/jk3.xpm0000644002404400000620000000116110065071744012043 00000000000000/* XPM */ static char * jk3_xpm[] = { "16 16 17 1", " c None", ". c #0A0503", "+ c #0F1A32", "@ c #032970", "# c #51121C", "$ c #881229", "% c #B40310", "& c #612851", "* c #1D51A6", "= c #DF1B2E", "- c #5877F1", "; c #E54B70", "> c #AE7385", ", c #5C90E8", "' c #8393B7", ") c #AF83C0", "! c #9AC7F9", "....@-@..@-@....", "..+@@-*++@-@....", ".+@@*--@@@-@....", "+@@@-,*@@--@++..", "@@@**!,-*-,-@@+.", "@*-,!,!,,,,-*@@+", ",,!!!*!!!!!,-*@@", "**-,!!!!!!!,-,*@", "+*'-,!!!!!!!!,,*", "++**,!,!!,,!!,,*", ".++&)))-))!>'&*@", "..#=>>>))>>>>;#+", "..#=$;;'>;';$=#.", ".#%=$=;#;;&=$%#.", ".$%%%%$%=%%$%%$.", "..#.#######..#.."}; xqf-1.0.5/src/xpm/mohaa.xpm0000644002404400000620000000116307721723236012450 00000000000000/* XPM */ static char * mohaa_xpm[] = { "16 16 17 1", " c None", ". c #150F0C", "+ c #99762B", "@ c #322E14", "# c #6D4922", "$ c #D0B78A", "% c #5E5A30", "& c #B69F62", "* c #60522E", "= c #B88742", "- c #50391C", "; c #8E7753", "> c #7D5B1B", ", c #35211B", "' c #9B8966", ") c #966B36", "! c #7B5E3F", " .,#!@. ", " @%'$$;%@ ", " .*'&'$$'&&*. ", " *+&>;$&+*&'- ", " ,;=>-;'&;-*=+, ", " *)**@''&'@-*)* ", ".%';''$';$''''*.", ".%;;&$'*%=$&)!*.", ",!@@>=+**+=!,@!,", ".#-@-==!>==---#.", " ->-!&+>>)&!->- ", " ,>>''*@@*'=)>, ", " -+;*,.,,*;!- ", " .-;%-@@@-!-. ", " ,->>>#@. ", " .,,. "}; xqf-1.0.5/src/xpm/doom3.xpm0000644002404400000620000000116310105220235012361 00000000000000/* XPM */ static char * doom3_xpm[] = { "16 16 17 1", " c None", ". c #000100", "+ c #330000", "@ c #680000", "# c #323331", "$ c #663403", "% c #653332", "& c #4D4B17", "* c #9B2E00", "= c #9A3333", "- c #DC4041", "; c #9A6532", "> c #CC662F", ", c #F15726", "' c #CD9830", ") c #FF995D", "! c #DDAA68", " #%-= ", " =>$$.+$>> ", " ');*@.+$!;># ", " %&>)>@@$',*>> ", " >+$=*>@>$).*=# ", "%*.+-$+>===@+*= ", "$+$+**>+--*&+@* ", ",+.*>=@+$*-=$@, ", "*$-$+,@>$>+*';, ", " )>==->=>=,>>!= ", " ;@+.*->-.$+.=$ ", " =$+>*;$;*.+%* ", " *-*$+,$$@=$# ", " #*;*;!+*$*# ", " $=)-$% ", " "}; xqf-1.0.5/src/xpm/error.xpm0000644002404400000620000000040007201342721012472 00000000000000/* XPM */ static char * error_xpm[] = { "7 16 2 1", " c None", ". c #FF0000", " ", " ... ", " .... ", " ..... ", " ..... ", " ..... ", " ..... ", " .... ", " .... ", " .. ", " .. ", " ", " ... ", " ... ", " ... ", " "}; xqf-1.0.5/src/zip/0000777002404400000620000000000010523106503010700 500000000000000xqf-1.0.5/src/zip/README0000644002404400000620000000017107574440037011512 00000000000000ioapi.c, ioapi.h, unzip.c and unzip.h are taken from http://www.winimage.com/zLibDll/unzip.htm see unzip.h for details xqf-1.0.5/src/zip/Makefile.am0000644002404400000620000000011707574440037012666 00000000000000libunzip_a_SOURCES=unzip.c ioapi.c unzip.h ioapi.h noinst_LIBRARIES=libunzip.a xqf-1.0.5/src/zip/Makefile.in0000644002404400000620000003320410523105435012666 00000000000000# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = src/zip DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/src/gnuconfig.h CONFIG_CLEAN_FILES = LIBRARIES = $(noinst_LIBRARIES) AR = ar ARFLAGS = cru libunzip_a_AR = $(AR) $(ARFLAGS) libunzip_a_LIBADD = am_libunzip_a_OBJECTS = unzip.$(OBJEXT) ioapi.$(OBJEXT) libunzip_a_OBJECTS = $(am_libunzip_a_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libunzip_a_SOURCES) DIST_SOURCES = $(libunzip_a_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_XQFRCON_FALSE = @BUILD_XQFRCON_FALSE@ BUILD_XQFRCON_TRUE = @BUILD_XQFRCON_TRUE@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COMPRESSION = @COMPRESSION@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEBUG = @DEBUG@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DUMMY_LIBGDKPIXBUF_FALSE = @DUMMY_LIBGDKPIXBUF_FALSE@ DUMMY_LIBGDKPIXBUF_ORIG = @DUMMY_LIBGDKPIXBUF_ORIG@ DUMMY_LIBGDKPIXBUF_SONAME = @DUMMY_LIBGDKPIXBUF_SONAME@ DUMMY_LIBGDKPIXBUF_TRUE = @DUMMY_LIBGDKPIXBUF_TRUE@ DUMMY_LIBGEOIP_FALSE = @DUMMY_LIBGEOIP_FALSE@ DUMMY_LIBGEOIP_ORIG = @DUMMY_LIBGEOIP_ORIG@ DUMMY_LIBGEOIP_SONAME = @DUMMY_LIBGEOIP_SONAME@ DUMMY_LIBGEOIP_TRUE = @DUMMY_LIBGEOIP_TRUE@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GDK_PIXBUF_CFLAGS = @GDK_PIXBUF_CFLAGS@ GDK_PIXBUF_CONFIG = @GDK_PIXBUF_CONFIG@ GDK_PIXBUF_LIBS = @GDK_PIXBUF_LIBS@ GEOIP_LIB = @GEOIP_LIB@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_CONFIG = @GLIB_CONFIG@ GLIB_LIBS = @GLIB_LIBS@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_CONFIG = @GTK_CONFIG@ GTK_LIBS = @GTK_LIBS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@ INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@ INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_ICONV = @INTLTOOL_ICONV@ INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@ INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_MSGFMT = @INTLTOOL_MSGFMT@ INTLTOOL_MSGMERGE = @INTLTOOL_MSGMERGE@ INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@ INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@ INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@ INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@ INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@ INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@ INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@ INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@ INTLTOOL_XGETTEXT = @INTLTOOL_XGETTEXT@ INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@ INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MSGFMT = @MSGFMT@ OBJEXT = @OBJEXT@ OLD_GTK_SUPPORT = @OLD_GTK_SUPPORT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_CFLAGS = @PACKAGE_CFLAGS@ PACKAGE_LIBS = @PACKAGE_LIBS@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ QSTATEXEC = @QSTATEXEC@ RANLIB = @RANLIB@ RELEASE = @RELEASE@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ XQFRCON_LIBS = @XQFRCON_LIBS@ ac_ct_CC = @ac_ct_CC@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ datadir = @datadir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ libunzip_a_SOURCES = unzip.c ioapi.c unzip.h ioapi.h noinst_LIBRARIES = libunzip.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/zip/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu src/zip/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) libunzip.a: $(libunzip_a_OBJECTS) $(libunzip_a_DEPENDENCIES) -rm -f libunzip.a $(libunzip_a_AR) libunzip.a $(libunzip_a_OBJECTS) $(libunzip_a_LIBADD) $(RANLIB) libunzip.a mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioapi.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unzip.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` uninstall-info-am: ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-info-am .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-noinstLIBRARIES ctags distclean distclean-compile \ distclean-generic distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-exec install-exec-am install-info \ install-info-am install-man install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ uninstall-am uninstall-info-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xqf-1.0.5/src/zip/unzip.c0000644002404400000620000012641507636325002012146 00000000000000/* unzip.c -- IO for uncompress .zip files using zlib Version 0.21, March 10th, 2003 Copyright (C) 1998-2003 Gilles Vollant Read unzip.h for more info */ #include #include #include #include "zlib.h" #include "unzip.h" #ifdef STDC # include # include # include #endif #ifdef NO_ERRNO_H extern int errno; #else # include #endif #ifndef local # define local static #endif /* compile with -Dlocal if your debugger can't find static symbols */ #if !defined(unix) && !defined(CASESENSITIVITYDEFAULT_YES) && \ !defined(CASESENSITIVITYDEFAULT_NO) #define CASESENSITIVITYDEFAULT_NO #endif #ifndef UNZ_BUFSIZE #define UNZ_BUFSIZE (16384) #endif #ifndef UNZ_MAXFILENAMEINZIP #define UNZ_MAXFILENAMEINZIP (256) #endif #ifndef ALLOC # define ALLOC(size) (malloc(size)) #endif #ifndef TRYFREE # define TRYFREE(p) {if (p) free(p);} #endif #define SIZECENTRALDIRITEM (0x2e) #define SIZEZIPLOCALHEADER (0x1e) const char unz_copyright[] = " unzip 0.21 Copyright 1998-2003 Gilles Vollant - http://www.winimage.com/zLibDll"; /* unz_file_info_interntal contain internal info about a file in zipfile*/ typedef struct unz_file_info_internal_s { uLong offset_curfile;/* relative offset of local header 4 bytes */ } unz_file_info_internal; /* file_in_zip_read_info_s contain internal information about a file in zipfile, when reading and decompress it */ typedef struct { char *read_buffer; /* internal buffer for compressed data */ z_stream stream; /* zLib stream structure for inflate */ uLong pos_in_zipfile; /* position in byte on the zipfile, for fseek*/ uLong stream_initialised; /* flag set if stream structure is initialised*/ uLong offset_local_extrafield;/* offset of the local extra field */ uInt size_local_extrafield;/* size of the local extra field */ uLong pos_local_extrafield; /* position in the local extra field in read*/ uLong crc32; /* crc32 of all data uncompressed */ uLong crc32_wait; /* crc32 we must obtain after decompress all */ uLong rest_read_compressed; /* number of byte to be decompressed */ uLong rest_read_uncompressed;/*number of byte to be obtained after decomp*/ zlib_filefunc_def z_filefunc; voidpf filestream; /* io structore of the zipfile */ uLong compression_method; /* compression method (0==store) */ uLong byte_before_the_zipfile;/* byte before the zipfile, (>0 for sfx)*/ int raw; } file_in_zip_read_info_s; /* unz_s contain internal information about the zipfile */ typedef struct { zlib_filefunc_def z_filefunc; voidpf filestream; /* io structore of the zipfile */ unz_global_info gi; /* public global information */ uLong byte_before_the_zipfile;/* byte before the zipfile, (>0 for sfx)*/ uLong num_file; /* number of the current file in the zipfile*/ uLong pos_in_central_dir; /* pos of the current file in the central dir*/ uLong current_file_ok; /* flag about the usability of the current file*/ uLong central_pos; /* position of the beginning of the central dir*/ uLong size_central_dir; /* size of the central directory */ uLong offset_central_dir; /* offset of start of central directory with respect to the starting disk number */ unz_file_info cur_file_info; /* public info about the current file in zip*/ unz_file_info_internal cur_file_info_internal; /* private info about it*/ file_in_zip_read_info_s* pfile_in_zip_read; /* structure about the current file if we are decompressing it */ } unz_s; /* =========================================================================== Read a byte from a gz_stream; update next_in and avail_in. Return EOF for end of file. IN assertion: the stream s has been sucessfully opened for reading. */ local int unzlocal_getByte OF(( const zlib_filefunc_def* pzlib_filefunc_def, voidpf filestream, int *pi)); local int unzlocal_getByte(pzlib_filefunc_def,filestream,pi) const zlib_filefunc_def* pzlib_filefunc_def; voidpf filestream; int *pi; { unsigned char c; int err = ZREAD(*pzlib_filefunc_def,filestream,&c,1); if (err==1) { *pi = (int)c; return UNZ_OK; } else { if (ZERROR(*pzlib_filefunc_def,filestream)) return UNZ_ERRNO; else return UNZ_EOF; } } /* =========================================================================== Reads a long in LSB order from the given gz_stream. Sets */ local int unzlocal_getShort OF(( const zlib_filefunc_def* pzlib_filefunc_def, voidpf filestream, uLong *pX)); local int unzlocal_getShort (pzlib_filefunc_def,filestream,pX) const zlib_filefunc_def* pzlib_filefunc_def; voidpf filestream; uLong *pX; { uLong x ; int i; int err; err = unzlocal_getByte(pzlib_filefunc_def,filestream,&i); x = (uLong)i; if (err==UNZ_OK) err = unzlocal_getByte(pzlib_filefunc_def,filestream,&i); x += ((uLong)i)<<8; if (err==UNZ_OK) *pX = x; else *pX = 0; return err; } local int unzlocal_getLong OF(( const zlib_filefunc_def* pzlib_filefunc_def, voidpf filestream, uLong *pX)); local int unzlocal_getLong (pzlib_filefunc_def,filestream,pX) const zlib_filefunc_def* pzlib_filefunc_def; voidpf filestream; uLong *pX; { uLong x ; int i; int err; err = unzlocal_getByte(pzlib_filefunc_def,filestream,&i); x = (uLong)i; if (err==UNZ_OK) err = unzlocal_getByte(pzlib_filefunc_def,filestream,&i); x += ((uLong)i)<<8; if (err==UNZ_OK) err = unzlocal_getByte(pzlib_filefunc_def,filestream,&i); x += ((uLong)i)<<16; if (err==UNZ_OK) err = unzlocal_getByte(pzlib_filefunc_def,filestream,&i); x += ((uLong)i)<<24; if (err==UNZ_OK) *pX = x; else *pX = 0; return err; } /* My own strcmpi / strcasecmp */ local int strcmpcasenosensitive_internal (fileName1,fileName2) const char* fileName1; const char* fileName2; { for (;;) { char c1=*(fileName1++); char c2=*(fileName2++); if ((c1>='a') && (c1<='z')) c1 -= 0x20; if ((c2>='a') && (c2<='z')) c2 -= 0x20; if (c1=='\0') return ((c2=='\0') ? 0 : -1); if (c2=='\0') return 1; if (c1c2) return 1; } } #ifdef CASESENSITIVITYDEFAULT_NO #define CASESENSITIVITYDEFAULTVALUE 2 #else #define CASESENSITIVITYDEFAULTVALUE 1 #endif #ifndef STRCMPCASENOSENTIVEFUNCTION #define STRCMPCASENOSENTIVEFUNCTION strcmpcasenosensitive_internal #endif /* Compare two filename (fileName1,fileName2). If iCaseSenisivity = 1, comparision is case sensitivity (like strcmp) If iCaseSenisivity = 2, comparision is not case sensitivity (like strcmpi or strcasecmp) If iCaseSenisivity = 0, case sensitivity is defaut of your operating system (like 1 on Unix, 2 on Windows) */ extern int ZEXPORT unzStringFileNameCompare (fileName1,fileName2,iCaseSensitivity) const char* fileName1; const char* fileName2; int iCaseSensitivity; { if (iCaseSensitivity==0) iCaseSensitivity=CASESENSITIVITYDEFAULTVALUE; if (iCaseSensitivity==1) return strcmp(fileName1,fileName2); return STRCMPCASENOSENTIVEFUNCTION(fileName1,fileName2); } #define BUFREADCOMMENT (0x400) /* Locate the Central directory of a zipfile (at the end, just before the global comment) */ local uLong unzlocal_SearchCentralDir OF(( const zlib_filefunc_def* pzlib_filefunc_def, voidpf filestream)); local uLong unzlocal_SearchCentralDir(pzlib_filefunc_def,filestream) const zlib_filefunc_def* pzlib_filefunc_def; voidpf filestream; { unsigned char* buf; uLong uSizeFile; uLong uBackRead; uLong uMaxBack=0xffff; /* maximum size of global comment */ uLong uPosFound=0; if (ZSEEK(*pzlib_filefunc_def,filestream,0,ZLIB_FILEFUNC_SEEK_END) != 0) return 0; uSizeFile = ZTELL(*pzlib_filefunc_def,filestream); if (uMaxBack>uSizeFile) uMaxBack = uSizeFile; buf = (unsigned char*)ALLOC(BUFREADCOMMENT+4); if (buf==NULL) return 0; uBackRead = 4; while (uBackReaduMaxBack) uBackRead = uMaxBack; else uBackRead+=BUFREADCOMMENT; uReadPos = uSizeFile-uBackRead ; uReadSize = ((BUFREADCOMMENT+4) < (uSizeFile-uReadPos)) ? (BUFREADCOMMENT+4) : (uSizeFile-uReadPos); if (ZSEEK(*pzlib_filefunc_def,filestream,uReadPos,ZLIB_FILEFUNC_SEEK_SET)!=0) break; if (ZREAD(*pzlib_filefunc_def,filestream,buf,uReadSize)!=uReadSize) break; for (i=(int)uReadSize-3; (i--)>0;) if (((*(buf+i))==0x50) && ((*(buf+i+1))==0x4b) && ((*(buf+i+2))==0x05) && ((*(buf+i+3))==0x06)) { uPosFound = uReadPos+i; break; } if (uPosFound!=0) break; } TRYFREE(buf); return uPosFound; } /* Open a Zip file. path contain the full pathname (by example, on a Windows NT computer "c:\\test\\zlib109.zip" or on an Unix computer "zlib/zlib109.zip". If the zipfile cannot be opened (file don't exist or in not valid), the return value is NULL. Else, the return value is a unzFile Handle, usable with other function of this unzip package. */ extern unzFile ZEXPORT unzOpen2 (path, pzlib_filefunc_def) const char *path; zlib_filefunc_def* pzlib_filefunc_def; { unz_s us; unz_s *s; uLong central_pos,uL; uLong number_disk; /* number of the current dist, used for spaning ZIP, unsupported, always 0*/ uLong number_disk_with_CD; /* number the the disk with central dir, used for spaning ZIP, unsupported, always 0*/ uLong number_entry_CD; /* total number of entries in the central dir (same than number_entry on nospan) */ int err=UNZ_OK; if (unz_copyright[0]!=' ') return NULL; if (pzlib_filefunc_def==NULL) fill_fopen_filefunc(&us.z_filefunc); else us.z_filefunc = *pzlib_filefunc_def; us.filestream= (*(us.z_filefunc.zopen_file))(us.z_filefunc.opaque, path, ZLIB_FILEFUNC_MODE_READ | ZLIB_FILEFUNC_MODE_EXISTING); if (us.filestream==NULL) return NULL; central_pos = unzlocal_SearchCentralDir(&us.z_filefunc,us.filestream); if (central_pos==0) err=UNZ_ERRNO; if (ZSEEK(us.z_filefunc, us.filestream, central_pos,ZLIB_FILEFUNC_SEEK_SET)!=0) err=UNZ_ERRNO; /* the signature, already checked */ if (unzlocal_getLong(&us.z_filefunc, us.filestream,&uL)!=UNZ_OK) err=UNZ_ERRNO; /* number of this disk */ if (unzlocal_getShort(&us.z_filefunc, us.filestream,&number_disk)!=UNZ_OK) err=UNZ_ERRNO; /* number of the disk with the start of the central directory */ if (unzlocal_getShort(&us.z_filefunc, us.filestream,&number_disk_with_CD)!=UNZ_OK) err=UNZ_ERRNO; /* total number of entries in the central dir on this disk */ if (unzlocal_getShort(&us.z_filefunc, us.filestream,&us.gi.number_entry)!=UNZ_OK) err=UNZ_ERRNO; /* total number of entries in the central dir */ if (unzlocal_getShort(&us.z_filefunc, us.filestream,&number_entry_CD)!=UNZ_OK) err=UNZ_ERRNO; if ((number_entry_CD!=us.gi.number_entry) || (number_disk_with_CD!=0) || (number_disk!=0)) err=UNZ_BADZIPFILE; /* size of the central directory */ if (unzlocal_getLong(&us.z_filefunc, us.filestream,&us.size_central_dir)!=UNZ_OK) err=UNZ_ERRNO; /* offset of start of central directory with respect to the starting disk number */ if (unzlocal_getLong(&us.z_filefunc, us.filestream,&us.offset_central_dir)!=UNZ_OK) err=UNZ_ERRNO; /* zipfile comment length */ if (unzlocal_getShort(&us.z_filefunc, us.filestream,&us.gi.size_comment)!=UNZ_OK) err=UNZ_ERRNO; if ((central_pospfile_in_zip_read!=NULL) unzCloseCurrentFile(file); ZCLOSE(s->z_filefunc, s->filestream); TRYFREE(s); return UNZ_OK; } /* Write info about the ZipFile in the *pglobal_info structure. No preparation of the structure is needed return UNZ_OK if there is no problem. */ extern int ZEXPORT unzGetGlobalInfo (file,pglobal_info) unzFile file; unz_global_info *pglobal_info; { unz_s* s; if (file==NULL) return UNZ_PARAMERROR; s=(unz_s*)file; *pglobal_info=s->gi; return UNZ_OK; } /* Translate date/time from Dos format to tm_unz (readable more easilty) */ local void unzlocal_DosDateToTmuDate (ulDosDate, ptm) uLong ulDosDate; tm_unz* ptm; { uLong uDate; uDate = (uLong)(ulDosDate>>16); ptm->tm_mday = (uInt)(uDate&0x1f) ; ptm->tm_mon = (uInt)((((uDate)&0x1E0)/0x20)-1) ; ptm->tm_year = (uInt)(((uDate&0x0FE00)/0x0200)+1980) ; ptm->tm_hour = (uInt) ((ulDosDate &0xF800)/0x800); ptm->tm_min = (uInt) ((ulDosDate&0x7E0)/0x20) ; ptm->tm_sec = (uInt) (2*(ulDosDate&0x1f)) ; } /* Get Info about the current file in the zipfile, with internal only info */ local int unzlocal_GetCurrentFileInfoInternal OF((unzFile file, unz_file_info *pfile_info, unz_file_info_internal *pfile_info_internal, char *szFileName, uLong fileNameBufferSize, void *extraField, uLong extraFieldBufferSize, char *szComment, uLong commentBufferSize)); local int unzlocal_GetCurrentFileInfoInternal (file, pfile_info, pfile_info_internal, szFileName, fileNameBufferSize, extraField, extraFieldBufferSize, szComment, commentBufferSize) unzFile file; unz_file_info *pfile_info; unz_file_info_internal *pfile_info_internal; char *szFileName; uLong fileNameBufferSize; void *extraField; uLong extraFieldBufferSize; char *szComment; uLong commentBufferSize; { unz_s* s; unz_file_info file_info; unz_file_info_internal file_info_internal; int err=UNZ_OK; uLong uMagic; long lSeek=0; if (file==NULL) return UNZ_PARAMERROR; s=(unz_s*)file; if (ZSEEK(s->z_filefunc, s->filestream, s->pos_in_central_dir+s->byte_before_the_zipfile, ZLIB_FILEFUNC_SEEK_SET)!=0) err=UNZ_ERRNO; /* we check the magic */ if (err==UNZ_OK) { if (unzlocal_getLong(&s->z_filefunc, s->filestream,&uMagic) != UNZ_OK) err=UNZ_ERRNO; else if (uMagic!=0x02014b50) err=UNZ_BADZIPFILE; } if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.version) != UNZ_OK) err=UNZ_ERRNO; if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.version_needed) != UNZ_OK) err=UNZ_ERRNO; if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.flag) != UNZ_OK) err=UNZ_ERRNO; if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.compression_method) != UNZ_OK) err=UNZ_ERRNO; if (unzlocal_getLong(&s->z_filefunc, s->filestream,&file_info.dosDate) != UNZ_OK) err=UNZ_ERRNO; unzlocal_DosDateToTmuDate(file_info.dosDate,&file_info.tmu_date); if (unzlocal_getLong(&s->z_filefunc, s->filestream,&file_info.crc) != UNZ_OK) err=UNZ_ERRNO; if (unzlocal_getLong(&s->z_filefunc, s->filestream,&file_info.compressed_size) != UNZ_OK) err=UNZ_ERRNO; if (unzlocal_getLong(&s->z_filefunc, s->filestream,&file_info.uncompressed_size) != UNZ_OK) err=UNZ_ERRNO; if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.size_filename) != UNZ_OK) err=UNZ_ERRNO; if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.size_file_extra) != UNZ_OK) err=UNZ_ERRNO; if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.size_file_comment) != UNZ_OK) err=UNZ_ERRNO; if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.disk_num_start) != UNZ_OK) err=UNZ_ERRNO; if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.internal_fa) != UNZ_OK) err=UNZ_ERRNO; if (unzlocal_getLong(&s->z_filefunc, s->filestream,&file_info.external_fa) != UNZ_OK) err=UNZ_ERRNO; if (unzlocal_getLong(&s->z_filefunc, s->filestream,&file_info_internal.offset_curfile) != UNZ_OK) err=UNZ_ERRNO; lSeek+=file_info.size_filename; if ((err==UNZ_OK) && (szFileName!=NULL)) { uLong uSizeRead ; if (file_info.size_filename0) && (fileNameBufferSize>0)) if (ZREAD(s->z_filefunc, s->filestream,szFileName,uSizeRead)!=uSizeRead) err=UNZ_ERRNO; lSeek -= uSizeRead; } if ((err==UNZ_OK) && (extraField!=NULL)) { uLong uSizeRead ; if (file_info.size_file_extraz_filefunc, s->filestream,lSeek,ZLIB_FILEFUNC_SEEK_CUR)==0) lSeek=0; else err=UNZ_ERRNO; } if ((file_info.size_file_extra>0) && (extraFieldBufferSize>0)) if (ZREAD(s->z_filefunc, s->filestream,extraField,uSizeRead)!=uSizeRead) err=UNZ_ERRNO; lSeek += file_info.size_file_extra - uSizeRead; } else lSeek+=file_info.size_file_extra; if ((err==UNZ_OK) && (szComment!=NULL)) { uLong uSizeRead ; if (file_info.size_file_commentz_filefunc, s->filestream,lSeek,ZLIB_FILEFUNC_SEEK_CUR)==0) lSeek=0; else err=UNZ_ERRNO; } if ((file_info.size_file_comment>0) && (commentBufferSize>0)) if (ZREAD(s->z_filefunc, s->filestream,szComment,uSizeRead)!=uSizeRead) err=UNZ_ERRNO; lSeek+=file_info.size_file_comment - uSizeRead; } else lSeek+=file_info.size_file_comment; if ((err==UNZ_OK) && (pfile_info!=NULL)) *pfile_info=file_info; if ((err==UNZ_OK) && (pfile_info_internal!=NULL)) *pfile_info_internal=file_info_internal; return err; } /* Write info about the ZipFile in the *pglobal_info structure. No preparation of the structure is needed return UNZ_OK if there is no problem. */ extern int ZEXPORT unzGetCurrentFileInfo (file, pfile_info, szFileName, fileNameBufferSize, extraField, extraFieldBufferSize, szComment, commentBufferSize) unzFile file; unz_file_info *pfile_info; char *szFileName; uLong fileNameBufferSize; void *extraField; uLong extraFieldBufferSize; char *szComment; uLong commentBufferSize; { return unzlocal_GetCurrentFileInfoInternal(file,pfile_info,NULL, szFileName,fileNameBufferSize, extraField,extraFieldBufferSize, szComment,commentBufferSize); } /* Set the current file of the zipfile to the first file. return UNZ_OK if there is no problem */ extern int ZEXPORT unzGoToFirstFile (file) unzFile file; { int err=UNZ_OK; unz_s* s; if (file==NULL) return UNZ_PARAMERROR; s=(unz_s*)file; s->pos_in_central_dir=s->offset_central_dir; s->num_file=0; err=unzlocal_GetCurrentFileInfoInternal(file,&s->cur_file_info, &s->cur_file_info_internal, NULL,0,NULL,0,NULL,0); s->current_file_ok = (err == UNZ_OK); return err; } /* Set the current file of the zipfile to the next file. return UNZ_OK if there is no problem return UNZ_END_OF_LIST_OF_FILE if the actual file was the latest. */ extern int ZEXPORT unzGoToNextFile (file) unzFile file; { unz_s* s; int err; if (file==NULL) return UNZ_PARAMERROR; s=(unz_s*)file; if (!s->current_file_ok) return UNZ_END_OF_LIST_OF_FILE; if (s->num_file+1==s->gi.number_entry) return UNZ_END_OF_LIST_OF_FILE; s->pos_in_central_dir += SIZECENTRALDIRITEM + s->cur_file_info.size_filename + s->cur_file_info.size_file_extra + s->cur_file_info.size_file_comment ; s->num_file++; err = unzlocal_GetCurrentFileInfoInternal(file,&s->cur_file_info, &s->cur_file_info_internal, NULL,0,NULL,0,NULL,0); s->current_file_ok = (err == UNZ_OK); return err; } /* Try locate the file szFileName in the zipfile. For the iCaseSensitivity signification, see unzipStringFileNameCompare return value : UNZ_OK if the file is found. It becomes the current file. UNZ_END_OF_LIST_OF_FILE if the file is not found */ extern int ZEXPORT unzLocateFile (file, szFileName, iCaseSensitivity) unzFile file; const char *szFileName; int iCaseSensitivity; { unz_s* s; int err; uLong num_fileSaved; uLong pos_in_central_dirSaved; if (file==NULL) return UNZ_PARAMERROR; if (strlen(szFileName)>=UNZ_MAXFILENAMEINZIP) return UNZ_PARAMERROR; s=(unz_s*)file; if (!s->current_file_ok) return UNZ_END_OF_LIST_OF_FILE; num_fileSaved = s->num_file; pos_in_central_dirSaved = s->pos_in_central_dir; err = unzGoToFirstFile(file); while (err == UNZ_OK) { char szCurrentFileName[UNZ_MAXFILENAMEINZIP+1]; unzGetCurrentFileInfo(file,NULL, szCurrentFileName,sizeof(szCurrentFileName)-1, NULL,0,NULL,0); if (unzStringFileNameCompare(szCurrentFileName, szFileName,iCaseSensitivity)==0) return UNZ_OK; err = unzGoToNextFile(file); } s->num_file = num_fileSaved ; s->pos_in_central_dir = pos_in_central_dirSaved ; return err; } /* /////////////////////////////////////////// // Contributed by Ryan Haksi (mailto://cryogen@infoserve.net) // I need random access // // Further optimization could be realized by adding an ability // to cache the directory in memory. The goal being a single // comprehensive file read to put the file I need in a memory. */ /* typedef struct unz_file_pos_s { uLong pos_in_zip_directory; // offset in file uLong num_of_file; // # of file } unz_file_pos; */ extern int ZEXPORT unzGetFilePos(file, file_pos) unzFile file; unz_file_pos* file_pos; { unz_s* s; if (file==NULL || file_pos==NULL) return UNZ_PARAMERROR; s=(unz_s*)file; if (!s->current_file_ok) return UNZ_END_OF_LIST_OF_FILE; file_pos->pos_in_zip_directory = s->pos_in_central_dir; file_pos->num_of_file = s->num_file; return UNZ_OK; } extern int ZEXPORT unzGoToFilePos(file, file_pos) unzFile file; unz_file_pos* file_pos; { unz_s* s; int err; if (file==NULL || file_pos==NULL) return UNZ_PARAMERROR; s=(unz_s*)file; /* jump to the right spot */ s->pos_in_central_dir = file_pos->pos_in_zip_directory; s->num_file = file_pos->num_of_file; /* set the current file */ err = unzlocal_GetCurrentFileInfoInternal(file,&s->cur_file_info, &s->cur_file_info_internal, NULL,0,NULL,0,NULL,0); /* return results */ s->current_file_ok = (err == UNZ_OK); return err; } /* // Unzip Helper Functions - should be here? /////////////////////////////////////////// */ /* Read the local header of the current zipfile Check the coherency of the local header and info in the end of central directory about this file store in *piSizeVar the size of extra info in local header (filename and size of extra field data) */ local int unzlocal_CheckCurrentFileCoherencyHeader (s,piSizeVar, poffset_local_extrafield, psize_local_extrafield) unz_s* s; uInt* piSizeVar; uLong *poffset_local_extrafield; uInt *psize_local_extrafield; { uLong uMagic,uData,uFlags; uLong size_filename; uLong size_extra_field; int err=UNZ_OK; *piSizeVar = 0; *poffset_local_extrafield = 0; *psize_local_extrafield = 0; if (ZSEEK(s->z_filefunc, s->filestream,s->cur_file_info_internal.offset_curfile + s->byte_before_the_zipfile,ZLIB_FILEFUNC_SEEK_SET)!=0) return UNZ_ERRNO; if (err==UNZ_OK) { if (unzlocal_getLong(&s->z_filefunc, s->filestream,&uMagic) != UNZ_OK) err=UNZ_ERRNO; else if (uMagic!=0x04034b50) err=UNZ_BADZIPFILE; } if (unzlocal_getShort(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) err=UNZ_ERRNO; /* else if ((err==UNZ_OK) && (uData!=s->cur_file_info.wVersion)) err=UNZ_BADZIPFILE; */ if (unzlocal_getShort(&s->z_filefunc, s->filestream,&uFlags) != UNZ_OK) err=UNZ_ERRNO; if (unzlocal_getShort(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) err=UNZ_ERRNO; else if ((err==UNZ_OK) && (uData!=s->cur_file_info.compression_method)) err=UNZ_BADZIPFILE; if ((err==UNZ_OK) && (s->cur_file_info.compression_method!=0) && (s->cur_file_info.compression_method!=Z_DEFLATED)) err=UNZ_BADZIPFILE; if (unzlocal_getLong(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) /* date/time */ err=UNZ_ERRNO; if (unzlocal_getLong(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) /* crc */ err=UNZ_ERRNO; else if ((err==UNZ_OK) && (uData!=s->cur_file_info.crc) && ((uFlags & 8)==0)) err=UNZ_BADZIPFILE; if (unzlocal_getLong(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) /* size compr */ err=UNZ_ERRNO; else if ((err==UNZ_OK) && (uData!=s->cur_file_info.compressed_size) && ((uFlags & 8)==0)) err=UNZ_BADZIPFILE; if (unzlocal_getLong(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) /* size uncompr */ err=UNZ_ERRNO; else if ((err==UNZ_OK) && (uData!=s->cur_file_info.uncompressed_size) && ((uFlags & 8)==0)) err=UNZ_BADZIPFILE; if (unzlocal_getShort(&s->z_filefunc, s->filestream,&size_filename) != UNZ_OK) err=UNZ_ERRNO; else if ((err==UNZ_OK) && (size_filename!=s->cur_file_info.size_filename)) err=UNZ_BADZIPFILE; *piSizeVar += (uInt)size_filename; if (unzlocal_getShort(&s->z_filefunc, s->filestream,&size_extra_field) != UNZ_OK) err=UNZ_ERRNO; *poffset_local_extrafield= s->cur_file_info_internal.offset_curfile + SIZEZIPLOCALHEADER + size_filename; *psize_local_extrafield = (uInt)size_extra_field; *piSizeVar += (uInt)size_extra_field; return err; } /* Open for reading data the current file in the zipfile. If there is no error and the file is opened, the return value is UNZ_OK. */ extern int ZEXPORT unzOpenCurrentFile2 (file, method, level, raw) unzFile file; int* method; int* level; int raw; { int err=UNZ_OK; uInt iSizeVar; unz_s* s; file_in_zip_read_info_s* pfile_in_zip_read_info; uLong offset_local_extrafield; /* offset of the local extra field */ uInt size_local_extrafield; /* size of the local extra field */ if (file==NULL) return UNZ_PARAMERROR; s=(unz_s*)file; if (!s->current_file_ok) return UNZ_PARAMERROR; if (s->pfile_in_zip_read != NULL) unzCloseCurrentFile(file); if (unzlocal_CheckCurrentFileCoherencyHeader(s,&iSizeVar, &offset_local_extrafield,&size_local_extrafield)!=UNZ_OK) return UNZ_BADZIPFILE; pfile_in_zip_read_info = (file_in_zip_read_info_s*) ALLOC(sizeof(file_in_zip_read_info_s)); if (pfile_in_zip_read_info==NULL) return UNZ_INTERNALERROR; pfile_in_zip_read_info->read_buffer=(char*)ALLOC(UNZ_BUFSIZE); pfile_in_zip_read_info->offset_local_extrafield = offset_local_extrafield; pfile_in_zip_read_info->size_local_extrafield = size_local_extrafield; pfile_in_zip_read_info->pos_local_extrafield=0; pfile_in_zip_read_info->raw=raw; if (pfile_in_zip_read_info->read_buffer==NULL) { TRYFREE(pfile_in_zip_read_info); return UNZ_INTERNALERROR; } pfile_in_zip_read_info->stream_initialised=0; if (method!=NULL) *method = s->cur_file_info.compression_method; if (level!=NULL) { *level = 6; switch (s->cur_file_info.flag & 0x06) { case 6 : *level = 1; break; case 4 : *level = 2; break; case 2 : *level = 9; break; } } if ((s->cur_file_info.compression_method!=0) && (s->cur_file_info.compression_method!=Z_DEFLATED)) err=UNZ_BADZIPFILE; pfile_in_zip_read_info->crc32_wait=s->cur_file_info.crc; pfile_in_zip_read_info->crc32=0; pfile_in_zip_read_info->compression_method = s->cur_file_info.compression_method; pfile_in_zip_read_info->filestream=s->filestream; pfile_in_zip_read_info->z_filefunc=s->z_filefunc; pfile_in_zip_read_info->byte_before_the_zipfile=s->byte_before_the_zipfile; pfile_in_zip_read_info->stream.total_out = 0; if ((s->cur_file_info.compression_method==Z_DEFLATED) && (!raw)) { pfile_in_zip_read_info->stream.zalloc = (alloc_func)0; pfile_in_zip_read_info->stream.zfree = (free_func)0; pfile_in_zip_read_info->stream.opaque = (voidpf)0; err=inflateInit2(&pfile_in_zip_read_info->stream, -MAX_WBITS); if (err == Z_OK) pfile_in_zip_read_info->stream_initialised=1; else return err; /* windowBits is passed < 0 to tell that there is no zlib header. * Note that in this case inflate *requires* an extra "dummy" byte * after the compressed stream in order to complete decompression and * return Z_STREAM_END. * In unzip, i don't wait absolutely Z_STREAM_END because I known the * size of both compressed and uncompressed data */ } pfile_in_zip_read_info->rest_read_compressed = s->cur_file_info.compressed_size ; pfile_in_zip_read_info->rest_read_uncompressed = s->cur_file_info.uncompressed_size ; pfile_in_zip_read_info->pos_in_zipfile = s->cur_file_info_internal.offset_curfile + SIZEZIPLOCALHEADER + iSizeVar; pfile_in_zip_read_info->stream.avail_in = (uInt)0; s->pfile_in_zip_read = pfile_in_zip_read_info; return UNZ_OK; } extern int ZEXPORT unzOpenCurrentFile (file) unzFile file; { return unzOpenCurrentFile2(file, NULL, NULL, 0); } /* Read bytes from the current file. buf contain buffer where data must be copied len the size of buf. return the number of byte copied if somes bytes are copied return 0 if the end of file was reached return <0 with error code if there is an error (UNZ_ERRNO for IO error, or zLib error for uncompress error) */ extern int ZEXPORT unzReadCurrentFile (file, buf, len) unzFile file; voidp buf; unsigned len; { int err=UNZ_OK; uInt iRead = 0; unz_s* s; file_in_zip_read_info_s* pfile_in_zip_read_info; if (file==NULL) return UNZ_PARAMERROR; s=(unz_s*)file; pfile_in_zip_read_info=s->pfile_in_zip_read; if (pfile_in_zip_read_info==NULL) return UNZ_PARAMERROR; if ((pfile_in_zip_read_info->read_buffer == NULL)) return UNZ_END_OF_LIST_OF_FILE; if (len==0) return 0; pfile_in_zip_read_info->stream.next_out = (Bytef*)buf; pfile_in_zip_read_info->stream.avail_out = (uInt)len; if (len>pfile_in_zip_read_info->rest_read_uncompressed) pfile_in_zip_read_info->stream.avail_out = (uInt)pfile_in_zip_read_info->rest_read_uncompressed; while (pfile_in_zip_read_info->stream.avail_out>0) { if ((pfile_in_zip_read_info->stream.avail_in==0) && (pfile_in_zip_read_info->rest_read_compressed>0)) { uInt uReadThis = UNZ_BUFSIZE; if (pfile_in_zip_read_info->rest_read_compressedrest_read_compressed; if (uReadThis == 0) return UNZ_EOF; if (ZSEEK(pfile_in_zip_read_info->z_filefunc, pfile_in_zip_read_info->filestream, pfile_in_zip_read_info->pos_in_zipfile + pfile_in_zip_read_info->byte_before_the_zipfile, ZLIB_FILEFUNC_SEEK_SET)!=0) return UNZ_ERRNO; if (ZREAD(pfile_in_zip_read_info->z_filefunc, pfile_in_zip_read_info->filestream, pfile_in_zip_read_info->read_buffer, uReadThis)!=uReadThis) return UNZ_ERRNO; pfile_in_zip_read_info->pos_in_zipfile += uReadThis; pfile_in_zip_read_info->rest_read_compressed-=uReadThis; pfile_in_zip_read_info->stream.next_in = (Bytef*)pfile_in_zip_read_info->read_buffer; pfile_in_zip_read_info->stream.avail_in = (uInt)uReadThis; } if ((pfile_in_zip_read_info->compression_method==0) || (pfile_in_zip_read_info->raw)) { uInt uDoCopy,i ; if ((pfile_in_zip_read_info->stream.avail_in == 0) && (pfile_in_zip_read_info->rest_read_compressed == 0)) return (iRead==0) ? UNZ_EOF : iRead; if (pfile_in_zip_read_info->stream.avail_out < pfile_in_zip_read_info->stream.avail_in) uDoCopy = pfile_in_zip_read_info->stream.avail_out ; else uDoCopy = pfile_in_zip_read_info->stream.avail_in ; for (i=0;istream.next_out+i) = *(pfile_in_zip_read_info->stream.next_in+i); pfile_in_zip_read_info->crc32 = crc32(pfile_in_zip_read_info->crc32, pfile_in_zip_read_info->stream.next_out, uDoCopy); pfile_in_zip_read_info->rest_read_uncompressed-=uDoCopy; pfile_in_zip_read_info->stream.avail_in -= uDoCopy; pfile_in_zip_read_info->stream.avail_out -= uDoCopy; pfile_in_zip_read_info->stream.next_out += uDoCopy; pfile_in_zip_read_info->stream.next_in += uDoCopy; pfile_in_zip_read_info->stream.total_out += uDoCopy; iRead += uDoCopy; } else { uLong uTotalOutBefore,uTotalOutAfter; const Bytef *bufBefore; uLong uOutThis; int flush=Z_SYNC_FLUSH; uTotalOutBefore = pfile_in_zip_read_info->stream.total_out; bufBefore = pfile_in_zip_read_info->stream.next_out; /* if ((pfile_in_zip_read_info->rest_read_uncompressed == pfile_in_zip_read_info->stream.avail_out) && (pfile_in_zip_read_info->rest_read_compressed == 0)) flush = Z_FINISH; */ err=inflate(&pfile_in_zip_read_info->stream,flush); uTotalOutAfter = pfile_in_zip_read_info->stream.total_out; uOutThis = uTotalOutAfter-uTotalOutBefore; pfile_in_zip_read_info->crc32 = crc32(pfile_in_zip_read_info->crc32,bufBefore, (uInt)(uOutThis)); pfile_in_zip_read_info->rest_read_uncompressed -= uOutThis; iRead += (uInt)(uTotalOutAfter - uTotalOutBefore); if (err==Z_STREAM_END) return (iRead==0) ? UNZ_EOF : iRead; if (err!=Z_OK) break; } } if (err==Z_OK) return iRead; return err; } /* Give the current position in uncompressed data */ extern z_off_t ZEXPORT unztell (file) unzFile file; { unz_s* s; file_in_zip_read_info_s* pfile_in_zip_read_info; if (file==NULL) return UNZ_PARAMERROR; s=(unz_s*)file; pfile_in_zip_read_info=s->pfile_in_zip_read; if (pfile_in_zip_read_info==NULL) return UNZ_PARAMERROR; return (z_off_t)pfile_in_zip_read_info->stream.total_out; } /* return 1 if the end of file was reached, 0 elsewhere */ extern int ZEXPORT unzeof (file) unzFile file; { unz_s* s; file_in_zip_read_info_s* pfile_in_zip_read_info; if (file==NULL) return UNZ_PARAMERROR; s=(unz_s*)file; pfile_in_zip_read_info=s->pfile_in_zip_read; if (pfile_in_zip_read_info==NULL) return UNZ_PARAMERROR; if (pfile_in_zip_read_info->rest_read_uncompressed == 0) return 1; else return 0; } /* Read extra field from the current file (opened by unzOpenCurrentFile) This is the local-header version of the extra field (sometimes, there is more info in the local-header version than in the central-header) if buf==NULL, it return the size of the local extra field that can be read if buf!=NULL, len is the size of the buffer, the extra header is copied in buf. the return value is the number of bytes copied in buf, or (if <0) the error code */ extern int ZEXPORT unzGetLocalExtrafield (file,buf,len) unzFile file; voidp buf; unsigned len; { unz_s* s; file_in_zip_read_info_s* pfile_in_zip_read_info; uInt read_now; uLong size_to_read; if (file==NULL) return UNZ_PARAMERROR; s=(unz_s*)file; pfile_in_zip_read_info=s->pfile_in_zip_read; if (pfile_in_zip_read_info==NULL) return UNZ_PARAMERROR; size_to_read = (pfile_in_zip_read_info->size_local_extrafield - pfile_in_zip_read_info->pos_local_extrafield); if (buf==NULL) return (int)size_to_read; if (len>size_to_read) read_now = (uInt)size_to_read; else read_now = (uInt)len ; if (read_now==0) return 0; if (ZSEEK(pfile_in_zip_read_info->z_filefunc, pfile_in_zip_read_info->filestream, pfile_in_zip_read_info->offset_local_extrafield + pfile_in_zip_read_info->pos_local_extrafield, ZLIB_FILEFUNC_SEEK_SET)!=0) return UNZ_ERRNO; if (ZREAD(pfile_in_zip_read_info->z_filefunc, pfile_in_zip_read_info->filestream, buf,size_to_read)!=size_to_read) return UNZ_ERRNO; return (int)read_now; } /* Close the file in zip opened with unzipOpenCurrentFile Return UNZ_CRCERROR if all the file was read but the CRC is not good */ extern int ZEXPORT unzCloseCurrentFile (file) unzFile file; { int err=UNZ_OK; unz_s* s; file_in_zip_read_info_s* pfile_in_zip_read_info; if (file==NULL) return UNZ_PARAMERROR; s=(unz_s*)file; pfile_in_zip_read_info=s->pfile_in_zip_read; if (pfile_in_zip_read_info==NULL) return UNZ_PARAMERROR; if ((pfile_in_zip_read_info->rest_read_uncompressed == 0) && (!pfile_in_zip_read_info->raw)) { if (pfile_in_zip_read_info->crc32 != pfile_in_zip_read_info->crc32_wait) err=UNZ_CRCERROR; } TRYFREE(pfile_in_zip_read_info->read_buffer); pfile_in_zip_read_info->read_buffer = NULL; if (pfile_in_zip_read_info->stream_initialised) inflateEnd(&pfile_in_zip_read_info->stream); pfile_in_zip_read_info->stream_initialised = 0; TRYFREE(pfile_in_zip_read_info); s->pfile_in_zip_read=NULL; return err; } /* Get the global comment string of the ZipFile, in the szComment buffer. uSizeBuf is the size of the szComment buffer. return the number of byte copied or an error code <0 */ extern int ZEXPORT unzGetGlobalComment (file, szComment, uSizeBuf) unzFile file; char *szComment; uLong uSizeBuf; { unz_s* s; uLong uReadThis ; if (file==NULL) return UNZ_PARAMERROR; s=(unz_s*)file; uReadThis = uSizeBuf; if (uReadThis>s->gi.size_comment) uReadThis = s->gi.size_comment; if (ZSEEK(s->z_filefunc,s->filestream,s->central_pos+22,ZLIB_FILEFUNC_SEEK_SET)!=0) return UNZ_ERRNO; if (uReadThis>0) { *szComment='\0'; if (ZREAD(s->z_filefunc,s->filestream,szComment,uReadThis)!=uReadThis) return UNZ_ERRNO; } if ((szComment != NULL) && (uSizeBuf > s->gi.size_comment)) *(szComment+s->gi.size_comment)='\0'; return (int)uReadThis; } xqf-1.0.5/src/zip/unzip.h0000644002404400000620000002604507636325002012151 00000000000000/* unzip.h -- IO for uncompress .zip files using zlib Version 0.21, March 10th, 2003 Copyright (C) 1998-2003 Gilles Vollant This unzip package allow extract file from .ZIP file, compatible with PKZip 2.04g WinZip, InfoZip tools and compatible. Encryption and multi volume ZipFile (span) are not supported. Old compressions used by old PKZip 1.x are not supported I WAIT FEEDBACK at mail info@winimage.com Visit also http://www.winimage.com/zLibDll/unzip.htm for evolution Condition of use and distribution are the same than zlib : This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ /* for more info about .ZIP format, see http://www.info-zip.org/pub/infozip/doc/appnote-981119-iz.zip http://www.info-zip.org/pub/infozip/doc/ PkWare has also a specification at : ftp://ftp.pkware.com/probdesc.zip */ #ifndef _unz_H #define _unz_H #ifdef __cplusplus extern "C" { #endif #ifndef _ZLIB_H #include "zlib.h" #endif #ifndef _ZLIBIOAPI_H #include "ioapi.h" #endif //khorben #ifndef ZEXPORT #define ZEXPORT #endif #if defined(STRICTUNZIP) || defined(STRICTZIPUNZIP) /* like the STRICT of WIN32, we define a pointer that cannot be converted from (void*) without cast */ typedef struct TagunzFile__ { int unused; } unzFile__; typedef unzFile__ *unzFile; #else typedef voidp unzFile; #endif #define UNZ_OK (0) #define UNZ_END_OF_LIST_OF_FILE (-100) #define UNZ_ERRNO (Z_ERRNO) #define UNZ_EOF (0) #define UNZ_PARAMERROR (-102) #define UNZ_BADZIPFILE (-103) #define UNZ_INTERNALERROR (-104) #define UNZ_CRCERROR (-105) /* tm_unz contain date/time info */ typedef struct tm_unz_s { uInt tm_sec; /* seconds after the minute - [0,59] */ uInt tm_min; /* minutes after the hour - [0,59] */ uInt tm_hour; /* hours since midnight - [0,23] */ uInt tm_mday; /* day of the month - [1,31] */ uInt tm_mon; /* months since January - [0,11] */ uInt tm_year; /* years - [1980..2044] */ } tm_unz; /* unz_global_info structure contain global data about the ZIPfile These data comes from the end of central dir */ typedef struct unz_global_info_s { uLong number_entry; /* total number of entries in the central dir on this disk */ uLong size_comment; /* size of the global comment of the zipfile */ } unz_global_info; /* unz_file_info contain information about a file in the zipfile */ typedef struct unz_file_info_s { uLong version; /* version made by 2 bytes */ uLong version_needed; /* version needed to extract 2 bytes */ uLong flag; /* general purpose bit flag 2 bytes */ uLong compression_method; /* compression method 2 bytes */ uLong dosDate; /* last mod file date in Dos fmt 4 bytes */ uLong crc; /* crc-32 4 bytes */ uLong compressed_size; /* compressed size 4 bytes */ uLong uncompressed_size; /* uncompressed size 4 bytes */ uLong size_filename; /* filename length 2 bytes */ uLong size_file_extra; /* extra field length 2 bytes */ uLong size_file_comment; /* file comment length 2 bytes */ uLong disk_num_start; /* disk number start 2 bytes */ uLong internal_fa; /* internal file attributes 2 bytes */ uLong external_fa; /* external file attributes 4 bytes */ tm_unz tmu_date; } unz_file_info; extern int ZEXPORT unzStringFileNameCompare OF ((const char* fileName1, const char* fileName2, int iCaseSensitivity)); /* Compare two filename (fileName1,fileName2). If iCaseSenisivity = 1, comparision is case sensitivity (like strcmp) If iCaseSenisivity = 2, comparision is not case sensitivity (like strcmpi or strcasecmp) If iCaseSenisivity = 0, case sensitivity is defaut of your operating system (like 1 on Unix, 2 on Windows) */ extern unzFile ZEXPORT unzOpen OF((const char *path)); /* Open a Zip file. path contain the full pathname (by example, on a Windows XP computer "c:\\zlib\\zlib113.zip" or on an Unix computer "zlib/zlib113.zip". If the zipfile cannot be opened (file don't exist or in not valid), the return value is NULL. Else, the return value is a unzFile Handle, usable with other function of this unzip package. */ extern unzFile ZEXPORT unzOpen2 OF((const char *path, zlib_filefunc_def* pzlib_filefunc_def)); /* Open a Zip file, like unzOpen, but provide a set of file low level API for read/write the zip file (see ioapi.h) */ extern int ZEXPORT unzClose OF((unzFile file)); /* Close a ZipFile opened with unzipOpen. If there is files inside the .Zip opened with unzOpenCurrentFile (see later), these files MUST be closed with unzipCloseCurrentFile before call unzipClose. return UNZ_OK if there is no problem. */ extern int ZEXPORT unzGetGlobalInfo OF((unzFile file, unz_global_info *pglobal_info)); /* Write info about the ZipFile in the *pglobal_info structure. No preparation of the structure is needed return UNZ_OK if there is no problem. */ extern int ZEXPORT unzGetGlobalComment OF((unzFile file, char *szComment, uLong uSizeBuf)); /* Get the global comment string of the ZipFile, in the szComment buffer. uSizeBuf is the size of the szComment buffer. return the number of byte copied or an error code <0 */ /***************************************************************************/ /* Unzip package allow you browse the directory of the zipfile */ extern int ZEXPORT unzGoToFirstFile OF((unzFile file)); /* Set the current file of the zipfile to the first file. return UNZ_OK if there is no problem */ extern int ZEXPORT unzGoToNextFile OF((unzFile file)); /* Set the current file of the zipfile to the next file. return UNZ_OK if there is no problem return UNZ_END_OF_LIST_OF_FILE if the actual file was the latest. */ extern int ZEXPORT unzLocateFile OF((unzFile file, const char *szFileName, int iCaseSensitivity)); /* Try locate the file szFileName in the zipfile. For the iCaseSensitivity signification, see unzStringFileNameCompare return value : UNZ_OK if the file is found. It becomes the current file. UNZ_END_OF_LIST_OF_FILE if the file is not found */ /* ****************************************** */ /* Ryan supplied functions */ /* unz_file_info contain information about a file in the zipfile */ typedef struct unz_file_pos_s { uLong pos_in_zip_directory; /* offset in zip file directory */ uLong num_of_file; /* # of file */ } unz_file_pos; extern int ZEXPORT unzGetFilePos( unzFile file, unz_file_pos* file_pos); extern int ZEXPORT unzGoToFilePos( unzFile file, unz_file_pos* file_pos); /* ****************************************** */ extern int ZEXPORT unzGetCurrentFileInfo OF((unzFile file, unz_file_info *pfile_info, char *szFileName, uLong fileNameBufferSize, void *extraField, uLong extraFieldBufferSize, char *szComment, uLong commentBufferSize)); /* Get Info about the current file if pfile_info!=NULL, the *pfile_info structure will contain somes info about the current file if szFileName!=NULL, the filemane string will be copied in szFileName (fileNameBufferSize is the size of the buffer) if extraField!=NULL, the extra field information will be copied in extraField (extraFieldBufferSize is the size of the buffer). This is the Central-header version of the extra field if szComment!=NULL, the comment string of the file will be copied in szComment (commentBufferSize is the size of the buffer) */ /***************************************************************************/ /* for reading the content of the current zipfile, you can open it, read data from it, and close it (you can close it before reading all the file) */ extern int ZEXPORT unzOpenCurrentFile OF((unzFile file)); /* Open for reading data the current file in the zipfile. If there is no error, the return value is UNZ_OK. */ extern int ZEXPORT unzOpenCurrentFile2 OF((unzFile file, int* method, int* level, int raw)); /* Same than unzOpenCurrentFile, but open for read raw the file (not uncompress) *method will receive method of compression, *level will receive level of compression note : you can set level parameter as NULL (if you did not want known level, but you CANNOT set method parameter as NULL */ extern int ZEXPORT unzCloseCurrentFile OF((unzFile file)); /* Close the file in zip opened with unzOpenCurrentFile Return UNZ_CRCERROR if all the file was read but the CRC is not good */ extern int ZEXPORT unzReadCurrentFile OF((unzFile file, voidp buf, unsigned len)); /* Read bytes from the current file (opened by unzOpenCurrentFile) buf contain buffer where data must be copied len the size of buf. return the number of byte copied if somes bytes are copied return 0 if the end of file was reached return <0 with error code if there is an error (UNZ_ERRNO for IO error, or zLib error for uncompress error) */ extern z_off_t ZEXPORT unztell OF((unzFile file)); /* Give the current position in uncompressed data */ extern int ZEXPORT unzeof OF((unzFile file)); /* return 1 if the end of file was reached, 0 elsewhere */ extern int ZEXPORT unzGetLocalExtrafield OF((unzFile file, voidp buf, unsigned len)); /* Read extra field from the current file (opened by unzOpenCurrentFile) This is the local-header version of the extra field (sometimes, there is more info in the local-header version than in the central-header) if buf==NULL, it return the size of the local extra field if buf!=NULL, len is the size of the buffer, the extra header is copied in buf. the return value is the number of bytes copied in buf, or (if <0) the error code */ #ifdef __cplusplus } #endif #endif /* _unz_H */ xqf-1.0.5/src/zip/ioapi.c0000644002404400000620000000711507636325001012074 00000000000000/* ioapi.c -- IO base function header for compress/uncompress .zip files using zlib + zip or unzip API Version 0.21, March 10th, 2003 Copyright (C) 1998-2003 Gilles Vollant */ #include #include #include #include "zlib.h" #include "ioapi.h" /* I've found an old Unix (a SunOS 4.1.3_U1) without all SEEK_* defined.... */ #ifndef SEEK_CUR #define SEEK_CUR 1 #endif #ifndef SEEK_END #define SEEK_END 2 #endif #ifndef SEEK_SET #define SEEK_SET 0 #endif voidpf ZCALLBACK fopen_file_func OF(( voidpf opaque, const char* filename, int mode)); uLong ZCALLBACK fread_file_func OF(( voidpf opaque, voidpf stream, void* buf, uLong size)); uLong ZCALLBACK fwrite_file_func OF(( voidpf opaque, voidpf stream, const void* buf, uLong size)); long ZCALLBACK ftell_file_func OF(( voidpf opaque, voidpf stream)); long ZCALLBACK fseek_file_func OF(( voidpf opaque, voidpf stream, uLong offset, int origin)); int ZCALLBACK fclose_file_func OF(( voidpf opaque, voidpf stream)); int ZCALLBACK ferror_file_func OF(( voidpf opaque, voidpf stream)); voidpf ZCALLBACK fopen_file_func (opaque, filename, mode) voidpf opaque; const char* filename; int mode; { FILE* file = NULL; const char* mode_fopen = NULL; if ((mode & ZLIB_FILEFUNC_MODE_READWRITEFILTER)==ZLIB_FILEFUNC_MODE_READ) mode_fopen = "rb"; else if (mode & ZLIB_FILEFUNC_MODE_EXISTING) mode_fopen = "r+b"; else if (mode & ZLIB_FILEFUNC_MODE_CREATE) mode_fopen = "wb"; if ((filename!=NULL) && (mode_fopen != NULL)) file = fopen(filename, mode_fopen); return file; } uLong ZCALLBACK fread_file_func (opaque, stream, buf, size) voidpf opaque; voidpf stream; void* buf; uLong size; { uLong ret; ret = fread(buf, 1, size, (FILE *)stream); return ret; } uLong ZCALLBACK fwrite_file_func (opaque, stream, buf, size) voidpf opaque; voidpf stream; const void* buf; uLong size; { uLong ret; ret = fwrite(buf, 1, size, (FILE *)stream); return ret; } long ZCALLBACK ftell_file_func (opaque, stream) voidpf opaque; voidpf stream; { long ret; ret = ftell((FILE *)stream); return ret; } long ZCALLBACK fseek_file_func (opaque, stream, offset, origin) voidpf opaque; voidpf stream; uLong offset; int origin; { int fseek_origin=0; long ret; switch (origin) { case ZLIB_FILEFUNC_SEEK_CUR : fseek_origin = SEEK_CUR; break; case ZLIB_FILEFUNC_SEEK_END : fseek_origin = SEEK_END; break; case ZLIB_FILEFUNC_SEEK_SET : fseek_origin = SEEK_SET; break; default: return -1; } ret = 0; fseek((FILE *)stream, offset, fseek_origin); return ret; } int ZCALLBACK fclose_file_func (opaque, stream) voidpf opaque; voidpf stream; { int ret; ret = fclose((FILE *)stream); return ret; } int ZCALLBACK ferror_file_func (opaque, stream) voidpf opaque; voidpf stream; { int ret; ret = ferror((FILE *)stream); return ret; } void fill_fopen_filefunc (pzlib_filefunc_def) zlib_filefunc_def* pzlib_filefunc_def; { pzlib_filefunc_def->zopen_file = fopen_file_func; pzlib_filefunc_def->zread_file = fread_file_func; pzlib_filefunc_def->zwrite_file = fwrite_file_func; pzlib_filefunc_def->ztell_file = ftell_file_func; pzlib_filefunc_def->zseek_file = fseek_file_func; pzlib_filefunc_def->zclose_file = fclose_file_func; pzlib_filefunc_def->zerror_file = ferror_file_func; pzlib_filefunc_def->opaque = NULL; } xqf-1.0.5/src/zip/ioapi.h0000644002404400000620000000470307636325001012101 00000000000000/* ioapi.h -- IO base function header for compress/uncompress .zip files using zlib + zip or unzip API Version 0.21, March 10th, 2003 Copyright (C) 1998-2003 Gilles Vollant */ #ifndef _ZLIBIOAPI_H #define _ZLIBIOAPI_H #define ZLIB_FILEFUNC_SEEK_CUR (1) #define ZLIB_FILEFUNC_SEEK_END (2) #define ZLIB_FILEFUNC_SEEK_SET (0) #define ZLIB_FILEFUNC_MODE_READ (1) #define ZLIB_FILEFUNC_MODE_WRITE (2) #define ZLIB_FILEFUNC_MODE_READWRITEFILTER (3) #define ZLIB_FILEFUNC_MODE_EXISTING (4) #define ZLIB_FILEFUNC_MODE_CREATE (8) #ifndef ZCALLBACK #if (defined(WIN32) || defined (WINDOWS) || defined (_WINDOWS)) && defined(CALLBACK) #define ZCALLBACK CALLBACK #else #define ZCALLBACK #endif #endif #ifdef __cplusplus extern "C" { #endif typedef voidpf (ZCALLBACK *open_file_func) OF((voidpf opaque, const char* filename, int mode)); typedef uLong (ZCALLBACK *read_file_func) OF((voidpf opaque, voidpf stream, void* buf, uLong size)); typedef uLong (ZCALLBACK *write_file_func) OF((voidpf opaque, voidpf stream, const void* buf, uLong size)); typedef long (ZCALLBACK *tell_file_func) OF((voidpf opaque, voidpf stream)); typedef long (ZCALLBACK *seek_file_func) OF((voidpf opaque, voidpf stream, uLong offset, int origin)); typedef int (ZCALLBACK *close_file_func) OF((voidpf opaque, voidpf stream)); typedef int (ZCALLBACK *testerror_file_func) OF((voidpf opaque, voidpf stream)); typedef struct zlib_filefunc_def_s { open_file_func zopen_file; read_file_func zread_file; write_file_func zwrite_file; tell_file_func ztell_file; seek_file_func zseek_file; close_file_func zclose_file; testerror_file_func zerror_file; voidpf opaque; } zlib_filefunc_def; void fill_fopen_filefunc OF((zlib_filefunc_def* pzlib_filefunc_def)); #define ZREAD(filefunc,filestream,buf,size) ((*((filefunc).zread_file))((filefunc).opaque,filestream,buf,size)) #define ZWRITE(filefunc,filestream,buf,size) ((*((filefunc).zwrite_file))((filefunc).opaque,filestream,buf,size)) #define ZTELL(filefunc,filestream) ((*((filefunc).ztell_file))((filefunc).opaque,filestream)) #define ZSEEK(filefunc,filestream,pos,mode) ((*((filefunc).zseek_file))((filefunc).opaque,filestream,pos,mode)) #define ZCLOSE(filefunc,filestream) ((*((filefunc).zclose_file))((filefunc).opaque,filestream)) #define ZERROR(filefunc,filestream) ((*((filefunc).zerror_file))((filefunc).opaque,filestream)) #ifdef __cplusplus } #endif #endif xqf-1.0.5/src/rc.c0000644002404400000620000002655010311576062010600 00000000000000/* XQF - Quake server browser and launcher * Copyright (C) 1998-2000 Roman Pozlevich * * 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 */ #include #include /* is...() */ #include /* strcmp */ #include /* stat. mkdir */ #include /* stat, mkdir, unlink */ #include /* mkdir */ #include /* mkdir */ #include "xqf.h" #include "game.h" #include "pref.h" #include "filter.h" #include "utils.h" #include "config.h" #include "rc.h" static FILE *rc; static int token = -1; static char *token_str = NULL; static int token_int = 0; static char *tptr = NULL; static int state = STATE_SPACE; static char *rcfilename = NULL; static int line; static int pos; static struct keyword keywords[] = { { "q1_top", KEYWORD_INT, "/" CONFIG_FILE "/Game: QS/top" }, { "q1_bottom", KEYWORD_INT, "/" CONFIG_FILE "/Game: QS/bottom" }, { "team", KEYWORD_STRING,"/" CONFIG_FILE "/Game: QWS/team" }, { "qw_skin", KEYWORD_STRING,"/" CONFIG_FILE "/Game: QWS/skin" }, { "qw_top", KEYWORD_INT, "/" CONFIG_FILE "/Game: QWS/top" }, { "qw_bottom", KEYWORD_INT, "/" CONFIG_FILE "/Game: QWS/bottom" }, { "q2_skin", KEYWORD_STRING,"/" CONFIG_FILE "/Game: Q2S/skin" }, { "rate", KEYWORD_INT, "/" CONFIG_FILE "/Game: QWS/rate" }, { "cl_nodelta",KEYWORD_INT, "/" CONFIG_FILE "/Game: QWS/cl_nodelta" }, { "cl_predict",KEYWORD_INT, "/" CONFIG_FILE "/Game: QWS/cl_predict" }, { "noaim", KEYWORD_INT, "/" CONFIG_FILE "/Game: QWS/noaim" }, { "pushlatency",KEYWORD_INT, "/" CONFIG_FILE "/Game: QWS/pushlatency mode" }, { "noskins", KEYWORD_INT, "/" CONFIG_FILE "/Game: QWS/noskins" }, { "w_switch", KEYWORD_INT, "/" CONFIG_FILE "/Game: QWS/w_switch" }, { "b_switch", KEYWORD_INT, "/" CONFIG_FILE "/Game: QWS/b_switch" }, { "name", KEYWORD_STRING,"/" CONFIG_FILE "/Games Config/player name" }, { "nosound", KEYWORD_BOOL, "/" CONFIG_FILE "/Games Config/nosound" }, { "nocdaudio", KEYWORD_BOOL, "/" CONFIG_FILE "/Games Config/nocdaudio" }, { "retries", KEYWORD_INT, "/" CONFIG_FILE "/Server Filter/retries" }, { "ping", KEYWORD_INT, "/" CONFIG_FILE "/Server Filter/ping" }, { "notfull", KEYWORD_BOOL, "/" CONFIG_FILE "/Server Filter/not full" }, { "notempty", KEYWORD_BOOL, "/" CONFIG_FILE "/Server Filter/not empty" }, { "nocheats", KEYWORD_BOOL, "/" CONFIG_FILE "/Server Filter/no cheats" }, { "nopasswd", KEYWORD_BOOL, "/" CONFIG_FILE "/Server Filter/no password" }, { "terminate", KEYWORD_BOOL, "/" CONFIG_FILE "/General/terminate" }, { "iconify", KEYWORD_BOOL, "/" CONFIG_FILE "/General/iconify" }, { "savelists", KEYWORD_BOOL, "/" CONFIG_FILE "/General/save lists" }, { "saveservers",KEYWORD_BOOL, "/" CONFIG_FILE "/General/save srvinfo" }, { "saveplayers",KEYWORD_BOOL, "/" CONFIG_FILE "/General/save players" }, { "autofavorites", KEYWORD_BOOL, "/" CONFIG_FILE "/General/refresh favorites" }, { "tb_style", KEYWORD_INT, "/" CONFIG_FILE "/Appearance/toolbar style" }, { "tb_tips", KEYWORD_BOOL, "/" CONFIG_FILE "/Appearance/toolbar tips" }, { "sort_on_refresh", KEYWORD_BOOL, "/" CONFIG_FILE "/Appearance/sort on refresh" }, { "ref_on_update", KEYWORD_BOOL, "/" CONFIG_FILE "/Appearance/refresh on update" }, { "alwaysresolve", KEYWORD_BOOL, "/" CONFIG_FILE "/Appearance/show hostnames" }, { "maxsimultaneous", KEYWORD_INT, "/" CONFIG_FILE "/QStat/maxsimultaneous" }, { "maxretries", KEYWORD_INT, "/" CONFIG_FILE "/QStat/maxretires" }, { "q1_custom_cfg", KEYWORD_STRING,"/" CONFIG_FILE "/Game: QS/custom cfg" }, { "qw_custom_cfg", KEYWORD_STRING,"/" CONFIG_FILE "/Game: QWS/custom cfg" }, { "q2_custom_cfg", KEYWORD_STRING,"/" CONFIG_FILE "/Game: Q2S/custom cfg" }, { "q3_custom_cfg", KEYWORD_STRING,"/" CONFIG_FILE "/Game: Q3S/custom cfg" }, { "q1_dir", KEYWORD_STRING,"/" CONFIG_FILE "/Game: QS/dir" }, { "q1_cmd", KEYWORD_STRING,"/" CONFIG_FILE "/Game: QS/cmd" }, { "qw_dir", KEYWORD_STRING,"/" CONFIG_FILE "/Game: QWS/dir" }, { "qw_cmd", KEYWORD_STRING,"/" CONFIG_FILE "/Game: QWS/cmd" }, { "q2_dir", KEYWORD_STRING,"/" CONFIG_FILE "/Game: Q2S/dir" }, { "q2_cmd", KEYWORD_STRING,"/" CONFIG_FILE "/Game: Q2S/cmd" }, { "q3_dir", KEYWORD_STRING,"/" CONFIG_FILE "/Game: Q3S/dir" }, { "q3_cmd", KEYWORD_STRING,"/" CONFIG_FILE "/Game: Q3S/cmd" }, { "hl_dir", KEYWORD_STRING,"/" CONFIG_FILE "/Game: HLS/dir" }, { "hl_cmd", KEYWORD_STRING,"/" CONFIG_FILE "/Game: HLS/cmd" }, /* compatibility with ancient versions */ { "top", KEYWORD_INT, "/" CONFIG_FILE "/Game: QWS/top" }, { "bottom", KEYWORD_INT, "/" CONFIG_FILE "/Game: QWS/bottom" }, { "cl_predict_players", KEYWORD_INT, "/" CONFIG_FILE "/Game: QWS/cl_predict" }, { "skin", KEYWORD_STRING,"/" CONFIG_FILE "/Game: QWS/skin" }, { "dir", KEYWORD_STRING,"/" CONFIG_FILE "/Game: QWS/dir" }, { "cmd", KEYWORD_STRING,"/" CONFIG_FILE "/Game: QWS/dir" }, { NULL, 0, NULL } }; static void unexpected_char_error (char c) { fprintf (stderr, "Unexpected character: "); fprintf (stderr, (isprint (c))? "\'%c\'" : "\\%03o", c); fprintf (stderr, " in file %s[line:%d,pos:%d]\n", rcfilename, line, pos); } static void unexpected_eof_error (void) { fprintf (stderr, "Unexpected end of line in file %s[line:%d,pos:%d]\n", rcfilename, line, pos); } static void syntax_error (void) { fprintf (stderr, "Syntax error in file %s[line:%d,pos:%d]\n", rcfilename, line, pos); } static void unexpected_token_error (int need_token) { fprintf (stderr, "Syntax error in file %s[line:%d,pos:%d]\n", rcfilename, line, pos); fprintf (stderr, "Skipping to the end of the line...\n"); } static inline int rc_getc (FILE *rc) { pos++; return getc (rc); } static inline int rc_ungetc (char c, FILE *rc) { pos--; return ungetc (c, rc); } static int rc_open (char *filename) { rc = fopen (filename, "r"); if (rc == NULL) return -1; token_str = g_malloc (BUFFER_SIZE); tptr = token_str; state = STATE_SPACE; token_int = 0; line = pos = 1; rcfilename = g_strdup (filename); return 0; } static void rc_close (void) { if (rc) { fclose (rc); rc = NULL; } if (token_str) { g_free (token_str); token_str = NULL; } if (rcfilename) { g_free (rcfilename); rcfilename = NULL; } } static int rc_next_token (void) { int c; int num, i; int sign = 1; if (!rc) return TOKEN_EOF; if ((c = rc_getc (rc)) == EOF) { rc_close (); return TOKEN_EOF; } tptr = token_str; while (1) { switch (state) { case STATE_SPACE: if (c == ' ' || c == '\r' || c == '\t') break; if (isdigit (c)) { sign = 1; token_int = c - '0'; state = STATE_INT; break; } if (isalnum (c) || c == '_') { *tptr++ = c; state = STATE_TOKEN; break; } switch (c) { case '\n': line++; pos = 1; return TOKEN_EOL; break; case ',': return TOKEN_COMMA; break; case '\"': state = STATE_STRING; break; case '-': sign = -1; token_int = 0; state = STATE_INT; break; case '#': state = STATE_COMMENT; break; default: unexpected_char_error (c); break; } /* switch */ break; case STATE_COMMENT: if (c == '\n') { line++; pos = 1; state = STATE_SPACE; return TOKEN_EOL; } break; case STATE_INT: if (!isdigit (c)) { rc_ungetc (c, rc); token_int = token_int * sign; state = STATE_SPACE; return TOKEN_INT; } token_int = token_int*10 + c - '0'; break; case STATE_TOKEN: if (!isalnum (c) && c != '_') { rc_ungetc (c, rc); *tptr = '\0'; state = STATE_SPACE; return TOKEN_KEYWORD; } *tptr++ = c; break; case STATE_STRING: if (c == '\"') { *tptr = '\0'; state = STATE_SPACE; return TOKEN_STRING; } if (c == '\n') { unexpected_eof_error (); rc_ungetc (c, rc); *tptr = '\0'; state = STATE_SPACE; return TOKEN_STRING; } if (c == '\\') { if ((c = rc_getc (rc)) == EOF) { *tptr = '\0'; rc_close (); return TOKEN_STRING; } if (c >= '0' && c <='7') { for (i=0, num=0; i < 3; i++) { num <<= 3; num |= c - '0'; c = rc_getc (rc); if (c < '0' || c > '7') break; } *tptr++ = num; if (c == EOF) { *tptr = '\0'; rc_close (); return TOKEN_STRING; } continue; } /* if (c >= '0' && c <='7') */ switch (c) { case 'n': *tptr++ = '\n'; break; case 'r': *tptr++ = '\r'; break; case 't': *tptr++ = '\t'; break; default: *tptr++ = c; break; } /* switch (c) */ break; } /* if (c == '\\') */ *tptr++ = c; break; } /* switch (state) */ c = rc_getc (rc); } /* while (1) */ } static void rc_skip_to_eol (void) { while (token != TOKEN_EOL && token != TOKEN_EOF) { token = rc_next_token (); } } static int rc_expect_token (int need_token) { if ((token = rc_next_token ()) == need_token) return TRUE; unexpected_token_error (need_token); rc_skip_to_eol (); return FALSE; } int rc_parse (void) { char *fn; struct keyword *kw; fn = file_in_dir (user_rcdir, RC_FILE); rc_open (fn); g_free (fn); if(!rc) return -1; while ((token = rc_next_token ()) != TOKEN_EOF) { switch (token) { case TOKEN_KEYWORD: for (kw = keywords; kw->name; kw++) { if (strcmp (token_str, kw->name) == 0) { switch (kw->required) { case KEYWORD_INT: if (rc_expect_token (TOKEN_INT)) config_set_int (kw->config, token_int); break; case KEYWORD_BOOL: if (rc_expect_token (TOKEN_INT)) config_set_bool (kw->config, token_int); break; case KEYWORD_STRING: if (rc_expect_token (TOKEN_STRING)) config_set_string (kw->config, token_str); break; } break; } } break; case TOKEN_EOL: case TOKEN_EOF: break; default: syntax_error (); rc_skip_to_eol (); break; } /* switch */ } /* while */ rc_close (); /* Compatibility with old versions */ if (!games[Q1_SERVER].dir && games[QW_SERVER].dir) { games[Q1_SERVER].dir = g_strdup (games[QW_SERVER].dir); config_set_string ("/" CONFIG_FILE "/Game: QS/dir", games[Q1_SERVER].dir); } if (default_w_switch < 0) default_w_switch = 0; if (default_b_switch < 0) default_b_switch = 0; return 0; } int rc_save (void) { char *fn; fn = file_in_dir (user_rcdir, RC_FILE); unlink (fn); g_free (fn); return 0; } int rc_check_dir (void) { struct stat st_buf; if (stat (user_rcdir, &st_buf) == -1) { return mkdir (user_rcdir, 0755); } else { if (!S_ISDIR (st_buf.st_mode)) { fprintf (stderr, "%s is not a directory\n", user_rcdir); return -1; } } return 0; } xqf-1.0.5/src/rc.h0000644002404400000620000000261407201342720010574 00000000000000/* XQF - Quake server browser and launcher * Copyright (C) 1998-2000 Roman Pozlevich * * 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 */ #ifndef __RC_H__ #define __RC_H__ #include enum keyword_type { KEYWORD_INT, KEYWORD_BOOL, KEYWORD_STRING }; struct keyword { char *name; enum keyword_type required; char *config; }; #define BUFFER_SIZE 1024 #define STATE_SPACE 0 #define STATE_TOKEN 1 #define STATE_INT 2 #define STATE_STRING 3 #define STATE_COMMENT 4 #define TOKEN_EOF 0 #define TOKEN_KEYWORD 1 #define TOKEN_INT 2 #define TOKEN_STRING 3 #define TOKEN_COMMA 4 #define TOKEN_EOL 5 extern int rc_parse (void); extern int rc_save (void); extern int rc_check_dir (void); #endif /* __RC_H__ */ xqf-1.0.5/src/utmaps.c0000644002404400000620000000743507633070253011512 00000000000000/* XQF - Quake server browser and launcher * Functions for finding installed ut/ut2/rune maps * Copyright (C) 2002 Ludwig Nussel * * 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 */ #include "gnuconfig.h" #include #include #include #include #include #include #include #include "debug.h" /** * find all files with specified suffix up to two levels under startdir, insert * maps into maphash */ void findutmaps_dir(GHashTable* maphash, const char* startdir, const char* suffix) { DIR* dir = NULL; struct dirent* dire = NULL; char* curdir = NULL; GSList* dirstack = NULL; int maxlevel = 2; char* mod = NULL; typedef struct { char* name; int level; } DirStackEntry; DirStackEntry* dse; if(!startdir || !maphash || !suffix) return; dse = g_new0(DirStackEntry,1); dse->name=g_strdup(startdir); dirstack = g_slist_prepend(dirstack,dse); while(dirstack) { GSList* current = dirstack; dirstack = g_slist_remove_link(dirstack,dirstack); dse = current->data; curdir = dse->name; if(dse->level == 1) { if(mod) g_free(mod); mod=g_strdup(g_basename(curdir)); } dir = opendir(curdir); if(!dir) { perror(curdir); g_free(curdir); g_free(dse); continue; } while((dire = readdir(dir))) { char* name = dire->d_name; struct stat statbuf; if(!strcmp(name,".") || !strcmp(name,"..")) continue; name = g_strconcat(curdir,"/",name,NULL); if(stat(name,&statbuf)) { perror(name); g_free(name); continue; } if(S_ISDIR(statbuf.st_mode)) { if(maxlevel>=0 && dse->levelname=name; tmpdse->level=dse->level+1; dirstack = g_slist_prepend(dirstack,tmpdse); } else { g_free(name); } } else { if(strlen(dire->d_name)>strlen(suffix) && !g_strcasecmp(dire->d_name+strlen(dire->d_name)-strlen(suffix),suffix)) { // s#(.*)suffix#\1# char* mapname = g_strndup(dire->d_name,strlen(dire->d_name)-strlen(suffix)); g_strdown(mapname); if(g_hash_table_lookup(maphash,mapname)) { g_free(mapname); } else { g_hash_table_insert(maphash,mapname,GUINT_TO_POINTER(1)); } } g_free(name); } } closedir(dir); g_free(curdir); g_free(dse); } if(mod) g_free(mod); } static gboolean maphashforeachremovefunc(gpointer key, gpointer value, gpointer user_data) { g_free(key); return TRUE; } /** free all keys and destroy maphash */ void ut_clear_maps(GHashTable* maphash) { if(!maphash) return; g_hash_table_foreach_remove(maphash, maphashforeachremovefunc, NULL); g_hash_table_destroy(maphash); } /** create map hash */ GHashTable* ut_init_maphash() { return g_hash_table_new(g_str_hash,g_str_equal); } /** return true if mapname is contained in maphash, false otherwise */ gboolean ut_lookup_map(GHashTable* maphash, const char* mapname) { if(g_hash_table_lookup(maphash,mapname)) return TRUE; return FALSE; } xqf-1.0.5/src/utmaps.h0000644002404400000620000000251507574440036011515 00000000000000/* XQF - Quake server browser and launcher * Functions for finding installed ut/ut2/rune maps * Copyright (C) 2002 Ludwig Nussel * * 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 */ #ifndef UTMAPS_H #define UTMAPS_H /** free all keys and destroy maphash */ void ut_clear_maps(GHashTable* maphash); /** create map hash */ GHashTable* ut_init_maphash(); /** return true if mapname is contained in maphash, false otherwise */ gboolean ut_lookup_map(GHashTable* maphash, const char* mapname); /** search for maps with suffix in directory and add them to maphash */ void findutmaps_dir(GHashTable* maphash, const char* startdir, const char* suffix); #endif xqf-1.0.5/src/debug.c0000644002404400000620000000446207652040064011262 00000000000000/* XQF - Quake server browser and launcher * Copyright (C) 1998-2000 Roman Pozlevich * * 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 */ #include #include #include #include "debug.h" static int indent_level; static int debug_level; void debug_int(const char* file, int line, const char* function, int level, const char* fmt, ...) { va_list argp; int i; char buf[9]; time_t now; for (i=0;i debug_level ) return; fprintf(stderr, "debug(%d): ", level); va_start(argp, fmt); vfprintf(stderr, fmt, argp); va_end(argp); fprintf(stderr, " EXEC> "); for (i = 0; argv[i]; ++i) fprintf (stderr, "%s ", argv[i]); fprintf(stderr, "\n"); } void set_debug_level (int level) { debug_level = level; } inline int get_debug_level (void) { return (debug_level); } int debug_increase_indent() { indent_level++; return indent_level; } int debug_decrease_indent() { if(indent_level>0)indent_level--; return indent_level; } xqf-1.0.5/src/debug.h0000644002404400000620000000306707775012546011301 00000000000000/* XQF - Quake server browser and launcher * Copyright (C) 1998-2000 Roman Pozlevich * * 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 */ #ifndef _DEBUG_H_ #define _DEBUG_H_ #define DEFAULT_DEBUG_LEVEL 0 #define debug(level,fmt,rest...) \ if( level <= get_debug_level() ) \ debug_int(__FILE__,__LINE__,__FUNCTION__,level,fmt,##rest) #define xqf_informal(fmt,rest...) \ debug_int(__FILE__,__LINE__,__FUNCTION__,-1,fmt,##rest) #define xqf_warning(fmt,rest...) \ debug_int(__FILE__,__LINE__,__FUNCTION__,-2,fmt,##rest) #define xqf_error(fmt,rest...) \ debug_int(__FILE__,__LINE__,__FUNCTION__,-3,fmt,##rest) void debug_int(const char* file, int line, const char* function, int level, const char* fmt, ...); void debug_cmd(int, char *[], char *, ...); void set_debug_level (int); inline int get_debug_level (void); int debug_increase_indent(void); int debug_decrease_indent(void); #endif xqf-1.0.5/src/gamesxml2c.c0000644002404400000620000002633610335351254012240 00000000000000/* XQF - Quake server browser and launcher * generate C code from games.xml * Copyright (C) 2003 Ludwig Nussel * * 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 */ #include #include #include #include #include typedef enum { Tag_0, TAG_start_basic = Tag_0, TAG_type = TAG_start_basic, TAG_flags, TAG_name, TAG_default_port, TAG_default_master_port, TAG_id, TAG_qstat_str, TAG_qstat_option, TAG_qstat_master_option, TAG_pix, TAG_parse_player, TAG_parse_server, TAG_analyze_serverinfo, TAG_config_is_valid, TAG_write_config, TAG_exec_client, TAG_custom_cfgs, TAG_save_info, TAG_init_maps, TAG_has_map, TAG_get_mapshot, TAG_arch_identifier, TAG_identify_cpu, TAG_identify_os, TAG_cmd_or_dir_changed, TAG_prefs_load, TAG_update_prefs, TAG_default_home, TAG_pd, TAG_end_basic = TAG_pd, TAG_start_multi, TAG_data = TAG_start_multi, TAG_main_mod, TAG_command, TAG_attributes, TAG_end_multi = TAG_attributes, TAG_base, TAG_count, TAG_invalid = TAG_count, } GameTag; typedef enum { Tag_type_invalid, Tag_type_string, Tag_type_address, Tag_type_literal, } TagType; typedef enum { Tag_no_inherit, Tag_do_inherit, } TagInherit; typedef struct { TagInherit inherit; TagType type; const xmlChar* name; } Tag; static Tag tags[TAG_count+1]; static void add_tag(GameTag nr, TagInherit inherit, TagType type, const char* name) { tags[nr].inherit = inherit; tags[nr].type = type; tags[nr].name = name; } static void tags_init() { add_tag(TAG_type, Tag_no_inherit, Tag_type_literal, "type"); add_tag(TAG_flags, Tag_do_inherit, Tag_type_literal, "flags"); add_tag(TAG_name, Tag_no_inherit, Tag_type_string, "name"); add_tag(TAG_default_port, Tag_do_inherit, Tag_type_literal, "default_port"); add_tag(TAG_default_master_port,Tag_do_inherit, Tag_type_literal, "default_master_port"); add_tag(TAG_id, Tag_no_inherit, Tag_type_string, "id"); add_tag(TAG_qstat_str, Tag_do_inherit, Tag_type_string, "qstat_str"); add_tag(TAG_qstat_option, Tag_do_inherit, Tag_type_string, "qstat_option"); add_tag(TAG_qstat_master_option,Tag_do_inherit, Tag_type_string, "qstat_master_option"); add_tag(TAG_pix, Tag_do_inherit, Tag_type_string, "icon"); add_tag(TAG_parse_player, Tag_do_inherit, Tag_type_literal, "parse_player"); add_tag(TAG_parse_server, Tag_do_inherit, Tag_type_literal, "parse_server"); add_tag(TAG_analyze_serverinfo, Tag_do_inherit, Tag_type_literal, "analyze_serverinfo"); add_tag(TAG_config_is_valid, Tag_do_inherit, Tag_type_literal, "config_is_valid"); add_tag(TAG_write_config, Tag_do_inherit, Tag_type_literal, "write_config"); add_tag(TAG_exec_client, Tag_do_inherit, Tag_type_literal, "exec_client"); add_tag(TAG_custom_cfgs, Tag_do_inherit, Tag_type_literal, "custom_cfgs"); add_tag(TAG_save_info, Tag_do_inherit, Tag_type_literal, "save_info"); add_tag(TAG_init_maps, Tag_do_inherit, Tag_type_literal, "init_maps"); add_tag(TAG_has_map, Tag_do_inherit, Tag_type_literal, "has_map"); add_tag(TAG_get_mapshot, Tag_do_inherit, Tag_type_literal, "get_mapshot"); add_tag(TAG_arch_identifier, Tag_do_inherit, Tag_type_string, "arch_identifier"); add_tag(TAG_identify_cpu, Tag_do_inherit, Tag_type_literal, "identify_cpu"); add_tag(TAG_identify_os, Tag_do_inherit, Tag_type_literal, "identify_os"); add_tag(TAG_cmd_or_dir_changed, Tag_do_inherit, Tag_type_literal, "cmd_or_dir_changed"); add_tag(TAG_prefs_load, Tag_no_inherit, Tag_type_literal, "prefs_load"); add_tag(TAG_update_prefs, Tag_no_inherit, Tag_type_literal, "update_prefs"); add_tag(TAG_default_home, Tag_no_inherit, Tag_type_string, "default_home"); add_tag(TAG_pd, Tag_no_inherit, Tag_type_address, "pd"); add_tag(TAG_data, Tag_no_inherit, Tag_type_literal, "data"); add_tag(TAG_main_mod, Tag_no_inherit, Tag_type_string, "main_mod"); add_tag(TAG_command, Tag_no_inherit, Tag_type_string, "command"); add_tag(TAG_attributes, Tag_no_inherit, Tag_type_string, "attributes"); add_tag(TAG_base, Tag_no_inherit, Tag_type_literal, "base"); add_tag(TAG_invalid, Tag_no_inherit, Tag_type_literal, NULL); } const xmlChar* tag_name(GameTag tag) { if(tag < TAG_start_basic || tag >= TAG_invalid) return NULL; return tags[tag].name; } TagInherit tag_inherit(GameTag tag) { if(tag < TAG_start_basic || tag >= TAG_invalid) return 0; return tags[tag].inherit; } TagType tag_type(GameTag tag) { if(tag < TAG_start_basic || tag >= TAG_invalid) return 0; return tags[tag].type; } struct MultiTag { xmlChar* val; struct MultiTag* next; }; typedef struct _RawGame { struct _RawGame* base; xmlChar* basestr; xmlChar* basic[TAG_end_basic - TAG_start_basic + 1]; struct MultiTag* multi[TAG_end_multi - TAG_start_multi + 1]; unsigned num_multitags; } RawGame; typedef struct _GameList { RawGame* game; struct _GameList* next; } GameList; GameTag getGameTag(const xmlChar* str) { unsigned i; GameTag tag = TAG_invalid; for ( i = 0; i < TAG_count; ++i) { if(!xmlStrcmp(str, tag_name(i))) { tag = i; break; } } return tag; } #define MALLOC(var, type) var = malloc(sizeof(type)); if(!var) abort(); memset(var, 0, sizeof(type)); RawGame* parseGame(xmlDocPtr doc, xmlNodePtr node) { GameTag tag; xmlChar* val = NULL; RawGame* rawgame; MALLOC(rawgame, RawGame); for (node = node->xmlChildrenNode; node; node = node->next) { if(node->type != XML_ELEMENT_NODE) continue; tag = getGameTag(node->name); if(tag == TAG_invalid) { fprintf(stderr,"invalid tag: %s\n", node->name); continue; } val = xmlNodeListGetString(doc, node->xmlChildrenNode, 1); if(tag <= TAG_end_basic ) { rawgame->basic[tag] = val; } else if(tag >= TAG_start_multi && tag <= TAG_end_multi ) { if(val) { struct MultiTag* mt; MALLOC(mt, struct MultiTag); mt->val = val; mt->next = rawgame->multi[tag-TAG_start_multi]; rawgame->multi[tag-TAG_start_multi] = mt; } } else if (tag == TAG_base) { rawgame->basestr = val; } } return rawgame; } GameList* parseGames(const char* filename) { xmlDocPtr doc; xmlNodePtr node; GameList* list = NULL; doc = xmlParseFile(filename); if (doc == NULL) return(NULL); node = xmlDocGetRootElement(doc); if (node == NULL) { fprintf(stderr,"empty document\n"); xmlFreeDoc(doc); return(NULL); } if (xmlStrcmp(node->name, (const xmlChar *) "games")) { fprintf(stderr,"document of the wrong type, root node != games"); xmlFreeDoc(doc); return(NULL); } for (node = node->xmlChildrenNode; node; node = node->next) { if ((!xmlStrcmp(node->name, (const xmlChar *) "game"))) { RawGame* rawgame; rawgame = parseGame(doc, node); if(rawgame) { GameList* rg = NULL; MALLOC(rg, GameList); rg->game = rawgame; rg->next = list; list = rg; } } } return list; } void printGame(FILE* f, RawGame* rg, RawGame* template) { GameTag tag; fputs(" {\n", f); for ( tag = TAG_start_basic; tag <= TAG_end_basic; ++tag) { xmlChar* val = rg->basic[tag]; if(!val && rg->base && tag_inherit(tag)) val = rg->base->basic[tag]; if(!val) val = template->basic[tag]; if(!val || !xmlStrcmp(val, "NULL")) continue; switch(tag_type(tag)) { case Tag_type_string: fprintf(f, " %-20s: \"%s\",\n", tag_name(tag), val); break; case Tag_type_address: fprintf(f, " %-20s: &%s,\n", tag_name(tag), val); break; case Tag_type_literal: fprintf(f, " %-20s: %s,\n", tag_name(tag), val); break; case Tag_type_invalid: break; } } for ( tag = TAG_start_multi; tag <= TAG_end_multi; ++tag) { struct MultiTag* m = rg->multi[tag - TAG_start_multi]; if(!m && rg->base && tag_inherit(tag)) m = rg->base->multi[tag - TAG_start_multi]; if(!m) m = template->multi[tag - TAG_start_multi]; if(!m || !m->val || !xmlStrcmp(m->val, "NULL")) continue; fprintf(f, " %-20s: stringlist%03u,\n", tag_name(tag), rg->num_multitags++ ); } fputs(" },\n", f); } int main (int argc, char* argv[]) { GameList* list = NULL; GameList* ptr = NULL; GameList* next = NULL; RawGame* template = NULL; unsigned i = 0; FILE* f = stdout; if(argc < 2) return 1; tags_init(); list = parseGames(argv[1]); if(!list) return 2; // reverse list and find template ptr = list; list = NULL; for(; ptr; ptr = next) { next = ptr->next; if(!template && !xmlStrcmp(ptr->game->basic[TAG_type], "DEFAULT")) { template = ptr->game; // free(ptr); continue; } ptr->next = list; list = ptr; } // FIXME: this is O(n^2), use hash table // fill in base links for derived servers for(ptr = list; ptr; ptr = ptr->next) { GameList* l = NULL; if(!ptr->game->basestr) continue; for(l = list; l; l = l->next) { if(!xmlStrcmp(l->game->basic[TAG_type], ptr->game->basestr)) { if(l->game->base) fprintf(stderr,"%s: base server must not base on another one\n", ptr->game->basic[TAG_type]); ptr->game->base = l->game; xmlFree(ptr->game->basestr); break; } } } fputs("// DO NOT EDIT THIS FILE, AUTOMATICALLY GENERATED\n", f); for(ptr = list; ptr; ptr = ptr->next) { RawGame* rg = ptr->game; GameTag tag; for ( tag = TAG_start_multi; tag <= TAG_end_multi; ++tag) { struct MultiTag* m = rg->multi[tag - TAG_start_multi]; if(!m && rg->base && tag_inherit(tag)) m = rg->base->multi[tag - TAG_start_multi]; if(!m) m = template->multi[tag - TAG_start_multi]; if(!m || !m->val || !xmlStrcmp(m->val, "NULL")) continue; fprintf(f, "static char* stringlist%03u[] = {", i); for(; m; m = m->next) { fprintf(f, " \"%s\",", m->val); } fputs(" NULL };\n", f); ++i; } } fputs("struct game games[] = {\n", f); i = 0; for(ptr = list; ptr; ptr = ptr->next) { RawGame* rg = ptr->game; rg->num_multitags = i; printGame(f, rg, template); i = rg->num_multitags; } fputs("};\n", f); // TODO free return 0; } // vim: sw=4 xqf-1.0.5/src/xutils.c0000644002404400000620000000321610001247737011516 00000000000000/* XQF - Quake server browser and launcher * Copyright (C) 1998-2000 Roman Pozlevich * * 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 */ #include "gnuconfig.h" #include #include #include #include "pixmaps.h" #include "loadpixmap.h" void iconify_window (GdkWindow *window) { Window xwindow; if (!window) return; xwindow = GDK_WINDOW_XWINDOW(window); XIconifyWindow (GDK_DISPLAY (), xwindow, DefaultScreen (GDK_DISPLAY ())); } static const char* minimize_icon = "xqf_48x48.png"; void window_set_icon (GtkWidget *win) { #ifdef USE_GTK2 GdkPixbuf* pixbuf; pixbuf = load_pixmap_as_pixbuf(minimize_icon); if(pixbuf) { gtk_window_set_icon (GTK_WINDOW (win), pixbuf); gdk_pixbuf_unref (pixbuf); } #else static struct pixmap pix; if(!load_pixmap_as_pixmap(win, minimize_icon, &pix)) return; gdk_window_set_icon(win->window, NULL, pix.pix, pix.mask); gdk_window_set_icon_name(win->window, "XQF"); #endif } xqf-1.0.5/src/xutils.h0000644002404400000620000000176207761750434011543 00000000000000/* XQF - Quake server browser and launcher * Copyright (C) 1998-2000 Roman Pozlevich * * 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 */ #ifndef __XUTILS_H__ #define __XUTILS_H__ #include extern void iconify_window (GdkWindow *window); void window_set_icon (GtkWidget *window); #endif /* __XUTILS_H__ */ xqf-1.0.5/src/xqf.map0000644002404400000620000000005210357033544011315 00000000000000{ global: *_xpm; local: *; }; xqf-1.0.5/src/dns.c0000644002404400000620000004376610275434301010766 00000000000000/* XQF - Quake server browser and launcher * Copyright (C) 1998-2000 Roman Pozlevich * * 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 */ #include #include /* fprintf, fflush */ #include /* malloc, free */ #include /* kill, ... */ #include /* pipe, close, dup2, _exit, fcntl, select */ /* alarm, pause */ #include /* memset, strdup, strlen, strcmp */ #include /* waitpid */ #include /* errno */ #include /* select */ #include /* struct in_addr, inet_aton, inet_ntoa */ #include /* struct in_addr, inet_aton, inet_ntoa */ #include /* struct in_addr, inet_aton, inet_ntoa */ #include /* struct hostent, gethostbyaddr, gethostbyname */ #include /* MAXHOSTNAMELEN */ #include /* time */ #ifndef h_errno extern int h_errno; /* h_errno */ #endif #include #include "xqf.h" #include "dns.h" #include "host.h" #include "utils.h" #include "debug.h" #ifndef MAXHOSTNAMELEN # define MAXHOSTNAMELEN 64 #endif #define DNS_BUF_SIZE (MAXHOSTNAMELEN * 2 + 32) #define RESOLVE_DELIM '|' #define RESOLVE_TIMEOUT 10 #define DNS_MAX_CHILDREN 8 #ifndef WAIT_ANY # define WAIT_ANY -1 #endif struct dns_stream { int fd; char buf[DNS_BUF_SIZE]; int pos; void (*parse) (char *str, void *data); void (*close) (int error, void *data); void *data; }; struct dns_helper_descr { int pid; int tag; /* GDK tag */ int output; /* fd */ struct dns_stream *input; void (*resolved) (char *str, struct host *h, enum dns_status status, void *user_data); void *user_data; }; struct dns_child_descr { struct dns_stream *input; pid_t pid; }; struct dns_queue_link { char *str; struct dns_queue_link *next; }; static struct dns_helper_descr dns_helper = { -1, -1, -1, NULL, NULL, NULL }; static struct dns_stream *dns_master_input = NULL; static struct dns_child_descr dns_workers[DNS_MAX_CHILDREN]; static int dns_workers_num = 0; static struct dns_queue_link *q_head = NULL, *q_tail = NULL; static struct dns_queue_link *q_free = NULL; static char *worker_arg = NULL; static void dns_master_init (void); static void dns_master_reset (void); int str_is_ip_address (char *str) { struct in_addr dummy; return (str)? inet_aton (worker_arg, &dummy) : FALSE; } static int failed (char *name, char *arg) { fprintf (stderr, "%s(%s) failed: %s\n", name, (arg)? arg : "", g_strerror (errno)); return TRUE; } static void master_sigchld_handler (int signum) { int pid; int status; debug(3,"signal: ",signum); while ((pid = waitpid (WAIT_ANY, &status, WNOHANG)) > 0); } static void master_sigterm_handler (int sig) { if (sig != SIGTERM && sig != SIGINT) { debug (3, "DNS Helper: %s(%d) signal", g_strsignal (sig), sig); } dns_master_reset (); _exit (1); } static char *dns_queue_head (void) { struct dns_queue_link *link; char *str = NULL; if (q_head) { link = q_head; q_head = link->next; if (!q_head) q_tail = NULL; str = link->str; link->next = q_free; q_free = link; } return str; } static void dns_queue_add (char *str) { struct dns_queue_link *link; if (q_free) { link = q_free; q_free = link->next; } else { link = malloc (sizeof (struct dns_queue_link)); } link->str = str; link->next = NULL; if (q_tail) q_tail->next = link; else q_head = link; q_tail = link; } void dns_helper_shutdown (void) { if (dns_helper.pid > 0) { kill (dns_helper.pid, SIGTERM); dns_helper.pid = -1; } if (dns_helper.output >= 0) { close (dns_helper.output); dns_helper.output = -1; } if (dns_helper.input) { if (dns_helper.input->fd >= 0) close (dns_helper.input->fd); g_free (dns_helper.input); dns_helper.input = NULL; } if (dns_helper.tag >= 0) { gdk_input_remove (dns_helper.tag); dns_helper.tag = -1; } dns_helper.resolved = NULL; dns_helper.user_data = NULL; } static void helper_parse_callback (char *str, void *data) { char *dnsmsg; struct host *h = NULL; enum dns_status status = DNS_STATUS_ERROR; char *token[3]; int n; /* id|address|hostname */ n = tokenize_bychar (str, token, 3, RESOLVE_DELIM); if (n < 2) return; if (n > 2) { status = DNS_STATUS_OK; if (!strncmp (token[2], DNS_MSG_PREFIX, sizeof (DNS_MSG_PREFIX) - 1)) { dnsmsg = token[2] + sizeof (DNS_MSG_PREFIX) - 1; if (!strcmp (dnsmsg, DNS_MSG_TIMEOUT)) status = DNS_STATUS_TIMEOUT; else if (!strcmp (dnsmsg, DNS_MSG_NOTFOUND)) status = DNS_STATUS_NOTFOUND; else status = DNS_STATUS_ERROR; } } if ((h = host_add (token[1])) != NULL) { switch (status) { case DNS_STATUS_OK: if (n > 2) { if (h->name) g_free (h->name); h->name = g_strdup (token[2]); } h->refreshed = time (NULL); /* Success */ break; case DNS_STATUS_NOTFOUND: if (h->name) { g_free (h->name); h->name = NULL; } h->refreshed = time (NULL); /* Success */ break; default: h->refreshed = 0; /* Try later */ break; } } if (h) host_ref (h); if (dns_helper.resolved) (*dns_helper.resolved) (token[0], h, status, dns_helper.user_data); if (h) host_unref (h); } static void helper_close_callback (int error, void *data) { dns_helper_shutdown (); } static void worker_parse_callback (char *str, void *data) { int len; #ifdef DEBUG int n = (int) data; fprintf (stderr, "DNS Master> got \"%s\" from worker %d\n", str, n); #endif len = strlen (str); str[len] = '\n'; write (1, str, len + 1); /* stdout */ } static void worker_close_callback (int error, void *data) { int n = GPOINTER_TO_INT(data); dns_workers[n].pid = -1; dns_workers_num--; close (dns_workers[n].input->fd); dns_workers[n].input->fd = -1; } static void print_resolved (char *str, char *addr, char *name) { printf ("%s%c%s%c%s\n", (str)? str : "", RESOLVE_DELIM, (addr)? addr : "", RESOLVE_DELIM, (name)? name : ""); fflush (stdout); } static void worker_sigalrm_handler (int signum) { if (worker_arg) { print_resolved (worker_arg, (str_is_ip_address (worker_arg))? worker_arg : NULL, DNS_MSG_PREFIX DNS_MSG_TIMEOUT); debug (3, " timeout: %s", worker_arg); worker_arg = NULL; } _exit (0); } static void worker_sigterm_handler (int signum) { if (worker_arg) debug(3, " terminated: %s", worker_arg); _exit (0); } static void sighandler_debug(int signum) { if( signum == SIGUSR1) set_debug_level(get_debug_level()+1); else if( signum == SIGUSR2) set_debug_level(get_debug_level()-1); } static char *herrno2msg (int err) { switch (err) { case HOST_NOT_FOUND: case NO_ADDRESS: return DNS_MSG_PREFIX DNS_MSG_NOTFOUND; case NO_RECOVERY: return DNS_MSG_PREFIX DNS_MSG_ERROR; case TRY_AGAIN: return DNS_MSG_PREFIX DNS_MSG_TIMEOUT; default: return NULL; } } static void worker_resolve (char *str) { struct hostent *h = NULL; struct in_addr ip; if (!str || !*str || strchr (str, '\n') || strchr (str, RESOLVE_DELIM)) { print_resolved ("BAD REQUEST", NULL, NULL); return; } worker_arg = str; if (!inet_aton (str, &ip)) { h = gethostbyname (str); if (!h) { worker_arg = NULL; alarm (0); print_resolved (str, NULL, herrno2msg (h_errno)); return; } ip = *((struct in_addr *) h->h_addr_list[0]); } else { alarm (RESOLVE_TIMEOUT); } h = gethostbyaddr ((char *) &ip.s_addr, sizeof (ip.s_addr), AF_INET); worker_arg = NULL; alarm (0); print_resolved (str, inet_ntoa (ip), (h)? h->h_name : DNS_MSG_PREFIX DNS_MSG_NOTFOUND); } static int fork_worker (int n, char *str) { int fdset[2] = { -1, -1 }; int pid; if ((pipe (fdset) < 0 && failed ("pipe", NULL)) || ((pid = fork ()) < (pid_t) 0 && failed ("fork", NULL))) { if (fdset[0] > 0) close (fdset[0]); if (fdset[1] > 0) close (fdset[1]); return -1; } if (pid) { /* parent */ close (fdset[1]); dns_workers[n].pid = pid; if (!dns_workers[n].input) dns_workers[n].input = malloc (sizeof (struct dns_stream)); dns_workers[n].input->fd = fdset[0]; if(set_nonblock (dns_workers[n].input->fd) == -1) failed ("fcntl", NULL); dns_workers[n].input->pos = 0; dns_workers[n].input->parse = worker_parse_callback; dns_workers[n].input->close = worker_close_callback; dns_workers[n].input->data = GINT_TO_POINTER(n); dns_workers_num++; debug (7, "DNS Master> worker %d (str:%s) is forked", n, str); } else { /* child */ on_sig (SIGHUP, _exit); on_sig (SIGINT, _exit); on_sig (SIGQUIT, _exit); on_sig (SIGBUS, _exit); on_sig (SIGSEGV, _exit); on_sig (SIGPIPE, _exit); on_sig (SIGCHLD, _exit); on_sig (SIGTERM, worker_sigterm_handler); on_sig (SIGALRM, worker_sigalrm_handler); on_sig(SIGUSR1, sighandler_debug); on_sig(SIGUSR2, sighandler_debug); dup2 (fdset[1], 1); /* stdout */ close (fdset[0]); close (fdset[1]); debug (7, "DNS Worker [%s]> started", str); alarm (60 * 10); /* suicide after 10 min */ worker_resolve (str); _exit (0); } return 0; } static int dns_dispatch_to_worker (char *str) { int i; if (dns_workers_num < DNS_MAX_CHILDREN) { for (i = 0; i < DNS_MAX_CHILDREN; i++) { if (dns_workers[i].pid < 0) { debug (7, "DNS Master> \"%s\" is dispatched to worker %d", str, i); fork_worker (i, str); return TRUE; } } } return FALSE; } static int dns_move_queue (void) { int moved = FALSE; while (q_head && dns_dispatch_to_worker (q_head->str)) { free (dns_queue_head ()); moved = TRUE; } return moved; } static void dns_resolve (char *str) { dns_move_queue (); if (dns_workers_num >= DNS_MAX_CHILDREN || !dns_dispatch_to_worker (str)) { debug (7, "DNS Master> \"%s\" is put to the waiting queue", str); dns_queue_add (strdup (str)); } } static void dns_master_reset (void) { char *str; int i; for (i = 0; i < DNS_MAX_CHILDREN; i++) { if (dns_workers[i].pid > 0) { kill (dns_workers[i].pid, SIGTERM); dns_workers[i].pid = -1; } if (dns_workers[i].input) { if (dns_workers[i].input->fd >= 0) close (dns_workers[i].input->fd); free (dns_workers[i].input); dns_workers[i].input = NULL; } } dns_workers_num = 0; while ((str = dns_queue_head ()) != NULL) { free (str); } } static void master_parse_callback (char *str, void *data) { debug (7, "DNS Master> got \"%s\"", str); if (strcmp (str, DNS_CMD_RESET) == 0) { debug (7, "DNS Master> RESET"); dns_master_reset (); } else { dns_resolve (str); } } static void master_close_callback (int error, void *data) { debug (3, "DNS Master> pipe closed, errors: %s", (error)? "yes" : "no"); dns_master_reset (); _exit (0); } static void dns_master_init (void) { int i; for (i = 0; i < DNS_MAX_CHILDREN; i++) { dns_workers[i].pid = -1; dns_workers[i].input = NULL; } dns_workers_num = 0; dns_master_input = malloc (sizeof (struct dns_stream)); dns_master_input->fd = 0; /* stdin */ if(set_nonblock (dns_master_input->fd) == -1) failed ("fcntl", NULL); dns_master_input->pos = 0; dns_master_input->parse = master_parse_callback; dns_master_input->close = master_close_callback; dns_master_input->data = NULL; q_head = q_tail = q_free = NULL; on_sig (SIGHUP, master_sigterm_handler); on_sig (SIGINT, master_sigterm_handler); on_sig (SIGQUIT, master_sigterm_handler); on_sig (SIGBUS, master_sigterm_handler); on_sig (SIGSEGV, master_sigterm_handler); on_sig (SIGALRM, master_sigterm_handler); on_sig (SIGTERM, master_sigterm_handler); on_sig(SIGUSR1, sighandler_debug); on_sig(SIGUSR2, sighandler_debug); } static void dns_input_callback (struct dns_stream *stream, int fd, GdkInputCondition condition) { char *tmp; int first_used = 0; int res; res = read (fd, stream->buf + stream->pos, DNS_BUF_SIZE - stream->pos); if (res < 0) { if (errno == EAGAIN || errno == EWOULDBLOCK) return; failed ("read", NULL); (*stream->close) (TRUE, stream->data); return; } if (res == 0) { /* EOF */ (*stream->close) (FALSE, stream->data); return; } tmp = stream->buf + stream->pos; stream->pos += res; while (res && (tmp = memchr (tmp, '\n', res)) != NULL) { *tmp++ = '\0'; (*stream->parse) (stream->buf + first_used, stream->data); first_used = tmp - stream->buf; res = stream->buf + stream->pos - tmp; } if (first_used > 0) { if (first_used != stream->pos) { g_memmove (stream->buf, stream->buf + first_used, stream->pos - first_used); } stream->pos -= first_used; } } static void dns_master_mainloop (void) { fd_set readfds; int n; int i; on_sig (SIGCHLD, master_sigchld_handler); dns_master_init (); while (1) { if (dns_workers_num < DNS_MAX_CHILDREN && q_head) { dns_move_queue (); } debug (7, "DNS Master> %d workers, queue is %s", dns_workers_num, (q_head)? "not empty" : "empty"); FD_ZERO (&readfds); FD_SET (0, &readfds); for (i = 0; i < DNS_MAX_CHILDREN; i++) { if (dns_workers[i].pid > 0) FD_SET (dns_workers[i].input->fd, &readfds); } n = select (FD_SETSIZE, &readfds, NULL, NULL, NULL); if (n == -1 && errno == EINTR) continue; if (n < 0) { failed ("select", NULL); dns_master_reset (); return; } for (i = 0; i < DNS_MAX_CHILDREN; i++) { if (dns_workers[i].pid > 0 && FD_ISSET (dns_workers[i].input->fd, &readfds)) { dns_input_callback (dns_workers[i].input, dns_workers[i].input->fd, GDK_INPUT_READ); } } if (FD_ISSET (0, &readfds)) dns_input_callback (dns_master_input, 0, GDK_INPUT_READ); } /* NOT REACHED */ dns_master_reset (); } int dns_spawn_helper (void) { int fdset1[2] = { -1, -1 }; int fdset2[2] = { -1, -1 }; int pid; dns_helper_shutdown (); if ((pipe (fdset1) < 0 && failed ("pipe", NULL)) || (pipe (fdset2) < 0 && failed ("pipe", NULL)) || ((pid = fork ()) < (pid_t) 0 && failed ("fork", NULL))) { if (fdset1[0] > 0) close (fdset1[0]); if (fdset1[1] > 0) close (fdset1[1]); if (fdset2[0] > 0) close (fdset2[0]); if (fdset2[1] > 0) close (fdset2[1]); return -1; } if (pid) { /* parent */ close (fdset1[1]); close (fdset2[0]); dns_helper.output = fdset2[1]; dns_helper.input = malloc (sizeof (struct dns_stream)); dns_helper.input->fd = fdset1[0]; if(set_nonblock (dns_helper.input->fd) == -1) failed("fcntl", NULL); dns_helper.pid = pid; dns_helper.input->pos = 0; dns_helper.input->parse = helper_parse_callback; dns_helper.input->close = helper_close_callback; dns_helper.input->data = NULL; } else { /* child */ on_sig (SIGHUP, _exit); on_sig (SIGINT, _exit); on_sig (SIGQUIT, _exit); on_sig (SIGBUS, _exit); on_sig (SIGSEGV, _exit); on_sig (SIGALRM, _exit); on_sig (SIGTERM, _exit); on_sig (SIGPIPE, SIG_IGN); on_sig (SIGCHLD, SIG_IGN); dup2 (fdset1[1], 1); /* stdout */ dup2 (fdset2[0], 0); /* stdin */ close (fdset1[0]); close (fdset1[1]); close (fdset2[0]); close (fdset2[1]); dns_master_mainloop (); _exit (0); } return 0; } void dns_gtk_init (void) { if (dns_helper.input && dns_helper.input->fd > 0) { dns_helper.tag = gdk_input_add (dns_helper.input->fd, GDK_INPUT_READ | GDK_INPUT_EXCEPTION, (GdkInputFunction) dns_input_callback, dns_helper.input); } } void dns_cancel_requests (void) { const char cmd[] = DNS_CMD_RESET "\n"; dns_set_callback (NULL, NULL); if (dns_helper.output >= 0) { write (dns_helper.output, cmd, sizeof (cmd) - 1); } } void dns_lookup (const char *str) { char host[MAXHOSTNAMELEN + 1]; int len; debug(8,"%s",str); len = strlen (str); if (len <= MAXHOSTNAMELEN) { strcpy (host, str); host[len] = '\n'; host[len + 1] = '\0'; write (dns_helper.output, host, len + 1); } } void dns_set_callback ( void (*cb) (char *item, struct host *h, enum dns_status, void *data), void *data) { dns_helper.resolved = cb; dns_helper.user_data = data; } char *dns_lookup_by_addr (char *ip) { struct hostent *h; struct in_addr addr; if (inet_aton (ip, &addr)) { h = gethostbyaddr ((char *) &addr.s_addr, sizeof (addr.s_addr), AF_INET); if (h) return g_strdup (h->h_name); } return NULL; } char *dns_lookup_by_name (char *name) { struct hostent *h; char *ip; h = gethostbyname (name); if (h) { ip = inet_ntoa ( *((struct in_addr *) h->h_addr_list[0]) ); if (ip) return g_strdup (ip); } return NULL; } #ifdef DNS_STANDALONE int main (int argc, char *argv[]) { dns_master_mainloop (); return 0; } #endif xqf-1.0.5/src/dns.h0000644002404400000620000000326507201342720010757 00000000000000/* XQF - Quake server browser and launcher * Copyright (C) 1998-2000 Roman Pozlevich * * 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 */ #ifndef __DNS_H__ #define __DNS_H__ #define DNS_MSG_PREFIX "DNS:" #define DNS_MSG_NOTFOUND "NOTFOUND" #define DNS_MSG_TIMEOUT "TIMEOUT" #define DNS_MSG_ERROR "ERROR" #define DNS_CMD_RESET "/RESET" enum dns_status { DNS_STATUS_OK = 0, DNS_STATUS_TIMEOUT, DNS_STATUS_NOTFOUND, DNS_STATUS_ERROR }; extern int str_is_ip_address (char *str); extern int dns_spawn_helper (void); extern void dns_gtk_init (void); extern void dns_helper_shutdown (void); extern void dns_cancel_requests (void); extern void dns_lookup (const char *str); extern void dns_set_callback (void (*cb) (char *item, struct host *h, enum dns_status status, void *data), void *data); extern char *dns_lookup_by_addr (char *ip); extern char *dns_lookup_by_name (char *name); #endif /* __DNS_H__ */ xqf-1.0.5/src/xqf.c0000644002404400000620000033403710445245312010773 00000000000000/* XQF - Quake server browser and launcher * Copyright (C) 1998-2000 Roman Pozlevich * * 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 */ #include "gnuconfig.h" #include #include #include /* atoi */ #include /* inet_ntoa */ #include /* inet_ntoa */ #include /* inet_ntoa */ #include /* time */ #include /* strlen */ #include /* isspace */ #include // select, fork, pipe ... #include #include #include #include #include /* kill, ... */ #include #ifdef ENABLE_NLS # include #endif #include #include #include #include #include "i18n.h" #include "xqf.h" #include "xqf-ui.h" #include "game.h" #include "stat.h" #include "source.h" #include "pref.h" #include "filter.h" #include "flt-player.h" #include "skin.h" #include "dialogs.h" #include "utils.h" #include "server.h" #include "launch.h" #include "host.h" #include "xutils.h" #include "srv-list.h" #include "srv-info.h" #include "srv-prop.h" #include "rc.h" #include "pixmaps.h" #include "rcon.h" #include "statistics.h" #include "psearch.h" #include "addserver.h" #include "addmaster.h" #include "sort.h" #include "menus.h" #include "config.h" #include "debug.h" #include "redial.h" #include "splash.h" #include "loadpixmap.h" #include "trayicon.h" #include "scripts.h" #include "tga/memtopixmap.h" #ifdef USE_GEOIP #include "country-filter.h" #endif static const char gslisthome[] = "http://aluigi.altervista.org/papers.htm#gslist"; static const char required_qstat_version[]="2.10"; time_t xqf_start_time; int dontlaunch = 0; int event_type = 0; char* xqf_PACKAGE_DATA_DIR = PACKAGE_DATA_DIR; char* xqf_LOCALEDIR = LOCALEDIR; char* qstat_configfile = NULL; GtkWidget *main_window = NULL; GtkWidget *source_ctree = NULL; GtkCList *server_clist = NULL; GtkCList *player_clist = NULL; GtkCTree *srvinf_ctree = NULL; GtkEditable *selection_manager = NULL; GSList *cur_source = NULL; /* GSList */ GSList *cur_server_list = NULL; /* GSList */ GSList *cur_userver_list = NULL; /* GSList */ struct server *cur_server = NULL; struct stat_job *stat_process = NULL; static GtkWidget *main_toolbar = NULL; static GtkWidget *main_status_bar = NULL; static GtkWidget *main_filter_status_bar = NULL; static GtkWidget *main_progress_bar = NULL; static char *progress_bar_str = NULL; //static GtkWidget *server_filter_menu = NULL; /* baa */ static GtkWidget *server_menu = NULL; static GtkWidget *source_menu = NULL; static GtkWidget *player_menu = NULL; static GtkWidget *server_info_menu = NULL; static GtkWidget *connect_menu_item = NULL; static GtkWidget *observe_menu_item = NULL; static GtkWidget *record_menu_item = NULL; static GtkWidget *favadd_menu_item = NULL; static GtkWidget *add_menu_item = NULL; static GtkWidget *delete_menu_item = NULL; static GtkWidget *refresh_menu_item = NULL; static GtkWidget *refrsel_menu_item = NULL; static GtkWidget *resolve_menu_item = NULL; static GtkWidget *properties_menu_item = NULL; static GtkWidget *rcon_menu_item = NULL; //static GtkWidget *cancel_redial_menu_item = NULL; static GtkWidget *file_quit_menu_item = NULL; static GtkWidget *file_statistics_menu_item = NULL; static GtkWidget *edit_add_menu_item = NULL; static GtkWidget *edit_favadd_menu_item = NULL; static GtkWidget *edit_delete_menu_item = NULL; static GtkWidget *edit_update_master_builtin_menu_item = NULL; static GtkWidget *edit_update_master_gslist_menu_item = NULL; static GtkWidget *edit_add_master_menu_item = NULL; static GtkWidget *edit_edit_master_menu_item = NULL; static GtkWidget *edit_delete_master_menu_item = NULL; static GtkWidget *edit_clear_master_servers_menu_item = NULL; static GtkWidget *edit_find_player_menu_item = NULL; static GtkWidget *edit_find_again_menu_item = NULL; // rmb popup static GtkWidget *source_add_master_menu_item = NULL; static GtkWidget *source_edit_master_menu_item = NULL; static GtkWidget *source_delete_master_menu_item = NULL; static GtkWidget *source_clear_master_servers_menu_item = NULL; static GtkWidget *view_refresh_menu_item = NULL; static GtkWidget *view_refrsel_menu_item = NULL; static GtkWidget *view_update_menu_item = NULL; GtkWidget *view_hostnames_menu_item = NULL; GtkWidget *view_defport_menu_item = NULL; static GtkWidget *server_connect_menu_item = NULL; static GtkWidget *server_observe_menu_item = NULL; static GtkWidget *server_record_menu_item = NULL; static GtkWidget *server_favadd_menu_item = NULL; static GtkWidget *server_delete_menu_item = NULL; static GtkWidget *server_resolve_menu_item = NULL; static GtkWidget *server_properties_menu_item = NULL; static GtkWidget *server_rcon_menu_item = NULL; //static GtkWidget *server_cancel_redial_menu_item = NULL; static GtkWidget *server_serverfilter_menu_item = NULL; static GArray* server_filter_menu_items; static GtkWidget *player_filter_menu_item = NULL; static GtkWidget *update_button = NULL; static GtkWidget *refresh_button = NULL; static GtkWidget *refrsel_button = NULL; static GtkWidget *stop_button = NULL; static GtkWidget *connect_button = NULL; //static GtkWidget *observe_button = NULL; //static GtkWidget *record_button = NULL; static GtkWidget *filter_buttons[FILTERS_TOTAL] = {0}; /*filter widgtet for toolbar*/ //static GtkWidget *filter_option_menu_toolbar; static GtkWidget *player_skin_popup = NULL; static GtkWidget *player_skin_popup_preview = NULL; /* static GtkWidget *server_filter_1_widget = NULL; static GtkWidget *server_filter_2_widget = NULL; static GtkWidget *server_filter_3_widget = NULL; */ //XXX GtkWidget *server_filter_widget[MAX_SERVER_FILTERS + 3]; static gboolean check_launch (struct condef* con); static void refresh_selected_callback (GtkWidget *widget, gpointer data); static void launch_close_handler_part2(struct condef *con); static void copy_text_to_clipboard(const char* text); /** build server filter menu for menubar */ static GtkWidget* create_filter_menu(); //static GtkWidget* create_filter_menu_toolbar(); //static GtkWidget* filter_menu = NULL; // need to store that for toggling the checkboxes static GSList* filter_menu_radio_buttons = NULL; // for finding the widgets to activate static int redialserver = 0; static void sighandler_debug(int signum) { if( signum == SIGUSR1) set_debug_level(get_debug_level()+1); else if( signum == SIGUSR2) set_debug_level(get_debug_level()-1); debug(0,"debug level now at %d", get_debug_level()); } // returns 0 if equal, -1 if too old, 1 if have > expected int compare_qstat_version ( const char* have, const char* expected ) { int have_major, expected_major; int have_minor, expected_minor; char have_pl=0, expected_pl=0; const char* have_pos1=NULL, *expected_pos1=NULL; const char* have_pos2=NULL, *expected_pos2=NULL; char* buf; debug(3,"compare_qstat_version(%s,%s)",have,expected); if(!strcmp(have,expected)) return 0; have_pos1 = strchr(have,'.'); expected_pos1 = strchr(expected,'.'); if(!have_pos1 || !expected_pos1) return -1; buf = g_strndup(have,have_pos1-have); have_major = atoi(buf); g_free(buf); buf = g_strndup(expected,expected_pos1-expected); expected_major = atoi(buf); g_free(buf); debug(3,"compare_qstat_version -- compare major %d %d",have_major,expected_major); if(have_major < expected_major) return -1; if(have_major > expected_major) return 1; have_pos1++; expected_pos1++; for(have_pos2=have_pos1; have_pos2 && *have_pos2 && isdigit(*have_pos2); have_pos2++); for(expected_pos2=expected_pos1; expected_pos2 && *expected_pos2 && isdigit(*expected_pos2); expected_pos2++); buf = g_strndup(have_pos1,have_pos2-have_pos1); have_minor = atoi(buf); g_free(buf); buf = g_strndup(expected_pos1,expected_pos2-expected_pos1); expected_minor = atoi(buf); g_free(buf); debug(3,"compare_qstat_version -- compare minor %d %d",have_minor,expected_minor); if(have_minor < expected_minor) return -1; if(have_minor > expected_minor) return 1; if(have_pos2 && *have_pos2) have_pl=*have_pos2; if(expected_pos2 && *expected_pos2) expected_pl=*expected_pos2; debug(3,"compare_qstat_version -- compare pl %c %c",have_pl,expected_pl); if(!have_pl && expected_pl) return -1; if(have_pl && expected_pl && have_pl < expected_pl) return -1; return 1; } void qstat_version_string(struct external_program_connection* conn) { static const char search_for[] = "qstat version"; const char *ptr, *version_end; char* found_version = NULL; if(!conn) return; // we already found a valid version string if(conn->result) return; if(!conn->current_line) return; if(!strncmp(conn->current_line,search_for,strlen(search_for))) { ptr = conn->current_line + strlen(search_for); // skip whitespace for(;isspace(*ptr);++ptr); if(!*ptr) { conn->result = FALSE; return; } // skip until end of version string for(version_end=ptr; version_end && *version_end != '\0' && !isspace(*version_end); ++version_end); found_version=g_strndup(ptr,version_end-ptr); // debug(0,"found version <%s>",found_version); if(compare_qstat_version(found_version,required_qstat_version)>=0) conn->result=TRUE; g_free(found_version); } } int check_qstat_version() { char* cmd[] = {QSTAT_EXEC,NULL}; return external_program_foreach_line(cmd, qstat_version_string, NULL); } void reset_main_status_bar() { // Reset bottom left status bar to show number of servers print_status (main_status_bar, ngettext(_("%d server"),_("%d servers"), server_clist->rows), server_clist->rows); } void set_widgets_sensitivity (void) { GList *selected = server_clist->selection; int sens; int i; int source_is_favorites; int masters_to_update; int masters_to_delete; /* * Every button with callback that can modify its sensitivity * should be explicitly put to GTK_STATE_NORMAL state before * changing its insensitivity */ source_is_favorites = (cur_source != NULL && cur_source->next == NULL && (struct master *) cur_source->data == favorites); if (source_is_favorites) { masters_to_update = masters_to_delete = FALSE; } else { masters_to_update = source_has_masters_to_update (cur_source); masters_to_delete = source_has_masters_to_delete (cur_source); } sens = (!stat_process && cur_server); gtk_widget_set_sensitive (properties_menu_item, sens); gtk_widget_set_sensitive (server_properties_menu_item, sens); sens = (!stat_process && cur_server && (games[cur_server->type].flags & GAME_CONNECT) != 0); gtk_widget_set_sensitive (connect_menu_item, sens); gtk_widget_set_sensitive (server_connect_menu_item, sens); gtk_widget_set_state (connect_button, GTK_STATE_NORMAL); gtk_widget_set_sensitive (connect_button, sens); sens = (!stat_process && cur_server && (games[cur_server->type].flags & GAME_SPECTATE) != 0 && (cur_server->flags & SERVER_SPECTATE) != 0); gtk_widget_set_sensitive (observe_menu_item, sens); gtk_widget_set_sensitive (server_observe_menu_item, sens); // gtk_widget_set_state (observe_button, GTK_STATE_NORMAL); // gtk_widget_set_sensitive (observe_button, sens); sens = (!stat_process && cur_server && (games[cur_server->type].flags & GAME_RECORD) != 0); gtk_widget_set_sensitive (record_menu_item, sens); gtk_widget_set_sensitive (server_record_menu_item, sens); // gtk_widget_set_state (record_button, GTK_STATE_NORMAL); // gtk_widget_set_sensitive (record_button, sens); sens = (!stat_process && cur_server && (games[cur_server->type].flags & GAME_RCON) != 0); gtk_widget_set_sensitive (rcon_menu_item, sens); gtk_widget_set_sensitive (server_rcon_menu_item, sens); sens = (!stat_process && selected); gtk_widget_set_sensitive (refrsel_menu_item, sens); gtk_widget_set_sensitive (view_refrsel_menu_item, sens); gtk_widget_set_state (refrsel_button, GTK_STATE_NORMAL); gtk_widget_set_sensitive (refrsel_button, sens); gtk_widget_set_sensitive (resolve_menu_item, sens); gtk_widget_set_sensitive (server_resolve_menu_item, sens); sens = (!stat_process); gtk_widget_set_sensitive (file_statistics_menu_item, sens); gtk_widget_set_sensitive (add_menu_item, sens); gtk_widget_set_sensitive (edit_add_menu_item, sens); gtk_widget_set_sensitive (edit_update_master_builtin_menu_item, sens); gtk_widget_set_sensitive (edit_update_master_gslist_menu_item, sens); gtk_widget_set_sensitive (edit_add_master_menu_item, sens); gtk_widget_set_sensitive (edit_find_player_menu_item, sens); gtk_widget_set_sensitive (edit_find_again_menu_item, sens); gtk_widget_set_sensitive (player_filter_menu_item, sens); gtk_widget_set_sensitive (source_ctree, sens); sens = (!stat_process && selected && !source_is_favorites); gtk_widget_set_sensitive (favadd_menu_item, sens); gtk_widget_set_sensitive (edit_favadd_menu_item, sens); gtk_widget_set_sensitive (server_favadd_menu_item, sens); #if 0 sens = (!stat_process && selected && source_is_favorites); gtk_widget_set_sensitive (delete_menu_item, sens); gtk_widget_set_sensitive (edit_delete_menu_item, sens); gtk_widget_set_sensitive (server_delete_menu_item, sens); #endif sens = (!stat_process && masters_to_delete); gtk_widget_set_sensitive (edit_delete_master_menu_item, sens); gtk_widget_set_sensitive (edit_clear_master_servers_menu_item, sens); gtk_widget_set_sensitive (source_delete_master_menu_item, sens); gtk_widget_set_sensitive (source_clear_master_servers_menu_item, sens); // you can only edit one server a time, no groups and no favorites sens = (cur_source && cur_source->next == NULL && ! ((struct master *) cur_source->data)->isgroup && ! source_is_favorites ); gtk_widget_set_sensitive (source_edit_master_menu_item, sens); gtk_widget_set_sensitive (edit_edit_master_menu_item, sens); sens = (!stat_process && (server_clist->rows > 0)); gtk_widget_set_sensitive (refresh_menu_item, sens); gtk_widget_set_sensitive (view_refresh_menu_item, sens); gtk_widget_set_state (refresh_button, GTK_STATE_NORMAL); gtk_widget_set_sensitive (refresh_button, sens); gtk_widget_set_sensitive (view_hostnames_menu_item, sens); gtk_widget_set_sensitive (view_defport_menu_item, sens); sens = (!stat_process && masters_to_update); gtk_widget_set_sensitive (view_update_menu_item, sens); gtk_widget_set_state (update_button, GTK_STATE_NORMAL); gtk_widget_set_sensitive (update_button, sens); sens = (stat_process != NULL); gtk_widget_set_state (stop_button, GTK_STATE_NORMAL); gtk_widget_set_sensitive (stop_button, sens); sens = (stat_process == NULL); for (i = 0; i < FILTERS_TOTAL; i++) { if(!filter_buttons[i]) continue; gtk_widget_set_state(filter_buttons[ i ],GTK_STATE_NORMAL); gtk_widget_set_sensitive (filter_buttons[i], sens); if(GTK_IS_TOGGLE_BUTTON(filter_buttons[i]) && GTK_TOGGLE_BUTTON(filter_buttons[i])->active) gtk_widget_set_state(filter_buttons[ i ],GTK_STATE_ACTIVE); } #if 0 // grey out button if not redialing sens = (redialserver == 1); gtk_widget_set_sensitive (cancel_redial_menu_item, sens); gtk_widget_set_sensitive (server_cancel_redial_menu_item, sens); #endif } static int forced_filters_flag = FALSE; static void set_filters (unsigned char mask) { unsigned n; int i; forced_filters_flag = TRUE; cur_filter = mask; for (i = 0, n = 1; i < FILTERS_TOTAL; i++, n <<= 1) { gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (filter_buttons[i]), ((cur_filter & n) != 0)? TRUE : FALSE); } forced_filters_flag = FALSE; } static void filter_toggle_callback (GtkWidget *widget, unsigned char mask) { if (!forced_filters_flag) { cur_filter ^= mask; server_clist_build_filtered (cur_server_list, FALSE); /* in srv-list.c */ reset_main_status_bar(); } } // iterate through radio buttons and activate the one for the current server // filter static void filter_menu_activate_current() { unsigned int count = 0; GSList* rbgroup = filter_menu_radio_buttons; GtkWidget* widget = NULL; while(rbgroup) { if(GTK_IS_CHECK_MENU_ITEM(rbgroup->data)) { if(count == current_server_filter) { widget = GTK_WIDGET(rbgroup->data); break; } count++; } rbgroup=rbgroup->next; } if(widget) { gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(widget), TRUE); } } /*refresh filtermenu on toolbar*/ void set_filter_option_menu_toolbar (void) { /* gtk_option_menu_set_menu (GTK_OPTION_MENU (filter_option_menu_toolbar), create_filter_menu_toolbar()); gtk_option_menu_set_history(GTK_OPTION_MENU(filter_option_menu_toolbar), current_server_filter); */ } void set_server_filter_menu_list_text( void ){ /* baa -- Set the names of the filters if they have been set in the config file. The server_filters is defined in filter.h */ char status_buf[64]; char* name; #if 0 for (i = 0; i < MAX_SERVER_FILTERS; i++) { if( i == 0 ){ if( current_server_filter == i ) //server filter snprintf( buf, 64, _("None <--")); else snprintf( buf, 64, _("None")); } else { if( server_filters[i].filter_name && strlen( server_filters[i].filter_name ) ){ if( current_server_filter == i ) snprintf( buf, 64, "%s <--", server_filters[i].filter_name ); else snprintf( buf, 64, "%s", server_filters[i].filter_name ); } else { if( current_server_filter == i ) snprintf( buf, 64, _("Filter %d <--"), i ); else snprintf( buf, 64, _("Filter %d"), i ); } } if( server_filter_widget[i + filter_start_index ] && GTK_BIN (server_filter_widget[i + filter_start_index])->child ) { GtkWidget *child = GTK_BIN (server_filter_widget[i + filter_start_index ])->child; if (GTK_IS_LABEL (child)) gtk_label_set (GTK_LABEL (child), buf ); } } #endif /* Show the active filter on the status bar -- Add code to indicate if the filter button is checked. */ if( current_server_filter == 0 ) { snprintf( status_buf, 64, _("No Server Filter Active")); } else { name = g_array_index (server_filters, struct server_filter_vars*, current_server_filter-1)->filter_name; if(name) { snprintf( status_buf, 64, _("Server Filter: %s"), name); } else { snprintf( status_buf, 64, _("Server Filter: %d"), current_server_filter ); xqf_error("this is a bug"); } } print_status (main_filter_status_bar, status_buf); reset_main_status_bar(); } static void server_filter_select_callback (GtkWidget *widget, int number) { if(!GTK_IS_CHECK_MENU_ITEM(widget)) { g_warning("no check menu item"); return; } if(GTK_CHECK_MENU_ITEM(widget)->active == 0) { // signal was triggered for deactivation return; } current_server_filter = number; filters[FILTER_SERVER].changed = FILTER_CHANGED; filters[FILTER_SERVER].last_changed = filter_time_inc(); server_clist_build_filtered (cur_server_list, FALSE); /* in srv-list.c */ set_server_filter_menu_list_text (); /* refresh optionmenu on toolbar*/ set_filter_option_menu_toolbar(); config_push_prefix ( "/" CONFIG_FILE "/Server Filter" ); config_set_int ("current_server_filter", current_server_filter); config_pop_prefix (); return; } /*need new one to refresh filter radio buttons in menu*/ #if 0 static void server_filter_select_callback_toolbar (GtkWidget *widget, int number) { current_server_filter = number; /*apply changes to radio buttons in menu*/ filter_menu_activate_current(); return; } #endif static void start_preferences_dialog (GtkWidget *widget, int page_num) { preferences_dialog (page_num); set_toolbar_appearance (GTK_TOOLBAR (main_toolbar), default_toolbar_style, default_toolbar_tips); } static void start_filters_cfg_dialog (GtkWidget *widget, int page_num) { if (filters_cfg_dialog (page_num)) { config_sync (); rc_save (); gtk_menu_item_set_submenu (GTK_MENU_ITEM (server_serverfilter_menu_item), create_filter_menu()); filter_menu_activate_current(); /* refresh optionmenu on toolbar*/ set_filter_option_menu_toolbar(); /* refresh filter status*/ set_server_filter_menu_list_text (); //happes automagically server_clist_build_filtered (cur_server_list, TRUE); player_clist_redraw (); } } static void update_server_lists_from_selected_source (void) { GSList *cur_masters = NULL; debug (6, "update_server_lists_from_selected_source() --"); if (cur_server_list) { debug (6, "update_server_lists_from_selected_source() -- Free cur_server_list %lx", cur_server_list); server_list_free (cur_server_list); cur_server_list = NULL; } if (cur_userver_list) { userver_list_free (cur_userver_list); cur_userver_list = NULL; } master_selection_to_lists (cur_source, &cur_masters, &cur_server_list, &cur_userver_list); collate_server_lists (cur_masters, &cur_server_list, &cur_userver_list); } /** update ui with aquired data during refresh and when refresh is done */ static int stat_lists_refresh (struct stat_job *job) { int items; int freeze; items = g_slist_length (job->delayed.queued_servers) + g_slist_length (job->delayed.queued_hosts); debug (6, "stat_lists_refresh() -- Job %lx, items %d", job,items); if(items>100) { update_server_lists_from_selected_source (); server_clist_build_filtered (cur_server_list, TRUE); job->delayed.queued_servers = NULL; job->delayed.queued_hosts = NULL; } else if (items) { freeze = (items > 1) || default_refresh_sorts; if (freeze) gtk_clist_freeze (server_clist); g_slist_foreach (job->delayed.queued_servers, (GFunc) server_clist_refresh_server, NULL); server_list_free (job->delayed.queued_servers); job->delayed.queued_servers = NULL; g_slist_foreach (job->delayed.queued_hosts, (GFunc) server_clist_show_hostname, NULL); host_list_free (job->delayed.queued_hosts); job->delayed.queued_hosts = NULL; if (default_refresh_sorts) gtk_clist_sort (server_clist); if (freeze) gtk_clist_thaw (server_clist); } print_status (main_status_bar, (progress_bar_str)? progress_bar_str : "", job->progress.done, job->progress.tasks); if (job->progress.tasks > 0) { progress_bar_set_percentage (main_progress_bar, ((float)job->progress.done) / job->progress.tasks); } return TRUE; } static void stat_lists_state_handler (struct stat_job *job, enum stat_state state) { if (!main_window) return; switch (state) { case STAT_UPDATE_SOURCE: progress_bar_str = _("Updating lists..."); if (default_show_tray_icon) tray_icon_start_animation (); break; case STAT_RESOLVE_NAMES: progress_bar_str = _("Resolving host names: %d/%d"); break; case STAT_REFRESH_SERVERS: progress_bar_str = _("Refreshing: %d/%d"); if (default_show_tray_icon) tray_icon_start_animation (); break; case STAT_RESOLVE_HOSTS: progress_bar_str = _("Resolving host addresses: %d/%d"); break; default: progress_bar_str = NULL; break; } progress_bar_start (main_progress_bar, state == STAT_UPDATE_SOURCE || job->progress.tasks <= 1); stat_lists_refresh (job); /* flush */ } static void stat_lists_close_handler (struct stat_job *job, int killed) { if (!main_window) return; if (job->need_redraw) { update_server_lists_from_selected_source (); server_clist_build_filtered (cur_server_list, TRUE); } /* if(redialserver == 1) print_status (main_status_bar, _("Waiting to redial server(s)...")); else */ tray_icon_stop_animation (); reset_main_status_bar(); progress_bar_reset (main_progress_bar); stat_process = NULL; set_widgets_sensitivity (); } static void stat_lists_server_handler (struct stat_job *job, struct server *s) { if (s == cur_server) { if (job->delayed.refresh_handler) (*job->delayed.refresh_handler) (job); player_clist_set_server (s); srvinf_ctree_set_server (s); } } static void stat_lists_master_handler (struct stat_job *job, struct master *m) { source_ctree_show_node_status (source_ctree, m); } static void stat_lists (GSList *masters, GSList *names, GSList *servers, GSList *hosts) { if (stat_process || (!masters && !names && !servers && !hosts)) return; debug_increase_indent(); debug (7, "stat_lists() -- Server List %p", servers); stat_process = stat_job_create (masters, names, servers, hosts); stat_process->delayed.refresh_handler = (GtkFunction) stat_lists_refresh; stat_process->state_handlers = g_slist_prepend ( stat_process->state_handlers, stat_lists_state_handler); stat_process->close_handlers = g_slist_prepend ( stat_process->close_handlers, stat_lists_close_handler); stat_process->server_handlers = g_slist_append ( stat_process->server_handlers, stat_lists_server_handler); stat_process->master_handlers = g_slist_append ( stat_process->master_handlers, stat_lists_master_handler); stat_start (stat_process); set_widgets_sensitivity (); debug_decrease_indent(); } static void stat_one_server (struct server *server) { GSList *list; debug (6, "Server %lx", server); if (!stat_process && server) { list = server_list_prepend (NULL, server); stat_lists (NULL, NULL, list, NULL); } } static void launch_close_handler (struct stat_job *job, int killed) { struct condef* con; con = (struct condef *) job->data; job->data = NULL; if (killed) { condef_free (con); return; } gtk_timeout_add(0,(GtkFunction)check_launch, (gpointer)con); } /** called from inside timer, always return FALSE to stop it */ static gboolean check_launch (struct condef* con) { struct server_props *props; gboolean launch = FALSE; struct server *s; if (!con) return FALSE; s = con->s; props = properties (s); if (props && props->sucks) { launch = dialog_yesno (NULL, 1, _("Yes"), _("No"), _("You said this servers sucks.\nDo you want to risk a game this time?")); if (!launch) { condef_free (con); return FALSE; } } if(s->flags & SERVER_INCOMPATIBLE) { launch = dialog_yesno (NULL, 1, _("Yes"), _("No"), _("This server is not compatible with the version of %s you have" " installed.\nLaunch client anyway?"), games[s->type].name); if (!launch) { condef_free (con); return FALSE; } } if (s->ping >= MAX_PING) { launch = dialog_yesno (NULL, 1, _("Launch"), _("Cancel"), _("Server %s:%d is %s.\n\nLaunch client anyway?"), (s->host->name)? s->host->name : inet_ntoa (s->host->ip), s->port, (s->ping == MAX_PING)? "unreachable" : "down"); if (!launch) { condef_free (con); return FALSE; } } if (!launch && !con->spectate && server_need_redial(s, props)) { launch = dialog_yesnoredial (NULL, 1, _("Launch"), _("Cancel"), _("Redial"), _("Server %s:%d is full.\n\nLaunch client anyway?"), (s->host->name)? s->host->name : inet_ntoa (s->host->ip), s->port); if (!launch) { condef_free (con); return FALSE; } else if (launch==2) { redialserver = 1; launch = redial_dialog(con->s, props); if(launch == FALSE) { condef_free (con); return FALSE; } } else redialserver = 0; } launch_close_handler_part2(con); return FALSE; } // stop XMMS if running static void stopxmms() { char* xmmssocket = NULL; pid_t pid; if (!default_stopxmms) return; xmmssocket = g_strdup_printf("/tmp/xmms_%s.0",g_get_user_name()); if(access(xmmssocket,R_OK)) { debug(3,"xmms not running"); g_free(xmmssocket); return; } pid = fork(); if ( pid == 0) { char *argv[3]; argv[0] = "xmms"; argv[1] = "-s"; argv[2] = NULL; execvp(argv[0],argv); _exit(EXIT_FAILURE); } else if(pid > 0) { int status; waitpid(pid,&status,0); if(WIFEXITED(status)) { debug(3,"xmms exited normally"); } else { debug(3,"xmms exited with status %d",WEXITSTATUS(status)); } if(WIFSIGNALED(status)) debug(3,"xmms was killed by signal %d",WTERMSIG(status)); } g_free(xmmssocket); } static void launch_close_handler_part2(struct condef *con) { struct server_props *props; int launch = FALSE; int save = 0; FILE *f; char *fn; char *temp_name; char *temp_mod; char *temp_game; struct server *s; stopxmms(); if (redialserver == 1) // was called from a redial play_sound(sound_redial_success, 0); else play_sound(sound_server_connect, 0); redialserver = 0; // Cancel any redialing s = con->s; props = properties (s); debug(3,"rest of launch_close_handler"); // alex if (con->spectate) { if ((s->flags & SERVER_SP_PASSWORD) == 0) { // XXX what's this good for? looks useless to me -- ln con->spectator_password = g_strdup ("1"); } else { if (props && props->spectator_password) { con->spectator_password = g_strdup (props->spectator_password); } else { con->spectator_password = enter_string_with_option_dialog (FALSE, _("Save Password"), &save, _("Spectator Password:")); if (!con->spectator_password) { condef_free (con); return; } if (save) { if (!props) props = properties_new (s->host, s->port); props->spectator_password = g_strdup (con->spectator_password); props_save (); } } } } else { if (props && props->server_password) { con->password = g_strdup (props->server_password); } else if ((s->flags & SERVER_PASSWORD) != 0) { con->password = enter_string_with_option_dialog (FALSE, _("Save Password"), &save, _("Server Password:")); if (!con->password) { condef_free (con); return; } if (save) { if (!props) props = properties_new (s->host, s->port); props->server_password = g_strdup (con->password); props_save (); } } } // con->server = g_strdup_printf ("%s:%5d", inet_ntoa (s->host->ip), s->port); con->server = g_strdup_printf ("%s:%d", inet_ntoa (s->host->ip), s->port); con->gamedir = g_strdup (s->game); if (props && props->rcon_password) con->rcon_password = g_strdup (props->rcon_password); if (props && props->custom_cfg) con->custom_cfg = g_strdup (props->custom_cfg); launch = client_launch (con, TRUE); condef_free (con); if (!launch) return; // Save address etc to LaunchInfo.txt if (default_launchinfo) { fn = file_in_dir (user_rcdir, LAUNCHINFO_FILE); f = fopen (fn, "w"); if (f) { temp_name = s->name; temp_game = s->game; temp_mod = s->gametype; if (!temp_name) temp_name = ""; fprintf (f, "GameType %s\n", games[s->type].name); fprintf (f, "ServerName %s\n", temp_name); fprintf (f, "ServerAddr %s:%d\n", inet_ntoa (s->host->ip), s->port); fprintf (f, "ServerMod "); if(temp_game) { fprintf (f, "%s", temp_game); } if(temp_game&&temp_mod) { fprintf (f, ", "); } if(temp_mod) { fprintf (f, "%s", temp_mod); } fprintf (f, "\n"); fclose (f); } g_free (fn); } // Launch pre-launch script if (default_prelaunchexec) { if (fork() == 0) { char *launchargv[4]; launchargv[0] = g_strdup_printf("%s/PreLaunch",user_rcdir); launchargv[1] = games[s->type].qstat_str; launchargv[2] = g_strdup_printf("%s:%d", inet_ntoa (s->host->ip), s->port); launchargv[3] = NULL; execv(launchargv[0],launchargv); xqf_error("PreLaunch failed"); _exit(EXIT_FAILURE); } } if (main_window && default_iconify && !default_terminate) iconify_window (main_window->window); if (main_window && default_terminate) gtk_widget_destroy (main_window); } static void launch_server_handler (struct stat_job *job, struct server *s) { server_clist_refresh_server (s); if (s == cur_server) { player_clist_set_server (s); srvinf_ctree_set_server (s); } // no connection defined, maybe because of a hostname instead of ip specified // on command line. just take first server to launch if(!job->data) { job->data = condef_new (s); } /* Don't spend time on host name lookups */ if (job->hosts) { host_list_free (job->hosts); job->hosts = NULL; } } static void launch_callback (GtkWidget *widget, enum launch_mode mode) { int spectate = FALSE; char *demo = NULL; struct condef *con = NULL; debug (6, "launc_callback() --"); if (stat_process || !cur_server || (games[cur_server->type].flags & GAME_CONNECT) == 0) { return; } if (games[cur_server->type].config_is_valid && !(*games[cur_server->type].config_is_valid) (cur_server)) { start_preferences_dialog (NULL, PREF_PAGE_GAMES + cur_server->type * 256); return; } switch (mode) { case LAUNCH_NORMAL: break; case LAUNCH_SPECTATE: if ((cur_server->flags & SERVER_SPECTATE) == 0) return; spectate = TRUE; break; case LAUNCH_RECORD: if ((games[cur_server->type].flags & GAME_RECORD) == 0) return; if ((games[cur_server->type].flags & GAME_SPECTATE) != 0) { demo = enter_string_with_option_dialog (TRUE, _("Spectator"), &spectate, _("Demo name:")); } else { demo = enter_string_dialog (TRUE, _("Demo name:")); } if (!demo) return; break; } con = condef_new (cur_server); con->demo = demo; con->spectate = spectate; stat_process = stat_job_create (NULL, NULL, server_list_prepend (NULL, cur_server), NULL); stat_process->data = con; stat_process->state_handlers = g_slist_prepend ( stat_process->state_handlers, stat_lists_state_handler); stat_process->close_handlers = g_slist_prepend ( stat_process->close_handlers, stat_lists_close_handler); stat_process->server_handlers = g_slist_append ( stat_process->server_handlers, launch_server_handler); /* run last!!! */ stat_process->close_handlers = g_slist_append ( stat_process->close_handlers, launch_close_handler); stat_start (stat_process); set_widgets_sensitivity (); } static int server_clist_sort_mode = SORT_SERVER_PING; void server_clist_set_sort_mode(enum ssort_mode mode) { server_clist_sort_mode = mode; } static int server_clist_compare_func (GtkCList *clist, gconstpointer ptr1, gconstpointer ptr2) { int res, mode; GtkCListRow *row1 = (GtkCListRow *) ptr1; GtkCListRow *row2 = (GtkCListRow *) ptr2; struct server *s1 = (struct server *) row1->data; struct server *s2 = (struct server *) row2->data; debug (7, ""); mode = server_clist_def.cols[clist->sort_column].sort_mode[server_clist_def.cols[clist->sort_column].current_sort_mode]; res = compare_servers (s1, s2, mode); // fallback if(res == 0 && mode != SORT_SERVER_PING) { res = compare_servers(s1, s2, SORT_SERVER_PING); } return res; } static int player_clist_compare_func (GtkCList *clist, gconstpointer ptr1, gconstpointer ptr2) { GtkCListRow *row1 = (GtkCListRow *) ptr1; GtkCListRow *row2 = (GtkCListRow *) ptr2; struct player *p1 = (struct player *) row1->data; struct player *p2 = (struct player *) row2->data; return compare_players (p1, p2, clist->sort_column); } static int srvinf_clist_compare_func (GtkCList *clist, gconstpointer ptr1, gconstpointer ptr2) { GtkCListRow *row1 = (GtkCListRow *) ptr1; GtkCListRow *row2 = (GtkCListRow *) ptr2; const char **i1 = (const char **) row1->data; const char **i2 = (const char **) row2->data; return compare_srvinfo (i1, i2, clist->sort_column); } void update_source_callback (GtkWidget *widget, gpointer data) { GSList *masters = NULL; GSList *servers = NULL; GSList *uservers = NULL; event_type=EVENT_UPDATE; debug_increase_indent(); debug (6, "update_source_callback() -- "); if (stat_process || !cur_source) return; master_selection_to_lists (cur_source, &masters, &servers, &uservers); if (masters || servers || uservers) { stat_lists (masters, uservers, servers, NULL); } debug_decrease_indent(); } static void refresh_selected_callback (GtkWidget *widget, gpointer data) { GSList *list; if (stat_process) { debug(1,"nope"); return; } event_type=EVENT_REFRESH_SELECTED; list = server_clist_selected_servers (); if (list) stat_lists (NULL, NULL, list, NULL); } static void refresh_callback (GtkWidget *widget, gpointer data) { GSList *servers; GSList *uservers; if (stat_process) return; event_type=EVENT_REFRESH; debug (7, "refresh_callback() -- Get Server List"); servers = server_clist_all_servers (); uservers = userver_list_copy (cur_userver_list); debug (7, "refresh_callback() -- server list %lx", servers); if (servers || uservers) { stat_lists (NULL, uservers, servers, NULL); } } void refresh_n_server (GtkWidget * button, gpointer *data) { GSList *list; gint number; if (stat_process) return; event_type = EVENT_REFRESH; number=GPOINTER_TO_INT(data); list = server_clist_get_n_servers(number); if (list) stat_lists(NULL, NULL, list, NULL); } void stop_callback (GtkWidget *widget, gpointer data) { event_type = 0; // To prevent sound from stopped action from playing if (stat_process) { stat_stop (stat_process); stat_process = NULL; } redialserver = 0; // Reset redialserver so prompt comes up next time play_sound(sound_stop, 0); event_type = 0; // To prevent sound from stopped action from playing } static void add_to_favorites_callback (GtkWidget *widget, gpointer data) { GList *selected = server_clist->selection; GSList *list; GSList *tmp; enum { buflen = 256 }; char buf[buflen]; /* if you change this, change the statement below */ int server_list_size; debug (7, "add_to_favorites_callback() -- "); if (stat_process || !selected) return; list = server_clist_selected_servers (); if (list) { for (tmp = list; tmp; tmp = tmp->next) { server_list_size = g_slist_length (favorites->servers ); favorites->servers = server_list_append (favorites->servers, (struct server *) tmp->data); if( server_list_size < g_slist_length (favorites->servers )){ snprintf( buf, buflen, "Added Server #%d: '%s'", g_slist_length (favorites->servers ), ((struct server *)tmp->data)->name); } else { snprintf( buf, buflen, "Server '%s' Already In Favorites", ((struct server *)tmp->data)->name); } print_status (main_status_bar, buf ); } debug (7, "add_to_favorites_callback() -- Saving To Favorites"); save_favorites (); server_list_free (list); } } // add a server to favorites static void new_server_to_favorites (struct stat_job *job, struct server *s) { int row; debug (6, "Server %lx, job %p", s, job); favorites->servers = server_list_append (favorites->servers, s); save_favorites (); source_ctree_select_source (favorites); if (cur_filter != 0) { set_filters (0); /* turn off filters */ if (job) job->need_redraw = FALSE; } row = gtk_clist_find_row_from_data (server_clist, s); if (row >= 0) { server_clist_select_one (row); server_clist_selection_visible (); } } static void add_server_name_handler (struct stat_job *job, struct userver *us, enum dns_status status) { if (us->s) { new_server_to_favorites (job, us->s); } else { progress_bar_reset (main_progress_bar); dialog_ok (NULL, _("Host %s not found"), us->hostname); } } /** check specified address is valid, resolve hostname if needed, stat server, * finally call new_server_to_favorites * calls free(str)!!! */ static void prepare_new_server_to_favorites(enum server_type type, char* str, gboolean dolaunch) { char *addr; unsigned short port; struct host *h; struct server *s = NULL; struct userver *us = NULL; if (!str || !*str) return; if (!parse_address (str, &addr, &port)) { dialog_ok (NULL, _("\"%s\" is not valid host[:port] combination."), str); g_free (str); return; } g_free (str); h = host_add (addr); if (h) { /* IP address */ host_ref (h); s = server_add (h, port, type); if (s) new_server_to_favorites (NULL, s); host_unref (h); } else { /* hostname */ g_strdown (addr); us = userver_add (addr, port, type); } g_free (addr); if (s || us) { stat_process = stat_job_create (NULL, (us)? userver_list_add (NULL, us) : NULL, (s)? server_list_prepend (NULL, s) : NULL, NULL); stat_process->state_handlers = g_slist_prepend ( stat_process->state_handlers, stat_lists_state_handler); stat_process->close_handlers = g_slist_prepend ( stat_process->close_handlers, stat_lists_close_handler); // stat_process->server_handlers = g_slist_append ( // stat_process->server_handlers, stat_lists_server_handler); stat_process->name_handlers = g_slist_prepend ( stat_process->name_handlers, add_server_name_handler); if(dolaunch) { if(s) { struct condef* con = condef_new (s); stat_process->data = con; } stat_process->server_handlers = g_slist_append ( stat_process->server_handlers, launch_server_handler); stat_process->close_handlers = g_slist_append ( stat_process->close_handlers, launch_close_handler); } stat_start (stat_process); set_widgets_sensitivity (); } } static void add_server_callback (GtkWidget *widget, gpointer data) { char *str = NULL; enum server_type type = UNKNOWN_SERVER; if (stat_process) return; str = add_server_dialog (&type, NULL); if(!str) return; prepare_new_server_to_favorites(type, str, FALSE); return; } static void del_server_callback (GtkWidget *widget, gpointer data) { GSList *selected; GSList *l, *c; int is_favorites = 0; int delete_from_all = 0; debug(3, "--"); if (stat_process || !cur_source) return; selected = server_clist_selected_servers(); if(!selected) return; for (c = cur_source; c; c = c->next ) { struct master* m = (struct master *) c->data; if(m == favorites) is_favorites = 1; if(!delete_from_all && m->isgroup) { delete_from_all = dialog_yesno (NULL, 1, _("Yes"), _("No"), _("Remove selected servers from all lists?")); } } for (l = selected; l; l = l->next) { struct server* s = (struct server*) l->data; if(delete_from_all) { server_remove_from_all(s); master_remove_server(favorites, s); } else { for (c = cur_source; c; c = c->next ) { struct master* m = (struct master *) c->data; master_remove_server(m, s); } } } if(is_favorites) save_favorites(); g_slist_free(selected); update_server_lists_from_selected_source (); server_clist_build_filtered (cur_server_list, FALSE); } static void copy_server_callback (GtkWidget *widget, gpointer data) { GList *selection = server_clist->selection; struct server *s; char buf[256]; int pos = 0; gtk_editable_delete_text (selection_manager, 0, -1); switch (g_list_length (selection)) { case 0: gtk_editable_select_region (selection_manager, 0, 0); break; default: for (; selection; selection = selection->next) { s = (struct server *) gtk_clist_get_row_data ( server_clist, GPOINTER_TO_INT(selection->data)); g_snprintf (buf, 256, "%s:%d%s", inet_ntoa (s->host->ip), s->port, selection->next?"\n":""); gtk_editable_insert_text (selection_manager, buf, strlen (buf), &pos); } gtk_editable_select_region (selection_manager, 0, -1); break; } gtk_editable_copy_clipboard(selection_manager); } static void copy_server_info_callback (GtkWidget *widget, gpointer data) { GList *selection = GTK_CLIST(srvinf_ctree)->selection; int pos = 0; gtk_editable_delete_text (selection_manager, 0, -1); if(!g_list_length (selection)) { gtk_editable_select_region (selection_manager, 0, 0); } else { for (; selection; selection = selection->next) { GtkCTreeNode* node = GTK_CTREE_NODE(selection->data); char* txt = NULL; gtk_ctree_node_get_text(GTK_CTREE(srvinf_ctree), node, 1, &txt); gtk_editable_insert_text (selection_manager, txt, strlen (txt), &pos); } gtk_editable_select_region (selection_manager, 0, -1); } gtk_editable_copy_clipboard(selection_manager); } static void copy_text_to_clipboard(const char* text) { int pos = 0; gtk_editable_delete_text (selection_manager, 0, -1); if(text && *text) { gtk_editable_insert_text (selection_manager, text, strlen (text), &pos); } gtk_editable_select_region (selection_manager, 0, pos); gtk_editable_copy_clipboard(selection_manager); } static void copy_server_callback_plus (GtkWidget *widget, gpointer data) { GList *selection = server_clist->selection; struct server *s; char buf[256]; int pos = 0; unsigned players; gtk_editable_delete_text (selection_manager, 0, -1); switch (g_list_length (selection)) { case 0: gtk_editable_select_region (selection_manager, 0, 0); break; default: for (; selection; selection = selection->next) { s = (struct server *) gtk_clist_get_row_data ( server_clist, GPOINTER_TO_INT(selection->data)); players = s->curplayers; if(serverlist_countbots && s->curbots <= players) players-=s->curbots; g_snprintf (buf, 256, "%i %s:%d %s %s %i of %i%s", s->ping, inet_ntoa (s->host->ip), s->port, s->name, s->map, players, s->maxplayers, selection->next?"\n":""); gtk_editable_insert_text (selection_manager, buf, strlen (buf), &pos); } gtk_editable_select_region (selection_manager, 0, -1); break; } gtk_editable_copy_clipboard(selection_manager); } static void update_master_builtin_callback (GtkWidget *widget, gpointer data) { update_master_list_builtin(); } static void update_master_gslist_callback (GtkWidget *widget, gpointer data) { if(!have_gslist_installed()) { // translator: %s == url dialog_ok(NULL, _("For Gslist support you must install the 'gslist' program available from\n%s\n" "Don't forget that you need to run 'gslist -u' before you can use it."), gslisthome); copy_text_to_clipboard(gslisthome); return; } update_master_gslist_builtin(); } static void add_master_callback (GtkWidget *widget, gpointer data) { struct master *m; if (stat_process) return; m = add_master_dialog(NULL); if (m) { source_ctree_add_master (source_ctree, m); source_ctree_select_source (m); } } // does only work with one master selected static void edit_master_callback (GtkWidget *widget, gpointer data) { struct master *master_to_edit, *master_to_add; if(!cur_source) return; master_to_edit = (struct master *) cur_source->data; source_ctree_select_source (master_to_edit); master_to_add = add_master_dialog(master_to_edit); if (master_to_add) { source_ctree_add_master (source_ctree, master_to_add); source_ctree_select_source (master_to_add); } } static void del_master_callback (GtkWidget *widget, gpointer data) { struct master *m; GSList *masters = NULL; char *master_names = NULL; GSList *list; int delete; char *s1; char *s2; if (stat_process) return; for (list = cur_source; list; list = list->next) { m = (struct master *) list->data; if (m != favorites && !m->isgroup) { masters = g_slist_append (masters, m); s1 = g_strdup_printf ("%s (%s)", m->name, games[m->type].name); if (!master_names) { master_names = s1; } else { s2= master_names; master_names = g_strconcat (s2, "\n", s1, NULL); g_free (s1); g_free (s2); } } } if (!masters) { dialog_ok(NULL,_("You have to select the server you want to delete")); return; } // FIXME: plural delete = dialog_yesno (NULL, 1, _("Delete"), _("Cancel"), _("Master%s to delete:\n\n%s"), (g_slist_length (masters) > 1)? "s" : "", master_names); if (delete) { for (list = masters; list; list = list->next) { m = (struct master *) list->data; source_ctree_delete_master (source_ctree, m); free_master (m); } } g_free (master_names); g_slist_free (masters); } static void find_player_callback (GtkWidget *widget, int find_next) { char *pattern; if (find_next || find_player_dialog ()) { if (!psearch_data_is_empty ()) { pattern = psearch_lookup_pattern (); print_status (main_status_bar, _("Find Player: %s"), pattern); g_free (pattern); find_player (find_next); } } } static void show_hostnames_callback (GtkWidget *widget, gpointer data) { if (stat_process || !server_clist || server_clist->rows == 0) return; if (GTK_CHECK_MENU_ITEM (view_hostnames_menu_item)->active != show_hostnames) { show_hostnames = GTK_CHECK_MENU_ITEM (view_hostnames_menu_item)->active; server_clist_redraw (); config_set_bool ("/" CONFIG_FILE "/Appearance/show hostnames", show_hostnames); } } static void show_default_port_callback (GtkWidget *widget, gpointer data) { if (stat_process || !server_clist || server_clist->rows == 0) return; if (GTK_CHECK_MENU_ITEM (view_defport_menu_item)->active != show_default_port) { show_default_port = GTK_CHECK_MENU_ITEM (view_defport_menu_item)->active; server_clist_redraw (); config_set_bool ("/" CONFIG_FILE "/Appearance/show default port", show_default_port); } } static void resolve_callback (GtkWidget *widget, gpointer data) { GSList *selected; GSList *hosts; struct server *s; debug (7, "resolve_callback() --"); if (stat_process) return; if (!show_hostnames) { gtk_check_menu_item_set_active ( GTK_CHECK_MENU_ITEM (view_hostnames_menu_item), TRUE); } selected = server_clist_selected_servers (); if (!selected) return; if (selected->next) { hosts = merge_hosts_to_resolve (NULL, selected); } else { /* always resolve if only one host is asked to */ s = (struct server *) selected->data; hosts = host_list_add (NULL, s->host); } server_list_free (selected); stat_lists (NULL, NULL, NULL, hosts); } static void properties_callback (GtkWidget *widget, gpointer data) { if (stat_process) return; if (cur_server) { properties_dialog (cur_server); set_widgets_sensitivity (); } } #if 0 static void cancelredial_callback (GtkWidget *widget, gpointer data) { if (stat_process) return; redialserver = 0; print_status (main_status_bar, _("Done.")); progress_bar_reset (main_progress_bar); } #endif static void rcon_callback (GtkWidget *widget, gpointer data) { struct server_props *sp; char *passwd = NULL; int save = 0; if (stat_process || !cur_server || (games[cur_server->type].flags & GAME_RCON) == 0) { return; } sp = properties (cur_server); if (!sp || !sp->rcon_password) { passwd = enter_string_with_option_dialog (FALSE, _("Save Password"), &save, _("Server Password:")); if (!passwd) /* canceled */ return; if (save) { if (!sp) sp = properties_new (cur_server->host, cur_server->port); sp->rcon_password = passwd; props_save (); passwd = NULL; } } rcon_dialog (cur_server, (passwd)? passwd : sp->rcon_password); if (passwd) g_free (passwd); } static void server_clist_select_callback (GtkWidget *widget, int row, int column, GdkEvent *event, GtkWidget *button) { GdkEventButton *bevent = (GdkEventButton *) event; debug (7, "server_clist_select_callback() -- Row %d", row); server_clist_sync_selection (); if (bevent && bevent->type == GDK_2BUTTON_PRESS && bevent->button == 1 && !((column == 6) && cur_server && (games[cur_server->type].get_mapshot))) // not for map preview { launch_callback (NULL, LAUNCH_NORMAL); } } static void server_clist_unselect_callback (GtkWidget *widget, int row, int column, GdkEvent *event, GtkWidget *button) { debug (7, "server_clist_uselect_callback() -- Row %d", row); server_clist_sync_selection (); } /* Deal with key-presses in the server pane */ static gboolean server_clist_keypress_callback (GtkWidget *widget, GdkEventKey *event) { debug (7, "server_clist_keypress_callback() -- CLIST Key %x", event->keyval ); if (event->keyval == GDK_Delete) { del_server_callback( widget, event ); return TRUE; } else if (event->keyval == GDK_Insert ) { if (event->state & GDK_SHIFT_MASK ){ add_to_favorites_callback( widget, event ); } else { add_server_callback (widget, event); } return TRUE; } else if (event->keyval == GDK_Return || event->keyval == GDK_KP_Enter ) { launch_callback( widget, LAUNCH_NORMAL ); return TRUE; } return FALSE; } static int source_ctree_event_callback (GtkWidget *widget, GdkEvent *event) { GdkEventButton *bevent = (GdkEventButton *) event; GList *selection; int row; GtkCTreeNode *node, *node_under_mouse; int node_is_in_selection = 0; if (event->type == GDK_BUTTON_PRESS && bevent->window == GTK_CLIST(source_ctree)->clist_window) { switch (bevent->button) { case 3: // lets see which row the cursor is on if (gtk_clist_get_selection_info (GTK_CLIST(source_ctree), bevent->x, bevent->y, &row, NULL)) { // list of selected items selection = GTK_CLIST(source_ctree)->selection; // XXX: what is the first part of the && good for? if (!g_list_find (selection, GINT_TO_POINTER(row)) && (bevent->state & (GDK_CONTROL_MASK | GDK_SHIFT_MASK)) == 0) { node_under_mouse = gtk_ctree_node_nth(GTK_CTREE (source_ctree),row); if(node_under_mouse) { // go through all selected masters and search if the one under the // cursor is among them while(selection) { node = GTK_CTREE_NODE(selection->data); if(node == node_under_mouse) { node_is_in_selection = 1; break; } selection = selection->next; } // clear selection and only select the one under the curser if(!node_is_in_selection) { gtk_ctree_unselect_recursive(GTK_CTREE(source_ctree),NULL); gtk_ctree_select (GTK_CTREE (source_ctree), node_under_mouse); } } } } gtk_menu_popup (GTK_MENU (source_menu), NULL, NULL, NULL, NULL, bevent->button, bevent->time); return TRUE; default: return FALSE; } } return FALSE; } static GtkWidget *server_mapshot_popup = NULL; static GtkWidget *server_mapshot_popup_pixmap = NULL; static void server_mapshot_preview_popup_show (guchar *imagedata, size_t len, int x, int y) { GtkWidget *frame; int win_x, win_y, scr_w, scr_h; guint w = 0, h = 0; GdkPixmap *pix = NULL; GdkBitmap *mask = NULL; renderMemToGtkPixmap(imagedata,len,&pix,&mask,&w,&h, 64); if(!pix || !w || !h) { if(pix) gdk_pixmap_unref(pix); if(mask) gdk_bitmap_unref(mask); pix=stop_pix.pix; mask=stop_pix.mask; } if (!server_mapshot_popup) { server_mapshot_popup = gtk_window_new (GTK_WINDOW_POPUP); gtk_window_set_policy (GTK_WINDOW (server_mapshot_popup), FALSE, FALSE, TRUE); frame = gtk_frame_new (NULL); gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_OUT); gtk_container_add (GTK_CONTAINER (server_mapshot_popup), frame); gtk_widget_show (frame); server_mapshot_popup_pixmap = gtk_pixmap_new(pix,mask); gtk_container_add (GTK_CONTAINER (frame), server_mapshot_popup_pixmap); // gtk_preview_size (GTK_PREVIEW (pixmap), 320, 200); gtk_widget_show (server_mapshot_popup_pixmap); } else { gtk_widget_hide (server_mapshot_popup); gtk_pixmap_set(GTK_PIXMAP(server_mapshot_popup_pixmap),pix,mask); } gdk_window_get_origin (server_clist->clist_window, &win_x, &win_y); x += win_x; y += win_y; scr_w = gdk_screen_width (); scr_h = gdk_screen_height (); x = (x + w > scr_w)? scr_w - w : x; y = (y + h > scr_h)? scr_h - h : y; // debug(0,"%d %d %d %d %d %d",scr_w,scr_h,x,y,w,h); /*FIXME_GTK2: gtk_widget_popup() is deprecated */ #ifdef USE_GTK2 gtk_widget_set_uposition (server_mapshot_popup, x, y); gtk_widget_show(server_mapshot_popup); #else gtk_widget_popup (server_mapshot_popup, x, y); #endif } static int server_clist_event_callback (GtkWidget *widget, GdkEvent *event) { GdkEventButton *bevent = (GdkEventButton *) event; GList *selection; int row, column; debug (7, "server_clist_event_callback() -- "); if (event->type == GDK_BUTTON_PRESS && bevent->window == server_clist->clist_window) { switch (bevent->button) { case 1: if (gtk_clist_get_selection_info (server_clist, bevent->x, bevent->y, &row, &column)) { server_clist_select_one (row); if ((column == 6) && cur_server && (games[cur_server->type].get_mapshot)) { size_t buflen; guchar* buf = NULL; buflen = games[cur_server->type].get_mapshot(cur_server,&buf); gdk_pointer_grab (server_clist->clist_window, FALSE, GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON1_MOTION_MASK | GDK_BUTTON_RELEASE_MASK, NULL, NULL, bevent->time); server_mapshot_preview_popup_show (buf, buflen, bevent->x, bevent->y); g_free (buf); return TRUE; } } break; case 2: if (gtk_clist_get_selection_info (server_clist, bevent->x, bevent->y, &row, NULL)) { server_clist_select_one (row); stat_one_server (cur_server); } return TRUE; case 3: if (gtk_clist_get_selection_info (server_clist, bevent->x, bevent->y, &row, NULL)) { selection = server_clist->selection; if (!g_list_find (selection, GINT_TO_POINTER(row)) && (bevent->state & (GDK_CONTROL_MASK | GDK_SHIFT_MASK)) == 0) { server_clist_select_one (row); } } gtk_menu_popup (GTK_MENU (server_menu), NULL, NULL, NULL, NULL, bevent->button, bevent->time); return TRUE; default: return FALSE; } } if (event->type == GDK_BUTTON_RELEASE && bevent->window == server_clist->clist_window) { if (server_mapshot_popup) { gdk_pointer_ungrab (bevent->time); gtk_widget_hide (server_mapshot_popup); } } return FALSE; } static int server_info_clist_event_callback (GtkWidget *widget, GdkEvent *event) { GdkEventButton *bevent = (GdkEventButton *) event; GList *selection; GtkCTreeNode *node, *node_under_mouse; int row = -1; int node_is_in_selection = 0; if (event->type == GDK_BUTTON_PRESS && bevent->window == GTK_CLIST(srvinf_ctree)->clist_window && bevent->button == 3) { if (gtk_clist_get_selection_info (GTK_CLIST(srvinf_ctree), bevent->x, bevent->y, &row, NULL)) { selection = GTK_CLIST(srvinf_ctree)->selection; if (!g_list_find (selection, GINT_TO_POINTER(row)) && (bevent->state & (GDK_CONTROL_MASK | GDK_SHIFT_MASK)) == 0) { node_under_mouse = gtk_ctree_node_nth(GTK_CTREE (srvinf_ctree),row); if(node_under_mouse) { // go through all selected masters and search if the one under the // cursor is among them while(selection) { node = GTK_CTREE_NODE(selection->data); if(node == node_under_mouse) { node_is_in_selection = 1; break; } selection = selection->next; } // clear selection and only select the one under the curser if(!node_is_in_selection) { gtk_ctree_unselect_recursive(GTK_CTREE(srvinf_ctree),NULL); gtk_ctree_select (GTK_CTREE (srvinf_ctree), node_under_mouse); } } } } gtk_menu_popup (GTK_MENU (server_info_menu), NULL, NULL, NULL, NULL, bevent->button, bevent->time); return TRUE; } return FALSE; } static void source_selection_changed (void) { GList *selection = GTK_CLIST (source_ctree)->selection; GtkCTreeNode *node; struct master *m; debug (6, "souce_selection_changed() --"); if (cur_source) { g_slist_free (cur_source); cur_source = NULL; } while (selection) { node = (GtkCTreeNode *) selection->data; m = (struct master *) gtk_ctree_node_get_row_data ( GTK_CTREE (source_ctree), node); cur_source = g_slist_append (cur_source, m); selection = selection->next; } update_server_lists_from_selected_source (); server_clist_set_list (cur_server_list); reset_main_status_bar(); } static void source_ctree_selection_changed_callback (GtkWidget *widget, int row, int column, GdkEvent *event, GtkWidget *button) { debug(6,"source_ctree_selection_changed_callback(%p,%d,%d,%p,%p)",widget,row,column,event,button); source_selection_changed (); } static void source_selection_clear_master_servers (void) { struct master *m; GSList* source = NULL; for (source = cur_source; source; source=source->next) { m = (struct master *) source->data; if (m == favorites || m->isgroup) continue; server_list_free(m->servers); m->servers = NULL; } update_server_lists_from_selected_source (); server_clist_set_list (cur_server_list); reset_main_status_bar(); } static void clear_master_servers_callback (GtkWidget *widget, int row, int column, GdkEvent *event, GtkWidget *button) { source_selection_clear_master_servers (); } static void add_to_player_filter_callback (GtkWidget *widget, unsigned mask) { GList *selection = player_clist->selection; struct player *p; int row; if (!selection || !cur_server || stat_process) return; row = GPOINTER_TO_INT(selection->data); p = (struct player *) gtk_clist_get_row_data (player_clist, row); if (player_filter_add_player (p->name, mask)) { server_clist_build_filtered (cur_server_list, TRUE); player_clist_redraw (); } } static void player_skin_preview_popup_show (guchar *skin, int top, int bottom, int x, int y) { GtkWidget *frame; int win_x, win_y, scr_w, scr_h; if (!player_skin_popup) { player_skin_popup = gtk_window_new (GTK_WINDOW_POPUP); gtk_window_set_policy (GTK_WINDOW (player_skin_popup), FALSE, FALSE, TRUE); frame = gtk_frame_new (NULL); gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_OUT); gtk_container_add (GTK_CONTAINER (player_skin_popup), frame); gtk_widget_show (frame); player_skin_popup_preview = gtk_preview_new (GTK_PREVIEW_COLOR); gtk_container_add (GTK_CONTAINER (frame), player_skin_popup_preview); gtk_preview_size (GTK_PREVIEW (player_skin_popup_preview), 320, 200); gtk_widget_show (player_skin_popup_preview); } else { gtk_widget_hide (player_skin_popup); } gdk_window_get_origin (player_clist->clist_window, &win_x, &win_y); x += win_x; y += win_y; scr_w = gdk_screen_width (); scr_h = gdk_screen_height (); x = (x + 320 > scr_w)? scr_w - 320 : x; y = (y + 200 > scr_h)? scr_h - 200 : y; /*FIXME_GTK2: gtk_widget_popup() is deprecated */ #ifdef USE_GTK2 gtk_widget_set_uposition (player_skin_popup, x, y); gtk_widget_show(player_skin_popup); #else gtk_widget_popup (player_skin_popup, x, y); #endif draw_qw_skin (player_skin_popup_preview, skin, top, bottom); } static int player_clist_event_callback (GtkWidget *widget, GdkEvent *event) { GdkEventButton *bevent = (GdkEventButton *) event; guchar *skindata; int row, column; struct player *p; switch (event->type) { case GDK_BUTTON_PRESS: if (bevent->window == player_clist->clist_window) { if (gtk_clist_get_selection_info (player_clist, bevent->x, bevent->y, &row, &column)) { if (row >= 0 && row < g_slist_length (cur_server->players)) { if ((column == 2 || column == 3) && cur_server && (games[cur_server->type].flags & GAME_QUAKE1_SKIN) != 0) { p = (struct player *) gtk_clist_get_row_data (player_clist, row); skindata = get_qw_skin (p->skin, games[QW_SERVER].real_dir); gdk_pointer_grab (player_clist->clist_window, FALSE, GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON1_MOTION_MASK | GDK_BUTTON_RELEASE_MASK, NULL, NULL, bevent->time); player_skin_preview_popup_show (skindata, p->shirt, p->pants, bevent->x, bevent->y); if (skindata) g_free (skindata); return TRUE; } else { if (bevent->button == 3) { gtk_clist_select_row (player_clist, row, column); gtk_menu_popup (GTK_MENU (player_menu), NULL, NULL, NULL, NULL, bevent->button, bevent->time); return TRUE; } } } } } break; case GDK_2BUTTON_PRESS: case GDK_3BUTTON_PRESS: return TRUE; case GDK_BUTTON_RELEASE: if (player_skin_popup) { gdk_pointer_ungrab (bevent->time); gtk_widget_hide (player_skin_popup); } break; default: break; } return FALSE; } static void statistics_callback (GtkWidget *widget, gpointer data) { if (stat_process) return; statistics_dialog (); } struct __menuitem { char *label; char accel_key; int accel_mods; GtkWidget **widget; GtkSignalFunc callback; gpointer user_data; }; static const struct menuitem srvopt_menu_items[] = { { MENU_ITEM, N_("Connect"), 0, 0, GTK_SIGNAL_FUNC (launch_callback), (gpointer) LAUNCH_NORMAL, &connect_menu_item }, { MENU_ITEM, N_("Observe"), 0, 0, GTK_SIGNAL_FUNC (launch_callback), (gpointer) LAUNCH_SPECTATE, &observe_menu_item }, { MENU_ITEM, N_("Record Demo"), 0, 0, GTK_SIGNAL_FUNC (launch_callback), (gpointer) LAUNCH_RECORD, &record_menu_item }, /* { MENU_ITEM, N_("Cancel Redial"), 0, 0, GTK_SIGNAL_FUNC (cancelredial_callback), NULL, &cancel_redial_menu_item }, */ { MENU_SEPARATOR, NULL, 0, 0, NULL, NULL, NULL }, { MENU_ITEM, N_("Add new Server"), 0, 0, GTK_SIGNAL_FUNC (add_server_callback), NULL, &add_menu_item }, { MENU_ITEM, N_("Add to Favorites"), 0, 0, GTK_SIGNAL_FUNC (add_to_favorites_callback), NULL, &favadd_menu_item }, { MENU_ITEM, N_("Remove"), 0, 0, GTK_SIGNAL_FUNC (del_server_callback), NULL, &delete_menu_item }, { MENU_ITEM, N_("Copy"), 0, 0, GTK_SIGNAL_FUNC (copy_server_callback), NULL, NULL }, { MENU_ITEM, N_("Copy+"), 0, 0, GTK_SIGNAL_FUNC (copy_server_callback_plus), NULL, NULL }, { MENU_SEPARATOR, NULL, 0, 0, NULL, NULL, NULL }, { MENU_ITEM, N_("Refresh"), 0, 0, GTK_SIGNAL_FUNC (refresh_callback), NULL, &refresh_menu_item }, { MENU_ITEM, N_("Refresh Selected"), 0, 0, GTK_SIGNAL_FUNC (refresh_selected_callback), NULL, &refrsel_menu_item }, { MENU_SEPARATOR, NULL, 0, 0, NULL, NULL, NULL }, { MENU_ITEM, N_("DNS Lookup"), 0, 0, GTK_SIGNAL_FUNC (resolve_callback), NULL, &resolve_menu_item }, { MENU_SEPARATOR, NULL, 0, 0, NULL, NULL, NULL }, { MENU_ITEM, N_("RCon"), 0, 0, GTK_SIGNAL_FUNC (rcon_callback), NULL, &rcon_menu_item }, { MENU_ITEM, N_("Properties"), 0, 0, GTK_SIGNAL_FUNC (properties_callback), NULL, &properties_menu_item }, { MENU_END, NULL, 0, 0, NULL, NULL, NULL } }; static const struct menuitem srvinfo_menu_items[] = { { MENU_ITEM, N_("Copy"), 0, 0, GTK_SIGNAL_FUNC (copy_server_info_callback), NULL, NULL }, { MENU_END, NULL, 0, 0, NULL, NULL, NULL } }; static const struct menuitem file_menu_items[] = { { MENU_ITEM, N_("_Statistics"), 0, 0, GTK_SIGNAL_FUNC (statistics_callback), NULL, &file_statistics_menu_item }, { MENU_SEPARATOR, NULL, 0, 0, NULL, NULL, NULL }, { MENU_ITEM, N_("_Exit"), 'Q', GDK_CONTROL_MASK, NULL, NULL, &file_quit_menu_item }, { MENU_END, NULL, 0, 0, NULL, NULL, NULL } }; // appears on right click on a master server static const struct menuitem source_ctree_popup_menu[] = { { MENU_ITEM, N_("Add _Master"), 'M', GDK_CONTROL_MASK, GTK_SIGNAL_FUNC (add_master_callback), NULL, &source_add_master_menu_item }, { MENU_ITEM, N_("_Rename Master"), 0, 0, GTK_SIGNAL_FUNC (edit_master_callback), NULL, &source_edit_master_menu_item }, { MENU_ITEM, N_("D_elete Master"), 0, 0, GTK_SIGNAL_FUNC (del_master_callback), NULL, &source_delete_master_menu_item }, { MENU_ITEM, N_("_Clear Servers"), 0, 0, GTK_SIGNAL_FUNC (clear_master_servers_callback), NULL, &source_clear_master_servers_menu_item }, { MENU_END, NULL, 0, 0, NULL, NULL, NULL } }; static const struct menuitem edit_menu_items[] = { { MENU_ITEM, N_("_Add new Server"), 'N', GDK_CONTROL_MASK, GTK_SIGNAL_FUNC (add_server_callback), NULL, &edit_add_menu_item }, { MENU_ITEM, N_("Add to _Favorites"), 0, 0, GTK_SIGNAL_FUNC (add_to_favorites_callback), NULL, &edit_favadd_menu_item }, { MENU_ITEM, N_("_Remove"), 'D', GDK_CONTROL_MASK, GTK_SIGNAL_FUNC (del_server_callback), NULL, &edit_delete_menu_item }, { MENU_ITEM, N_("_Copy"), 'C', GDK_CONTROL_MASK, GTK_SIGNAL_FUNC (copy_server_callback), NULL, NULL }, { MENU_ITEM, N_("_Copy+"), 'O', GDK_CONTROL_MASK, GTK_SIGNAL_FUNC (copy_server_callback_plus), NULL, NULL }, { MENU_SEPARATOR, NULL, 0, 0, NULL, NULL, NULL }, { MENU_ITEM, N_("Add Default Masters" ), 0, GDK_CONTROL_MASK, GTK_SIGNAL_FUNC (update_master_builtin_callback), NULL, &edit_update_master_builtin_menu_item }, { MENU_ITEM, N_("Add Gslist Masters" ), 0, GDK_CONTROL_MASK, GTK_SIGNAL_FUNC (update_master_gslist_callback), NULL, &edit_update_master_gslist_menu_item }, { MENU_ITEM, N_("Add _Master"), 'M', GDK_CONTROL_MASK, GTK_SIGNAL_FUNC (add_master_callback), NULL, &edit_add_master_menu_item }, { MENU_ITEM, N_("_Rename Master"), 0, 0, GTK_SIGNAL_FUNC (edit_master_callback), NULL, &edit_edit_master_menu_item }, { MENU_ITEM, N_("D_elete Master"), 0, 0, GTK_SIGNAL_FUNC (del_master_callback), NULL, &edit_delete_master_menu_item }, { MENU_ITEM, N_("_Clear Servers"), 0, 0, GTK_SIGNAL_FUNC (clear_master_servers_callback), NULL, &edit_clear_master_servers_menu_item }, { MENU_SEPARATOR, NULL, 0, 0, NULL, NULL, NULL }, { MENU_ITEM, N_("_Find Player"), 'F', GDK_CONTROL_MASK, GTK_SIGNAL_FUNC (find_player_callback), (gpointer) FALSE, &edit_find_player_menu_item }, { MENU_ITEM, N_("Find A_gain"), 'G', GDK_CONTROL_MASK, GTK_SIGNAL_FUNC (find_player_callback), (gpointer) TRUE, &edit_find_again_menu_item }, { MENU_SEPARATOR, NULL, 0, 0, NULL, NULL, NULL }, { MENU_ITEM, N_("Properties"), 0, 0, GTK_SIGNAL_FUNC (properties_callback), NULL, &properties_menu_item }, { MENU_END, NULL, 0, 0, NULL, NULL, NULL } }; static const struct menuitem view_menu_items[] = { { MENU_ITEM, N_("_Refresh"), 'R', GDK_CONTROL_MASK, GTK_SIGNAL_FUNC (refresh_callback), NULL, &view_refresh_menu_item }, { MENU_ITEM, N_("Refresh _Selected"), 'S', GDK_CONTROL_MASK, GTK_SIGNAL_FUNC (refresh_selected_callback), NULL, &view_refrsel_menu_item }, { MENU_ITEM, N_("_Update From Master"), 'U', GDK_CONTROL_MASK, GTK_SIGNAL_FUNC (update_source_callback), NULL, &view_update_menu_item }, { MENU_SEPARATOR, NULL, 0, 0, NULL, NULL, NULL }, { MENU_CHECK_ITEM, N_("Show _Host Names"), 'H', GDK_CONTROL_MASK, GTK_SIGNAL_FUNC (show_hostnames_callback), NULL, &view_hostnames_menu_item }, { MENU_CHECK_ITEM, N_("Show Default _Port"), 0, 0, GTK_SIGNAL_FUNC (show_default_port_callback), NULL, &view_defport_menu_item }, { MENU_END, NULL, 0, 0, NULL, NULL, NULL } }; /* baa -- Oh, this is kind of bad. In order to allow the number of menus to be changed at compile (and in the future, run) time, I have to allocate and set up each of the filter menu items. But that makes it no longer a const. */ static const struct menuitem server_menu_items[] = { /* { MENU_ITEM, N_("_Server Filters"), 0, 0, NULL, 0, &server_serverfilter_menu_item }, */ { MENU_ITEM, N_("_Connect"), 0, 0, GTK_SIGNAL_FUNC (launch_callback), (gpointer) LAUNCH_NORMAL, &server_connect_menu_item }, { MENU_ITEM, N_("_Observe"), 0, 0, GTK_SIGNAL_FUNC (launch_callback), (gpointer) LAUNCH_SPECTATE, &server_observe_menu_item }, { MENU_ITEM, N_("Record _Demo"), 0, 0, GTK_SIGNAL_FUNC (launch_callback), (gpointer) LAUNCH_RECORD, &server_record_menu_item }, /* { MENU_ITEM, N_("Cancel Redial"), 0, 0, GTK_SIGNAL_FUNC (cancelredial_callback), NULL, &server_cancel_redial_menu_item }, */ { MENU_SEPARATOR, NULL, 0, 0, NULL, NULL, NULL }, { MENU_ITEM, N_("_Add new Server"), 0, 0, GTK_SIGNAL_FUNC (add_server_callback), NULL, &edit_add_menu_item }, { MENU_ITEM, N_("Add to _Favorites"), 0, 0, GTK_SIGNAL_FUNC (add_to_favorites_callback), NULL, &server_favadd_menu_item }, { MENU_ITEM, N_("_Remove"), 0, 0, GTK_SIGNAL_FUNC (del_server_callback), NULL, &server_delete_menu_item }, { MENU_ITEM, N_("DNS _Lookup"), 'L', GDK_CONTROL_MASK, GTK_SIGNAL_FUNC (resolve_callback), NULL, &server_resolve_menu_item }, { MENU_SEPARATOR, NULL, 0, 0, NULL, NULL, NULL }, { MENU_ITEM, N_("_RCon"), 0, 0, GTK_SIGNAL_FUNC (rcon_callback), NULL, &server_rcon_menu_item }, { MENU_ITEM, N_("_Properties"), 0, 0, GTK_SIGNAL_FUNC (properties_callback), NULL, &server_properties_menu_item }, { MENU_END, NULL, 0, 0, NULL, NULL, NULL } }; static const struct menuitem preferences_menu_items[] = { { MENU_ITEM, N_("_General"), 0, 0, GTK_SIGNAL_FUNC (start_preferences_dialog), (gpointer) (PREF_PAGE_GENERAL + UNKNOWN_SERVER * 256), NULL }, { MENU_ITEM, N_("_Games"), 0, 0, GTK_SIGNAL_FUNC (start_preferences_dialog), (gpointer) (PREF_PAGE_GAMES + UNKNOWN_SERVER * 256), NULL }, { MENU_ITEM, N_("_Appearance"), 0, 0, GTK_SIGNAL_FUNC (start_preferences_dialog), (gpointer) (PREF_PAGE_APPEARANCE + UNKNOWN_SERVER * 256), NULL }, { MENU_ITEM, N_("_QStat"), 0, 0, GTK_SIGNAL_FUNC (start_preferences_dialog), (gpointer) (PREF_PAGE_QSTAT + UNKNOWN_SERVER * 256), NULL }, { MENU_ITEM, N_("_Sounds"), 0, 0, GTK_SIGNAL_FUNC (start_preferences_dialog), (gpointer) (PREF_PAGE_SOUNDS + UNKNOWN_SERVER * 256), NULL }, { MENU_ITEM, N_("S_cripts"), 0, 0, GTK_SIGNAL_FUNC (start_preferences_dialog), (gpointer) (PREF_PAGE_SCRIPTS + UNKNOWN_SERVER * 256), NULL }, { MENU_SEPARATOR, NULL, 0, 0, NULL, NULL, NULL }, { MENU_ITEM, N_("_Server Filter"), 0, 0, GTK_SIGNAL_FUNC (start_filters_cfg_dialog), (gpointer) FILTER_SERVER, NULL }, { MENU_ITEM, N_("Player _Filter"), 0, 0, GTK_SIGNAL_FUNC (start_filters_cfg_dialog), (gpointer) FILTER_PLAYER, NULL }, { MENU_END, NULL, 0, 0, NULL, NULL, NULL } }; static const struct menuitem help_menu_items[] = { { MENU_ITEM, N_("_About"), 0, 0, GTK_SIGNAL_FUNC (about_dialog), NULL, NULL }, { MENU_END, NULL, 0, 0, NULL, NULL, NULL } }; static const struct menuitem menubar_menu_items[] = { { MENU_BRANCH, N_("_File"), 0, 0, NULL, &file_menu_items, NULL }, { MENU_BRANCH, N_("_Edit"), 0, 0, NULL, &edit_menu_items, NULL }, { MENU_BRANCH, N_("_View"), 0, 0, NULL, &view_menu_items, NULL }, { MENU_BRANCH, N_("_Server"), 0, 0, NULL, &server_menu_items, NULL }, { MENU_BRANCH, N_("_Preferences"), 0, 0, NULL, &preferences_menu_items, NULL }, { MENU_ITEM, N_("_Server Filters"), 0, 0, NULL, 0, &server_serverfilter_menu_item }, { MENU_BRANCH, N_("_Help"), 0, 0, NULL, &help_menu_items, NULL }, { MENU_END, NULL, 0, 0, NULL, NULL, NULL } }; static GtkWidget *create_player_menu_item (char *str, int i) { GtkWidget *menu_item; GtkWidget *hbox; GtkWidget *label; GtkWidget *pixmap; menu_item = gtk_menu_item_new (); hbox = gtk_hbox_new (FALSE, 4); gtk_container_add (GTK_CONTAINER (menu_item), hbox); label = gtk_label_new (str); gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); gtk_widget_show (label); pixmap = gtk_pixmap_new (group_pix[i].pix, group_pix[i].mask); gtk_box_pack_end (GTK_BOX (hbox), pixmap, FALSE, FALSE, 0); gtk_widget_show (pixmap); gtk_widget_show (hbox); return menu_item; } static GtkWidget *create_player_menu (GtkAccelGroup *accel_group) { GtkWidget *menu; GtkWidget *marker_menu; GtkWidget *menu_item; menu = gtk_menu_new (); marker_menu = gtk_menu_new (); menu_item = create_player_menu_item (_("Mark as Red"), 0); gtk_menu_append (GTK_MENU (marker_menu), menu_item); gtk_signal_connect (GTK_OBJECT (menu_item), "activate", GTK_SIGNAL_FUNC (add_to_player_filter_callback), (gpointer) PLAYER_GROUP_RED); gtk_widget_show (menu_item); menu_item = create_player_menu_item (_("Mark as Green"), 1); gtk_menu_append (GTK_MENU (marker_menu), menu_item); gtk_signal_connect (GTK_OBJECT (menu_item), "activate", GTK_SIGNAL_FUNC (add_to_player_filter_callback), (gpointer) PLAYER_GROUP_GREEN); gtk_widget_show (menu_item); menu_item = create_player_menu_item (_("Mark as Blue"), 2); gtk_menu_append (GTK_MENU (marker_menu), menu_item); gtk_signal_connect (GTK_OBJECT (menu_item), "activate", GTK_SIGNAL_FUNC (add_to_player_filter_callback), (gpointer) PLAYER_GROUP_BLUE); gtk_widget_show (menu_item); menu_item = gtk_menu_item_new_with_label (_("Add to Player Filter")); gtk_menu_item_set_submenu (GTK_MENU_ITEM (menu_item), marker_menu); gtk_menu_append (GTK_MENU (menu), menu_item); gtk_widget_show (menu_item); player_filter_menu_item = menu_item; return menu; } static void populate_main_toolbar (void) { GtkWidget *pixmap; char buf[128]; unsigned mask; int i; pixmap = gtk_pixmap_new (update_pix.pix, update_pix.mask); gtk_widget_show (pixmap); update_button = gtk_toolbar_append_item (GTK_TOOLBAR (main_toolbar), _("Update"), _("Update from master"), NULL, pixmap, GTK_SIGNAL_FUNC (update_source_callback), NULL); pixmap = gtk_pixmap_new (refresh_pix.pix, refresh_pix.mask); gtk_widget_show (pixmap); refresh_button = gtk_toolbar_append_item (GTK_TOOLBAR (main_toolbar), _("Refresh"), _("Refresh current list"), NULL, pixmap, GTK_SIGNAL_FUNC (refresh_callback), NULL); pixmap = gtk_pixmap_new (refrsel_pix.pix, refrsel_pix.mask); gtk_widget_show (pixmap); refrsel_button = gtk_toolbar_append_item (GTK_TOOLBAR (main_toolbar), _("Ref.Sel."), _("Refresh selected servers"), NULL, pixmap, GTK_SIGNAL_FUNC (refresh_selected_callback), NULL); pixmap = gtk_pixmap_new (stop_pix.pix, stop_pix.mask); gtk_widget_show (pixmap); stop_button = gtk_toolbar_append_item (GTK_TOOLBAR (main_toolbar), _("Stop"), _("Stop"), NULL, pixmap, GTK_SIGNAL_FUNC (stop_callback), NULL); gtk_toolbar_append_space (GTK_TOOLBAR (main_toolbar)); pixmap = gtk_pixmap_new (connect_pix.pix, connect_pix.mask); gtk_widget_show (pixmap); connect_button = gtk_toolbar_append_item (GTK_TOOLBAR (main_toolbar), _("Connect"), _("Connect"), NULL, pixmap, GTK_SIGNAL_FUNC (launch_callback), (gpointer) LAUNCH_NORMAL); #if 0 pixmap = gtk_pixmap_new (observe_pix.pix, observe_pix.mask); gtk_widget_show (pixmap); observe_button = gtk_toolbar_append_item (GTK_TOOLBAR (main_toolbar), _("Observe"), _("Observe"), NULL, pixmap, GTK_SIGNAL_FUNC (launch_callback), (gpointer) LAUNCH_SPECTATE); pixmap = gtk_pixmap_new (record_pix.pix, record_pix.mask); gtk_widget_show (pixmap); record_button = gtk_toolbar_append_item (GTK_TOOLBAR (main_toolbar), _("Record"), _("Record Demo"), NULL, pixmap, GTK_SIGNAL_FUNC (launch_callback), (gpointer) LAUNCH_RECORD); #endif gtk_toolbar_append_space (GTK_TOOLBAR (main_toolbar)); /* * Filter buttons */ for (i = 0, mask = 1; i < FILTERS_TOTAL; i++, mask <<= 1) { if(!filters[i].pix) { filter_buttons[i] = NULL; continue; } // Translators: e.g. Server Filter g_snprintf (buf, 128, _("%s Filter Enable / Disable"), _(filters[i].name)); pixmap = gtk_pixmap_new (filters[i].pix->pix, filters[i].pix->mask); gtk_widget_show (pixmap); filter_buttons[i] = gtk_toolbar_append_element ( GTK_TOOLBAR (main_toolbar), GTK_TOOLBAR_CHILD_TOGGLEBUTTON, NULL, _(filters[i].short_name), buf, NULL, pixmap, GTK_SIGNAL_FUNC (filter_toggle_callback), GINT_TO_POINTER(mask)); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (filter_buttons[i]), ((cur_filter & mask) != 0)? TRUE : FALSE); } #if 0 gtk_toolbar_append_space (GTK_TOOLBAR (main_toolbar)); for (i = 0, mask = 1; i < FILTERS_TOTAL; i++, mask <<= 1) { // Translators: e.g. Server Filter Configuration g_snprintf (buf, 128, _("%s Filter Configuration"), _(filters[i].name)); pixmap = gtk_pixmap_new (filter_cfg_pix[i].pix, filter_cfg_pix[i].mask); gtk_widget_show (pixmap); gtk_toolbar_append_item (GTK_TOOLBAR (main_toolbar), _(filters[i].short_cfg_name), buf, NULL, pixmap, GTK_SIGNAL_FUNC (start_filters_cfg_dialog), (gpointer) i); } gtk_toolbar_append_space (GTK_TOOLBAR (main_toolbar)); /*filter option menu for toolbar */ filter_toolbar_label = gtk_label_new ("Filter: "); gtk_toolbar_append_widget( GTK_TOOLBAR (main_toolbar), filter_toolbar_label, "Select a server filter", "Private" ); gtk_widget_show(filter_toolbar_label); filter_option_menu_toolbar = gtk_option_menu_new (); gtk_option_menu_set_menu (GTK_OPTION_MENU (filter_option_menu_toolbar), create_filter_menu_toolbar()); gtk_toolbar_append_widget( GTK_TOOLBAR (main_toolbar), filter_option_menu_toolbar, "Select a server filter", "Private" ); gtk_widget_show (filter_option_menu_toolbar); #endif set_toolbar_appearance (GTK_TOOLBAR (main_toolbar), default_toolbar_style, default_toolbar_tips); } /** build server filter menu for menubar */ #if 0 static GtkWidget* create_filter_menu_toolbar() { unsigned int i; GtkWidget *menu; GtkWidget *menu_item; struct server_filter_vars* filter = NULL; menu = gtk_menu_new(); for (i = 0;i<=server_filters->len;i++) { char* name = NULL; if(i == 0) { filter = NULL; name = _("None"); } else { filter = g_array_index (server_filters, struct server_filter_vars*, i-1); name = filter->filter_name; } menu_item = gtk_menu_item_new_with_label(name); gtk_menu_append (GTK_MENU (menu), menu_item); gtk_widget_show (menu_item); gtk_signal_connect (GTK_OBJECT (menu_item), "activate", GTK_SIGNAL_FUNC (server_filter_select_callback_toolbar), (gpointer)i); // array starts from zero but filters from 1 } gtk_widget_show (menu); return menu; } #endif /** build server filter menu for toolbar */ static GtkWidget* create_filter_menu() { unsigned int i; GtkWidget *menu; GtkWidget *menu_item; struct server_filter_vars* filter = NULL; GSList* rbgroup = NULL; filter_menu_radio_buttons = NULL; menu = gtk_menu_new(); menu_item = gtk_menu_item_new_with_label (_("Configure")); gtk_menu_append (GTK_MENU (menu), menu_item); gtk_widget_show (menu_item); gtk_signal_connect (GTK_OBJECT (menu_item), "activate", GTK_SIGNAL_FUNC (start_filters_cfg_dialog), (gpointer) FILTER_SERVER); menu_item = gtk_menu_item_new (); gtk_widget_set_sensitive (menu_item, FALSE); gtk_menu_append (GTK_MENU (menu), menu_item); gtk_widget_show (menu_item); for (i = 0;i<=server_filters->len;i++) { char* name = NULL; if(i == 0) { filter = NULL; name = _("None"); } else { filter = g_array_index (server_filters, struct server_filter_vars*, i-1); name = filter->filter_name; } menu_item = gtk_radio_menu_item_new_with_label(rbgroup,name); rbgroup = gtk_radio_menu_item_group (GTK_RADIO_MENU_ITEM (menu_item)); gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menu_item), FALSE); filter_menu_radio_buttons = g_slist_append(filter_menu_radio_buttons,menu_item); gtk_menu_append (GTK_MENU (menu), menu_item); gtk_widget_show (menu_item); gtk_signal_connect (GTK_OBJECT (menu_item), "activate", GTK_SIGNAL_FUNC (server_filter_select_callback), GINT_TO_POINTER(i)); // array starts from zero but filters from 1 /* // add separator if(i == 0) { menu_item = gtk_menu_item_new (); gtk_widget_set_sensitive (menu_item, FALSE); gtk_menu_append (GTK_MENU (menu), menu_item); gtk_widget_show (menu_item); } */ } // filter_menu = menu; return menu; } static void quick_filter_entry_changed(GtkWidget* entry, gpointer data) { const char* text = gtk_entry_get_text(GTK_ENTRY(entry)); int mask = 0; debug(3,"%d <%s>", strlen(text), text); if(!text || !*text) { if(filter_quick_get()) { mask = FILTER_QUICK_MASK; } filter_quick_set(NULL); } else { if (!filter_quick_get()) { mask = FILTER_QUICK_MASK; } filter_quick_set(text); } filters[FILTER_QUICK].last_changed = filter_time_inc(); filter_toggle_callback(NULL, mask); } void quickfilter_delete_button_clicked (GtkWidget *widget, GtkWidget* entry) { gtk_editable_delete_text(GTK_EDITABLE(entry), 0, -1); gtk_widget_grab_focus(entry); } static void create_main_window (void) { main_window = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_signal_connect (GTK_OBJECT (main_window), "delete_event", GTK_SIGNAL_FUNC (window_delete_event_callback), NULL); gtk_signal_connect (GTK_OBJECT (main_window), "destroy", GTK_SIGNAL_FUNC (ui_done), NULL); gtk_signal_connect (GTK_OBJECT (main_window), "destroy", GTK_SIGNAL_FUNC (gtk_main_quit), NULL); gtk_window_set_title (GTK_WINDOW (main_window), "XQF"); register_window (main_window); gtk_widget_realize (main_window); } static void populate_main_window (void) { GtkWidget *main_vbox; GtkWidget *vbox; GtkWidget *vbox2; GtkWidget *hbox; GtkWidget *hpaned; GtkWidget *hpaned2; GtkWidget *vpaned; GtkWidget *menu_bar; GtkWidget *handlebox; GtkWidget *scrollwin; GtkWidget *entry; GtkWidget *label; GtkWidget *button; GtkWidget *pixmap; GtkAccelGroup *accel_group; int i; // char *buf; accel_group = gtk_accel_group_new (); /* Before we create the right-click server menu, we need to set up all of the needed filter entries. This is a terrible thing to do because in menus.c, the function that builds the menu expects a const. However, we are not going go g_free or otherwise reuse the memory we g_malloc so we should be okay. If you change the number of menu items before the various filters, you need to change the server_filter_widget line in xqf.h. */ #if 0 if ((server_filter_menu_items = g_malloc( sizeof( struct menuitem ) * ( MAX_SERVER_FILTERS + 4 )))) { i = 0; j = 0; server_filter_menu_items[i].type = MENU_ITEM; server_filter_menu_items[i].label = _("Filters"); server_filter_menu_items[i].accel_key = 0; server_filter_menu_items[i].accel_mods = 0; server_filter_menu_items[i].callback = NULL; server_filter_menu_items[i].user_data = NULL; server_filter_menu_items[i].widget = &server_filter_widget[i]; i++; server_filter_menu_items[i].type = MENU_SEPARATOR; server_filter_menu_items[i].label = NULL; server_filter_menu_items[i].accel_key = 0; server_filter_menu_items[i].accel_mods = 0; server_filter_menu_items[i].callback = NULL; server_filter_menu_items[i].user_data = NULL; server_filter_menu_items[i].widget = &server_filter_widget[i]; i++; /* Start of the filters */ filter_start_index = i; server_filter_menu_items[i].type = MENU_ITEM; server_filter_menu_items[i].label = _("None"); server_filter_menu_items[i].accel_key = 0; server_filter_menu_items[i].accel_mods = 0; server_filter_menu_items[i].callback = GTK_SIGNAL_FUNC (server_filter_select_callback); server_filter_menu_items[i].user_data = (gpointer) j; server_filter_menu_items[i].widget = &server_filter_widget[i]; i++; j++; for( ; i < (MAX_SERVER_FILTERS + filter_start_index); i++, j++ ){ buf = g_malloc( sizeof( char ) * ( 16 )); sprintf( buf, "Filter %d", j ); server_filter_menu_items[i].type = MENU_ITEM; server_filter_menu_items[i].label = buf; server_filter_menu_items[i].accel_key = 0; server_filter_menu_items[i].accel_mods = 0; server_filter_menu_items[i].callback = GTK_SIGNAL_FUNC (server_filter_select_callback); server_filter_menu_items[i].user_data = (gpointer) j; server_filter_menu_items[i].widget = &server_filter_widget[i]; } server_filter_menu_items[i].type = MENU_END; server_filter_menu_items[i].label = NULL; server_filter_menu_items[i].accel_key = 0; server_filter_menu_items[i].accel_mods = 0; server_filter_menu_items[i].callback = NULL; server_filter_menu_items[i].user_data = NULL; server_filter_menu_items[i].widget = NULL; } /* Depeding on where you want the filters to appear... */ #if 0 srvopt_menu_items[0].user_data = &server_filter_menu_items[0]; #else server_menu_items[0].user_data = &server_filter_menu_items[0]; #endif #endif server_menu = create_menu (srvopt_menu_items, accel_group); server_info_menu = create_menu (srvinfo_menu_items, accel_group); source_menu = create_menu (source_ctree_popup_menu, accel_group); /* We will call set_server_filter_menu_list_text (); below after we have the filter status bar. It used to be here -baa */ player_menu = create_player_menu (accel_group); main_vbox = gtk_vbox_new (FALSE, 0); gtk_container_add (GTK_CONTAINER (main_window), main_vbox); /* Lazy way to get `copy to clipboard' feature working. * Don't gtk_widget_show() selection_manager widget! */ selection_manager = GTK_EDITABLE (gtk_text_new (NULL, NULL)); gtk_box_pack_start (GTK_BOX (main_vbox), GTK_WIDGET (selection_manager), FALSE, FALSE, 0); gtk_widget_realize (GTK_WIDGET (selection_manager)); handlebox = gtk_handle_box_new (); gtk_box_pack_start (GTK_BOX (main_vbox), handlebox, FALSE, FALSE, 0); menu_bar = create_menubar (menubar_menu_items, accel_group); // add server filters to menu server_filter_menu_items = g_array_new(FALSE,FALSE,sizeof(GtkWidget*)); gtk_menu_item_set_submenu (GTK_MENU_ITEM (server_serverfilter_menu_item), create_filter_menu()); gtk_signal_connect_object (GTK_OBJECT (file_quit_menu_item), "activate", GTK_SIGNAL_FUNC (gtk_widget_destroy), GTK_OBJECT (main_window)); gtk_check_menu_item_set_active ( GTK_CHECK_MENU_ITEM (view_hostnames_menu_item), show_hostnames); gtk_check_menu_item_set_active ( GTK_CHECK_MENU_ITEM (view_defport_menu_item), show_default_port); gtk_container_add (GTK_CONTAINER (handlebox), menu_bar); gtk_widget_show (menu_bar); gtk_widget_show (handlebox); vbox = gtk_vbox_new (FALSE, 4); gtk_container_set_border_width (GTK_CONTAINER (vbox), 4); gtk_box_pack_start (GTK_BOX (main_vbox), vbox, TRUE, TRUE, 0); /*FIXME_GTK2:*/ #ifdef USE_GTK2 main_toolbar = gtk_toolbar_new (); gtk_toolbar_set_orientation (GTK_TOOLBAR(main_toolbar),GTK_ORIENTATION_HORIZONTAL); gtk_toolbar_set_style (GTK_TOOLBAR(main_toolbar),GTK_TOOLBAR_BOTH); gtk_box_pack_start (GTK_BOX (main_vbox), main_toolbar, FALSE, FALSE, 0); // FIXME gtk_box_reorder_child(GTK_BOX (main_vbox), main_toolbar, 2); #else main_toolbar = gtk_toolbar_new (GTK_ORIENTATION_HORIZONTAL, GTK_TOOLBAR_BOTH); gtk_box_pack_start (GTK_BOX (vbox), main_toolbar, FALSE, FALSE, 0); #endif populate_main_toolbar (); gtk_widget_show (main_toolbar); pane1_widget = hpaned = gtk_hpaned_new (); gtk_box_pack_start (GTK_BOX (vbox), hpaned, TRUE, TRUE, 0); /* * Sources CTree */ scrollwin = gtk_scrolled_window_new (NULL, NULL); gtk_paned_add1 (GTK_PANED (hpaned), scrollwin); source_ctree = create_source_ctree (scrollwin); gtk_widget_show (source_ctree); gtk_signal_connect (GTK_OBJECT (source_ctree), "tree_select_row", GTK_SIGNAL_FUNC (source_ctree_selection_changed_callback), NULL); gtk_signal_connect (GTK_OBJECT (source_ctree), "tree_unselect_row", GTK_SIGNAL_FUNC (source_ctree_selection_changed_callback), NULL); gtk_signal_connect (GTK_OBJECT (source_ctree), "event", GTK_SIGNAL_FUNC (source_ctree_event_callback), NULL); gtk_widget_show (scrollwin); pane2_widget = vpaned = gtk_vpaned_new (); gtk_paned_add2 (GTK_PANED (hpaned), vpaned); /* * Server CList */ vbox2 = gtk_vbox_new (FALSE, 4); gtk_paned_add1 (GTK_PANED (vpaned), vbox2); hbox = gtk_hbox_new (FALSE, 4); button = gtk_button_new(); gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE); pixmap = gtk_pixmap_new (delete_pix.pix, delete_pix.mask); gtk_container_add(GTK_CONTAINER(button), pixmap); gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0); gtk_widget_show_all(button); label = gtk_label_new(_("Quick Filter:")); gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); gtk_widget_show (label); entry = gtk_entry_new(); gtk_signal_connect(GTK_OBJECT(entry), "changed", quick_filter_entry_changed, NULL); gtk_box_pack_start (GTK_BOX (hbox), entry, TRUE, TRUE, 0); gtk_widget_show (entry); gtk_signal_connect (GTK_OBJECT (button), "clicked", GTK_SIGNAL_FUNC (quickfilter_delete_button_clicked), entry); gtk_box_pack_start (GTK_BOX (vbox2), hbox, FALSE, FALSE, 0); gtk_widget_show (hbox); scrollwin = gtk_scrolled_window_new (NULL, NULL); gtk_box_pack_start (GTK_BOX (vbox2), scrollwin, TRUE, TRUE, 0); gtk_widget_show (vbox2); server_clist = GTK_CLIST (create_cwidget (scrollwin, &server_clist_def)); gtk_signal_connect (GTK_OBJECT (server_clist), "click_column", GTK_SIGNAL_FUNC (clist_set_sort_column), &server_clist_def); gtk_signal_connect (GTK_OBJECT (server_clist), "event", GTK_SIGNAL_FUNC (server_clist_event_callback), NULL); gtk_signal_connect (GTK_OBJECT (server_clist), "select_row", GTK_SIGNAL_FUNC (server_clist_select_callback), NULL); gtk_signal_connect (GTK_OBJECT (server_clist), "unselect_row", GTK_SIGNAL_FUNC (server_clist_unselect_callback), NULL); gtk_signal_connect (GTK_OBJECT (server_clist), "key_press_event", GTK_SIGNAL_FUNC (server_clist_keypress_callback), NULL); gtk_clist_set_compare_func (server_clist, (GtkCListCompareFunc) server_clist_compare_func); gtk_widget_show (GTK_WIDGET (server_clist)); gtk_widget_show (scrollwin); pane3_widget = hpaned2 = gtk_hpaned_new (); gtk_paned_add2 (GTK_PANED (vpaned), hpaned2); /* * Player CList */ scrollwin = gtk_scrolled_window_new (NULL, NULL); gtk_paned_add1 (GTK_PANED (hpaned2), scrollwin); player_clist = GTK_CLIST (create_cwidget (scrollwin, &player_clist_def)); gtk_signal_connect (GTK_OBJECT (player_clist), "click_column", GTK_SIGNAL_FUNC (clist_set_sort_column), &player_clist_def); gtk_signal_connect (GTK_OBJECT (player_clist), "event", GTK_SIGNAL_FUNC (player_clist_event_callback), NULL); gtk_clist_set_compare_func (player_clist, (GtkCListCompareFunc) player_clist_compare_func); gtk_widget_show (GTK_WIDGET (player_clist)); gtk_widget_show (scrollwin); /* * Server Info CList */ scrollwin = gtk_scrolled_window_new (NULL, NULL); gtk_paned_add2 (GTK_PANED (hpaned2), scrollwin); srvinf_ctree = GTK_CTREE (create_cwidget (scrollwin, &srvinf_clist_def)); gtk_signal_connect (GTK_OBJECT (srvinf_ctree), "click_column", GTK_SIGNAL_FUNC (clist_set_sort_column), &srvinf_clist_def); gtk_signal_connect (GTK_OBJECT (srvinf_ctree), "event", GTK_SIGNAL_FUNC (server_info_clist_event_callback), NULL); gtk_clist_set_compare_func (GTK_CLIST (srvinf_ctree), (GtkCListCompareFunc) srvinf_clist_compare_func); gtk_widget_show (GTK_WIDGET (srvinf_ctree)); gtk_widget_show (scrollwin); gtk_widget_show (hpaned2); gtk_widget_show (vpaned); gtk_widget_show (hpaned); gtk_widget_ensure_style (GTK_WIDGET (server_clist)); i = calculate_clist_row_height (GTK_WIDGET (server_clist), games[Q1_SERVER].pix->pix); gtk_clist_set_row_height (server_clist, i); gtk_clist_set_row_height (player_clist, i); gtk_clist_set_row_height (GTK_CLIST (srvinf_ctree), i); gtk_clist_set_row_height (GTK_CLIST (source_ctree), i); /* * Status Bar & Progress Bar */ hbox = gtk_hbox_new (FALSE, 4); gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0); main_status_bar = gtk_statusbar_new (); gtk_box_pack_start (GTK_BOX (hbox), main_status_bar, TRUE, TRUE, 0); #ifdef USE_GTK2 gtk_statusbar_set_has_resize_grip(GTK_STATUSBAR(main_status_bar), FALSE); #endif gtk_widget_show (main_status_bar); main_filter_status_bar = gtk_statusbar_new (); #ifdef USE_GTK2 gtk_statusbar_set_has_resize_grip(GTK_STATUSBAR(main_filter_status_bar), FALSE); #endif gtk_widget_set_usize (main_filter_status_bar, 100, -1); gtk_box_pack_start (GTK_BOX (hbox), main_filter_status_bar, TRUE, TRUE, 0); gtk_widget_show (main_filter_status_bar); main_progress_bar = create_progress_bar (); gtk_widget_set_usize (main_progress_bar, 200, -1); gtk_box_pack_end (GTK_BOX (hbox), main_progress_bar, FALSE, FALSE, 0); gtk_widget_show (main_progress_bar); /* Make sure the current filter is dispalyed and applied if needed */ set_server_filter_menu_list_text (); /*refresh optionmenu on toolbar*/ set_filter_option_menu_toolbar(); gtk_widget_show (hbox); gtk_widget_show (vbox); gtk_widget_show (main_vbox); restore_main_window_geometry (); window_set_icon(main_window); gtk_window_add_accel_group (GTK_WINDOW (main_window), accel_group); gtk_accel_group_unref (accel_group); // Set tooltips - also in prefs_load tooltips = gtk_tooltips_new (); if (default_toolbar_tips) gtk_tooltips_enable(tooltips); else gtk_tooltips_disable(tooltips); gtk_widget_grab_focus(entry); } void play_sound (const char *sound, gboolean override) { play_sound_with(sound_player, sound, override); } void play_sound_with (const char* player, const char *sound, gboolean override) { int pid; if(!sound || !*sound) { return; } if(!sound_enable && !override) { debug(2,"sound disabled - not playing"); return; } if(!player || !*player) { xqf_warning(_("no sound player configured")); return; } pid = fork(); if (pid == 0) { char *argv[3]; argv[0] = g_strdup(player); if(sound[0] != '/') { // Does not start with a / so prepend user_rcdir debug(1,"Prepending user_rcdir to sound file"); argv[1] = file_in_dir(user_rcdir, sound); } else { argv[1] = g_strdup(sound); } argv[2] = NULL; debug(1,"sound player (program): %s",argv[0]); debug(1,"sound to play: %s",argv[1]); execvp(argv[0],argv); g_free (argv[1]); _exit (1); } } static void cmdlinehelp() { puts("XQF Version " PACKAGE_VERSION); puts(_( "Usage:\n" "\txqf [OPTIONS]\n" "\n" "OPTIONS:\n" "\t--launch \"[SERVERTYPE] IP\"\tlaunch game on specified server\n" "\t--add \"[SERVERTYPE] IP\"\tadd specified server to favorites\n" "\t--debug \t\t\tset debug level\n" "\t--version\t\t\tprint version and exit\n")); exit(0); } static char* cmdline_add_server = NULL; static gboolean cmdline_launch = FALSE; static gboolean cmdline_newversion = FALSE; // must always return FALSE to stop g_timeout gboolean check_cmdline_launch(gpointer nothing) { char* token[2] = {0}; enum server_type type = UNKNOWN_SERVER; unsigned n = 0; char* addrstring = NULL; // must point to a copy if(!cmdline_add_server) return FALSE; n = tokenize_bychar(cmdline_add_server, token, 2, ' '); if (n == 2) // type and address given { type = id2type(token[0]); if (type == UNKNOWN_SERVER) { addrstring = add_server_dialog (&type, token[1]); } else { addrstring = g_strdup(token[1]); } } else if (n == 1) // only address { char *addr; unsigned short port; unsigned matches = 0; if (!parse_address (token[0], &addr, &port)) { dialog_ok (NULL, _("\"%s\" is not valid host[:port] combination."), token[0]); g_free(cmdline_add_server); return FALSE; } if(port) // guess the type from the port { unsigned i = 0; for (i = 0; i < GAMES_TOTAL; i++) { if (games[i].default_port == port) { ++matches; if (type == UNKNOWN_SERVER) type = i; } } } if(!port || type == UNKNOWN_SERVER || matches > 1) { addrstring = add_server_dialog (&type, token[0]); } else { addrstring = g_strdup(cmdline_add_server); } } prepare_new_server_to_favorites(type, addrstring, cmdline_launch); g_free(cmdline_add_server); return FALSE; } static struct option long_options[] = { {"launch", 1, 0, 'l'}, {"add", 1, 0, 'a'}, {"debug", 1, 0, 'd'}, {"dontlaunch", 0, 0, 128}, {"version", 0, 0, 'v'}, {"help", 0, 0, 'h'}, {"newversion", 0, 0, 129}, {"nomapscan", 0, 0, 130}, {0, 0, 0, 0} }; static void parse_commandline(int argc, char* argv[]) { while (1) { int c; int option_index = 0; c = getopt_long (argc, argv, "d:l:h", long_options, &option_index); if (c == -1) break; switch(c) { case 'd': set_debug_level(atoi(optarg)); break; case 'l': g_free(cmdline_add_server); cmdline_add_server = g_strdup(optarg); cmdline_launch = TRUE; break; case 'a': g_free(cmdline_add_server); cmdline_add_server = g_strdup(optarg); break; case 'h': cmdlinehelp(); break; case 'v': puts("XQF Version " PACKAGE_VERSION); exit(0); break; case 128: dontlaunch = TRUE; break; case 129: cmdline_newversion = TRUE; break; case 130: skip_startup_mapscan = TRUE; break; case '?': case ':': exit(1); break; default: xqf_warning("getopt error, starting anyway ..."); return; } } } void add_pixmap_path_for_theme(const char* theme) { char dir[PATH_MAX]; snprintf(dir, sizeof(dir), "%s/%s", xqf_PACKAGE_DATA_DIR, theme); add_pixmap_directory (dir); snprintf(dir, sizeof(dir), "%s/.local/share/xqf/%s", g_get_home_dir(), theme); add_pixmap_directory (dir); } static void init_config_path() { char dir[PATH_MAX]; config_add_dir (xqf_PACKAGE_DATA_DIR); snprintf(dir, sizeof(dir), "%s/.local/share/xqf", g_get_home_dir()); config_add_dir (dir); config_add_dir (user_rcdir); } static void init_scripts_path() { char dir[PATH_MAX]; snprintf(dir, sizeof(dir), "%s/scripts", xqf_PACKAGE_DATA_DIR); scripts_add_dir (dir); snprintf(dir, sizeof(dir), "%s/.local/share/xqf/scripts", g_get_home_dir()); scripts_add_dir (dir); snprintf(dir, sizeof(dir), "%s/scripts", user_rcdir); scripts_add_dir (dir); } int main (int argc, char *argv[]) { char *gtk_config; char* var = NULL; int newversion = FALSE; xqf_start_time = time (NULL); redialserver=0; var = getenv("xqf_PACKAGE_DATA_DIR"); if(var) xqf_PACKAGE_DATA_DIR = var; var = getenv("xqf_LOCALEDIR"); if(var) xqf_LOCALEDIR = var; #ifdef ENABLE_NLS setlocale(LC_ALL, ""); bindtextdomain(PACKAGE, xqf_LOCALEDIR); #ifdef USE_GTK2 bind_textdomain_codeset(PACKAGE, "UTF-8"); #endif textdomain(PACKAGE); #endif set_debug_level (DEFAULT_DEBUG_LEVEL); debug (5, "main() -- Debug Level Default Set at %d", DEFAULT_DEBUG_LEVEL); if (!init_user_info ()) { return 1; } gtk_config = file_in_dir (user_rcdir, "gtkrc"); gtk_rc_add_default_file (gtk_config); g_free (gtk_config); gtk_init (&argc, &argv); parse_commandline(argc,argv); if (dns_spawn_helper () < 0) { xqf_error ("Unable to start DNS helper"); return 1; } add_pixmap_path_for_theme("default"); qstat_configfile = g_strconcat(xqf_PACKAGE_DATA_DIR, "/qstat.cfg", NULL); dns_gtk_init (); rc_check_dir (); init_games(); init_config_path(); newversion = prefs_load () | cmdline_newversion; if(default_icontheme) add_pixmap_path_for_theme(default_icontheme); init_scripts_path(); scripts_load(); #ifdef USE_GEOIP geoip_init(); #endif gtk_preview_set_gamma (1.5); props_load (); filters_init (); host_cache_load (); splash_increase_progress(_("Reading server lists"),10); init_masters (newversion); client_init (); ignore_sigpipe (); on_sig(SIGUSR1, sighandler_debug); on_sig(SIGUSR2, sighandler_debug); add_server_init (); add_master_init (); psearch_init (); rcon_init (); if(check_qstat_version() == FALSE) { dialog_ok(NULL, _("You need at least qstat version %s for xqf to function properly"), required_qstat_version); } splash_increase_progress(_("Loading icons ..."),10); create_main_window (); init_pixmaps (main_window); splash_set_progress(_("Starting ..."),100); play_sound(sound_xqf_start, 0); script_action_start(); populate_main_window(); if (default_show_tray_icon) tray_init(main_window); else gtk_widget_show (main_window); source_ctree_select_source (favorites); filter_menu_activate_current(); print_status (main_status_bar, NULL); if (default_auto_favorites && !cmdline_add_server) refresh_callback (NULL, NULL); destroy_splashscreen(); g_timeout_add(0, check_cmdline_launch, NULL); debug(1,"startup time %ds", time(NULL)-xqf_start_time); // tray_icon_set_tooltip(_("nothing yet...")); gtk_main (); play_sound(sound_xqf_quit, 0); script_action_quit(); if (default_show_tray_icon) tray_done(); unregister_window (main_window); main_window = NULL; if (stat_process) stop_callback (NULL, NULL); debug (1, "total servers: %d", servers_total ()); debug (1, "total uservers: %d", uservers_total ()); debug (1, "total hosts: %d", hosts_total ()); #if 0 if (servers_total () > 0) { GSList *list = all_servers (); /* Debug code, free done in two lines */ server_list_fprintf (stderr, list); server_list_free (list); } #endif if (server_menu) { debug( 6, "EXIT: destroy server_menu"); gtk_widget_destroy (server_menu); server_menu = NULL; } if (player_menu) { debug( 6, "EXIT: destroy player_menu"); gtk_widget_destroy (player_menu); player_menu = NULL; } if (player_skin_popup) { gtk_widget_destroy (player_skin_popup); player_skin_popup = NULL; } if (server_mapshot_popup) { gtk_widget_destroy (server_mapshot_popup); server_mapshot_popup = NULL; } pixmap_cache_clear (&qw_colors_pixmap_cache, 0); pixmap_cache_clear (&server_pixmap_cache, 0); free_pixmaps (); filters_done (); props_free_all (); debug( 6, "EXIT: Free Server Lists"); g_slist_free (cur_source); server_list_free (cur_server_list); userver_list_free (cur_userver_list); if (cur_server) { server_unref (cur_server); cur_server = NULL; } host_cache_save (); host_cache_clear (); debug( 6, "EXIT: Free Master Lists"); free_masters (); debug( 6, "EXIT: Call rcon_done."); rcon_done (); psearch_done (); add_server_done (); add_master_done (); client_detach_all (); free_user_info (); dns_helper_shutdown (); config_sync (); config_drop_all (); #ifdef USE_GEOIP geoip_done(); #endif games_done(); debug( 6, "EXIT: Done."); return 0; } xqf-1.0.5/src/xqf.h0000644002404400000620000001710210445245313010770 00000000000000/* XQF - Quake server browser and launcher * Copyright (C) 1998-2000 Roman Pozlevich * * 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 */ #ifndef __XQF_H__ #define __XQF_H__ #include "gnuconfig.h" /* GNU autoconf */ #include #include /* struct in_addr */ #include /* struct in_addr */ #include /* time_t */ #include #include #define RC_DIR ".qf" #define RC_FILE "qfrc" #define CONFIG_FILE "config" #define SERVERS_FILE "servers" #define PLAYERS_FILE "players" #define HOSTCACHE_FILE "hostcache" #define EXEC_CFG "frontend.cfg" #define PASSWORD_CFG "__passwd.cfg" #define LAUNCHINFO_FILE "LaunchInfo.txt" #define MAX_PING 9999 #define MAX_RETRIES 10 #define Q1_DEFAULT_PORT 26000 /* Quake */ #define QW_DEFAULT_PORT 27500 /* QuakeWorld */ #define Q2_DEFAULT_PORT 27910 /* Quake2 */ #define Q3_DEFAULT_PORT 27960 /* Quake3: Arena */ #define WO_DEFAULT_PORT 27960 /* Wolfenstein */ #define EF_DEFAULT_PORT 27960 /* Voyager Elite Force */ #define H2_DEFAULT_PORT 26900 /* Hexen2 */ #define HW_DEFAULT_PORT 26950 /* HexenWorld */ #define SN_DEFAULT_PORT 22450 /* Sin */ #define HL_DEFAULT_PORT 27015 /* Half-Life */ #define KP_DEFAULT_PORT 31510 /* Kingpin */ #define SFS_DEFAULT_PORT 28910 /* Soldier of Fortune */ #define SOF2S_DEFAULT_PORT 20100 /* Soldier of Fortune 2 */ #define T2_DEFAULT_PORT 28000 /* Tribes 2 */ #define HR_DEFAULT_PORT 28910 /* Heretic2 */ #define UN_DEFAULT_PORT 7777 /* Unreal */ #define AAO_DEFAULT_PORT 1716 /* AAO */ #define UT2_DEFAULT_PORT 7777 /* Unreal Tournament 2003 */ #define GPS_DEFAULT_PORT 27888 /* Gamespy Generic */ #define DESCENT3_DEFAULT_PORT 2092 /* Descent 3 */ #define QWM_DEFAULT_PORT 27000 /* QuakeWorld */ #define Q2M_DEFAULT_PORT 27900 /* Quake2 master */ #define Q3M_DEFAULT_PORT 27950 /* Quake3 master */ #define WOM_DEFAULT_PORT 27950 /* Wolfenstein master */ #define HLM_DEFAULT_PORT 27010 /* Half-Life master */ #define D3M_DEFAULT_PORT 3445 /* Descent 3 master */ #define EFM_DEFAULT_PORT 27953 /* Elite Force master */ #define T2M_DEFAULT_PORT 28000 /* Tribes 2 */ #define SOF2M_DEFAULT_PORT 20110 /* Soldier of Fortune 2 */ /* max 0x8000, server->flags is unsigned */ enum server_flags { PLAYER_GROUP_RED = 0x001, PLAYER_GROUP_GREEN = 0x002, PLAYER_GROUP_BLUE = 0x004, PLAYER_GROUP_MASK = 0x007, SERVER_CHEATS = 0x008, SERVER_PASSWORD = 0x010, SERVER_SP_PASSWORD = 0x020, SERVER_SPECTATE = 0x040, SERVER_PUNKBUSTER = 0x080, SERVER_INCOMPATIBLE = 0x100 }; enum launch_mode { LAUNCH_NORMAL, LAUNCH_SPECTATE, LAUNCH_RECORD }; // note: there is a limit of 256 servers, see get_server_pixmap in srv-list.c enum server_type { Q1_SERVER = 0, QW_SERVER, Q2_SERVER, Q3_SERVER, Q4_SERVER, WO_SERVER, WOET_SERVER, DOOM3_SERVER, EF_SERVER, H2_SERVER, HW_SERVER, SN_SERVER, HL_SERVER_OLD, HL_SERVER, HL2_SERVER, KP_SERVER, SFS_SERVER, SOF2S_SERVER, T2_SERVER, HR_SERVER, UN_SERVER, UT2_SERVER, UT2004_SERVER, RUNE_SERVER, POSTAL2_SERVER, AAO_SERVER, DESCENT3_SERVER, SSAM_SERVER, SSAMSE_SERVER, MOHAA_SERVER, COD_SERVER, SAS_SERVER, BF1942_SERVER, JK3_SERVER, NETP_SERVER, NEXUIZ_SERVER, WARSOW_SERVER, TREMULOUS_SERVER, GPS_SERVER, UNKNOWN_SERVER }; #define GAMES_TOTAL UNKNOWN_SERVER enum master_state { SOURCE_NA = 0, SOURCE_UP, SOURCE_DOWN, SOURCE_TIMEOUT, SOURCE_ERROR }; enum master_query_type { MASTER_NATIVE=0, MASTER_GAMESPY, MASTER_HTTP, MASTER_LAN, MASTER_FILE, MASTER_GSLIST, MASTER_NUM_QUERY_TYPES, MASTER_INVALID_TYPE }; /** * A player. There is no destructor for this struct. Alloc as many data as you * need at once and have the pointers point inside. */ struct player { char *name; char *skin; char *model; int time; short frags; short ping; unsigned char shirt; unsigned char pants; unsigned char flags; }; struct host { char *name; struct in_addr ip; time_t refreshed; int ref_count; }; /** server_new, server_free_info, server_move_info must be adapted for * changes to this structure */ struct server { struct host *host; char *name; char *map; char **info; char *game; /** pointer into info, do not free */ char *gametype; /** pointer into info, do not free */ GSList *players; /** GSList */ #ifdef USE_GEOIP int country_id; #endif unsigned flags; unsigned flt_last; /** time of the last filtering */ time_t refreshed; time_t last_answer; /** time of last reply from server */ int ref_count; enum server_type type; unsigned short port; unsigned short maxplayers; unsigned short curplayers; unsigned short curbots; unsigned short private_client; /** number of private clients */ short ping; short retries; char sv_os; /** L = Linux, W = windows, M = Mac */ unsigned char filters; unsigned char flt_mask; }; struct userver { char *hostname; struct server *s; int ref_count; unsigned short port; unsigned char type; /* enum server_type type; */ }; typedef struct { int portadjust; /* value added to port */ char* gsmtype; /* type for gslist master */ } QFMasterOptions; typedef struct master { char *name; enum server_type type; int isgroup; /* is it a real master or master group? */ int user; /* is it added or edited by user? */ QFMasterOptions options; struct host *host; unsigned short port; char *hostname; /* unresolved hostname */ char *url; GSList *servers; GSList *uservers; enum master_state state; GSList *masters; enum master_query_type master_type; /** private */ char* _qstat_master_option; // optional override from games[type].qstat_master_option } QFMaster; char* master_qstat_option(struct master* m); void master_set_qstat_option(struct master* m, const char* opt); char* master_to_url(QFMaster* m); extern time_t xqf_start_time; extern char* xqf_PACKAGE_DATA_DIR; extern char* xqf_LOCALEDIR; extern char* xqf_PIXMAPSDIR; extern char* qstat_configfile; extern GSList *cur_source; /* GSList */ extern GSList *cur_server_list; /* GSList */ extern GSList *cur_userver_list; /* GSList */ extern struct server *cur_server; extern struct stat_job *stat_process; int compare_qstat_version ( const char* have, const char* expected ); int start_prog_and_return_fd(char *const argv[], pid_t *pid); int check_qstat_version(void); void play_sound (const char *sound, gboolean override); void play_sound_with (const char* player, const char *sound, gboolean override); extern void reset_main_status_bar(void); //extern int filter_start_index; extern int event_type; extern int dontlaunch; extern void refresh_source_list (void); extern void update_source_callback (GtkWidget *widget, gpointer data); extern void refresh_n_server(GtkWidget * button, gpointer *data); extern void stop_callback (GtkWidget *widget, gpointer data); #endif /* __XQF_H__ */ xqf-1.0.5/src/q3maps.c0000644002404400000620000004226110335365404011377 00000000000000/* XQF - Quake server browser and launcher * Functions for finding installed q1-q3&clones maps * Copyright (C) 2002 Ludwig Nussel * * 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 */ #include "gnuconfig.h" #include #include #include #include #include #include #include #include #include "debug.h" #include "utils.h" #include "zip/unzip.h" #include "q3maps.h" struct q3mapinfo { char* zipfile; // may be NULL char* levelshot; }; static GSList* shotslist = NULL; // temporary /** pak file code ripped from q2 */ typedef unsigned char byte; #define IDPAKHEADER (('K'<<24)+('C'<<16)+('A'<<8)+'P') typedef struct { char name[56]; int filepos, filelen; } dpackfile_t; typedef struct { int ident; // == IDPAKHEADER int dirofs; int dirlen; } dpackheader_t; static inline int LittleLong (int l) { #if BYTE_ORDER == BIG_ENDIAN byte b1,b2,b3,b4; b1 = l&255; b2 = (l>>8)&255; b3 = (l>>16)&255; b4 = (l>>24)&255; return ((int)b1<<24) + ((int)b2<<16) + ((int)b3<<8) + b4; #else return l; #endif } static void findmaps_pak(const char* packfile, GHashTable* maphash) { dpackheader_t header; int numpackfiles; int fd; dpackfile_t info; fd = open(packfile, O_RDONLY); if (fd < 0) { perror(packfile); return; } if(read (fd, &header, sizeof(header))<0) { perror(packfile); return; } if (LittleLong(header.ident) != IDPAKHEADER) { debug(0,"%s is not a packfile\n", packfile); return; } header.dirofs = LittleLong (header.dirofs); header.dirlen = LittleLong (header.dirlen); numpackfiles = header.dirlen / sizeof(dpackfile_t); // printf ("packfile %s (%i files)\n", packfile, numpackfiles); if(lseek (fd, header.dirofs, SEEK_SET)==-1) { perror(packfile); return; } while(read (fd,&info, sizeof(dpackfile_t))>0) { if(!strncmp(info.name,"maps/",5) && !strcmp(info.name+strlen(info.name)-4,".bsp")) { // s#maps/(.*)\.bsp#\1# char* mapname=g_strndup(info.name+5,strlen(info.name)-4-5); g_strdown(mapname); if(g_hash_table_lookup(maphash,mapname)) { g_free(mapname); } else { g_hash_table_insert(maphash,mapname,GUINT_TO_POINTER(-1)); } } } close(fd); return; } /** return pointer to last two path entries */ static inline const char* last_two_entries(const char* name) { const char *l = name; l = strrchr(l, '/'); if(l && l != name) { const char *n = name; while(n != l) { ++n; name = n; n = strchr(n, '/'); } } else return NULL; return name; } static gboolean is_q3_mapshot(const char* name) { debug(4, "check %s", name); if(*name == '/') name = last_two_entries(name); if(!name) return FALSE; if(g_strncasecmp(name,"levelshots/",11)) return FALSE; if (!g_strcasecmp(name+strlen(name)-4,".jpg") || !g_strcasecmp(name+strlen(name)-4,".tga")) { return TRUE; } return FALSE; } // must free static char* is_q3_map(const char* name) { if (!g_strncasecmp(name,"maps/",5) && !g_strcasecmp(name+strlen(name)-4,".bsp")) { const char* basename = g_basename(name); return g_strndup(basename,strlen(basename)-4); } return NULL; } // must free static gboolean is_doom3_mapshot(const char* name) { if(g_strncasecmp(name,"guis/assets/splash/",19)) return FALSE; if (!g_strcasecmp(name+strlen(name)-4,".jpg") || !g_strcasecmp(name+strlen(name)-4,".tga")) { return TRUE; } return FALSE; } static char* is_doom3_map(const char* name) { if (!g_strncasecmp(name,"maps/game/",10) && !g_strcasecmp(name+strlen(name)-4,".map")) { const char* basename = g_basename(name); return g_strndup(basename,strlen(basename)-4); } return NULL; } // must free static gboolean is_quake4_mapshot(const char* name) { if(g_strncasecmp(name,"gfx/guis/loadscreens/",21)) return FALSE; if (!g_strcasecmp(name+strlen(name)-4,".jpg") || !g_strcasecmp(name+strlen(name)-4,".tga")) { return TRUE; } return FALSE; } static char* is_quake4_map(const char* name) { if (!g_strncasecmp(name,"maps/",5) && !g_strcasecmp(name+strlen(name)-4,".map")) { const char* basename = g_basename(name); return g_strndup(basename,strlen(basename)-4); } return NULL; } static gboolean if_map_insert(const char* path, GHashTable* maphash, char* (*is_map_func)(const char* name)) { char* name = NULL; if((name = is_map_func(path))) { // s#maps/(.*)\.bsp#\1# g_strdown(name); if(g_hash_table_lookup(maphash,name)) { g_free(name); } else { g_hash_table_insert(maphash,name,GUINT_TO_POINTER(-1)); } return TRUE; } return FALSE; } static gboolean if_shot_insert(const char* path, gboolean (*is_mapshot_func)(const char* name), const char* zipfile) { // debug(0, "check (%d) %s", (int)(zipfile!=NULL), path); if(is_mapshot_func(path)) { struct q3mapinfo* mi = NULL; size_t psize = 0, nsize; nsize = strlen(path)+1; if(zipfile) psize = strlen(zipfile)+1; mi = g_malloc0(sizeof(struct q3mapinfo) + psize + nsize); if(!mi) return TRUE; if(zipfile) { mi->zipfile=(char*)mi+sizeof(struct q3mapinfo); strcpy(mi->zipfile,zipfile); } mi->levelshot=(char*)mi+sizeof(struct q3mapinfo)+psize; strcpy(mi->levelshot,path); shotslist = g_slist_prepend(shotslist,mi); // debug(0,"found shot %s",mi->levelshot); return TRUE; } return FALSE; } /** open zip file and insert all contained .bsp into maphash */ static void findq3maps_zip(const char* zipfile, GHashTable* maphash, char* (*is_map_func)(const char* name), gboolean (*is_mapshot_func)(const char* name)) { unzFile f; int ret; enum { bufsize = 256 }; char buf[bufsize] = {0}; if(!zipfile || !maphash || !is_map_func || !is_mapshot_func) return; f=unzOpen(zipfile); if(!f) { xqf_warning("could not open zip file %s",zipfile); return; } for (ret = unzGoToFirstFile(f); ret == UNZ_OK; ret = unzGoToNextFile(f)) { if(unzGetCurrentFileInfo(f,NULL,buf,bufsize,NULL,0,NULL,0) == UNZ_OK) { if(if_map_insert(buf, maphash, is_map_func)) { } if(if_shot_insert(buf, is_mapshot_func, zipfile)) { } } } if(unzClose(f) != UNZ_OK) { debug(0,"couldn't close file %s",zipfile); } } gboolean quake_contains_dir(const char* name, int level, GHashTable* maphash) { size_t len; // printf("directory %s at level %d\n",name,level); if(level == 0) return TRUE; len = strlen(name); if(level == 1 && len > 4 && !g_strcasecmp(name+len-4,"maps")) return TRUE; if(level == 1 && len > 10 && !g_strcasecmp(name+len-10,"levelshots")) return TRUE; return FALSE; } void quake_contains_file( const char* name, int level, GHashTable* maphash) { // printf("%s at level %d\n",name,level); if(strlen(name)>4 && !g_strcasecmp(name+strlen(name)-4,".pak") && level == 1) { findmaps_pak(name,maphash); } if(strlen(name)>4 && !g_strcasecmp(name+strlen(name)-4,".bsp") && level == 2) { const char* basename = g_basename(name); char* mapname=g_strndup(basename,strlen(basename)-4); g_strdown(mapname); if(g_hash_table_lookup(maphash,mapname)) { g_free(mapname); } else { g_hash_table_insert(maphash,mapname,GUINT_TO_POINTER(-1)); } } } void q3_contains_file(const char* name, int level, GHashTable* maphash) { // printf("%s at level %d\n",name,level); if( level == 1 && !g_strcasecmp(name+strlen(name)-4,".pk3") && strlen(name) > 4) { findq3maps_zip(name, maphash, is_q3_map, is_q3_mapshot); } else if( level == 2 && if_map_insert(name, maphash, is_q3_map)) { } else if( level == 2 && if_shot_insert(name, is_q3_mapshot, NULL)) { } } static void _doom3_contains_file(const char* name, int level, GHashTable* maphash, char* (*is_map_func)(const char* name), gboolean (*is_mapshot_func)(const char* name)) { // printf("%s at level %d\n",name,level); if( level == 1 && !g_strcasecmp(name+strlen(name)-4,".pk4") && strlen(name) > 4) { findq3maps_zip(name, maphash, is_map_func, is_mapshot_func); } } void doom3_contains_file(const char* name, int level, GHashTable* maphash) { _doom3_contains_file(name, level, maphash, is_doom3_map, is_doom3_mapshot); } void quake4_contains_file(const char* name, int level, GHashTable* maphash) { _doom3_contains_file(name, level, maphash, is_quake4_map, is_quake4_mapshot); } /** * traverse directory tree starting at startdir. Calls found_file for each file * and found_dir for each directory (non-recoursive). Note: There is no loop * detection so make sure found_dir returns false at some level. **/ void traverse_dir(const char* startdir, FoundFileFunction found_file, FoundDirFunction found_dir, gpointer data) { DIR* dir = NULL; struct dirent* dire = NULL; char* curdir = NULL; GSList* dirstack = NULL; typedef struct { char* name; int level; } DirStackEntry; DirStackEntry* dse; if(!startdir || !found_dir || !found_file) return; dse = g_new0(DirStackEntry,1); dse->name=g_strdup(startdir); dirstack = g_slist_prepend(dirstack,dse); while(dirstack) { GSList* current = dirstack; dirstack = g_slist_remove_link(dirstack,dirstack); dse = current->data; curdir = dse->name; dir = opendir(curdir); if(!dir) { perror(curdir); g_free(curdir); g_free(dse); continue; } while((dire = readdir(dir))) { char* name = dire->d_name; struct stat statbuf; if(!strcmp(name,".") || !strcmp(name,"..")) continue; name = g_strconcat(curdir,"/",name,NULL); if(lstat(name,&statbuf)) { perror(name); g_free(name); continue; } if(S_ISDIR(statbuf.st_mode)) { if(found_dir(name, dse->level, data)) { DirStackEntry* tmpdse = g_new0(DirStackEntry,1); tmpdse->name=name; tmpdse->level=dse->level+1; dirstack = g_slist_prepend(dirstack,tmpdse); } else { g_free(name); } } else { found_file(name, dse->level, data); g_free(name); } } closedir(dir); g_free(curdir); g_free(dse); } } static gboolean maphashforeachremovefunc(gpointer key, gpointer value, gpointer user_data) { g_free(key); if(value && value!=GINT_TO_POINTER(-1)) g_free(value); return TRUE; } /** free all keys and destroy maphash */ void q3_clear_maps(GHashTable* maphash) { if(!maphash) return; g_hash_table_foreach_remove(maphash, maphashforeachremovefunc, NULL); g_hash_table_destroy(maphash); } /** create map hash */ GHashTable* q3_init_maphash() { return g_hash_table_new(g_str_hash,g_str_equal); } /** return true if mapname is contained in maphash, false otherwise */ gboolean q3_lookup_map(GHashTable* maphash, const char* mapname) { if(g_hash_table_lookup(maphash,mapname)) return TRUE; return FALSE; } /** return true if mapname is contained in maphash, false otherwise */ gboolean doom3_lookup_map(GHashTable* maphash, const char* mapname) { if(g_hash_table_lookup(maphash,g_basename(mapname))) return TRUE; return FALSE; } /***************/ static size_t readimagefromzip(guchar** buf, const char* zipfile, const char* filename) { unzFile zf; int ret; int error = 0; size_t buflen = 0; unz_file_info info; g_return_val_if_fail(zipfile!=NULL,0); g_return_val_if_fail(filename!=NULL,0); zf = unzOpen(zipfile); g_return_val_if_fail(zf!=NULL,0); do { ret = unzLocateFile(zf,filename,2); if(ret!=UNZ_OK) { g_warning("unable to locate %s inside zip archive %s\n",filename,zipfile); error = 1; break; } ret = unzOpenCurrentFile(zf); if(ret!=UNZ_OK) { g_warning("unable to open %s inside zip archive %s\n",filename,zipfile); error = 1; break; } ret = unzGetCurrentFileInfo(zf,&info,NULL,0,NULL,0,NULL,0); if(ret!=UNZ_OK || info.uncompressed_size <= 0) { g_warning("unable to retrieve info on %s inside zip archive %s\n",filename,zipfile); error = 1; break; } buflen = info.uncompressed_size; *buf = g_malloc0(buflen); if(!*buf) { g_error("out of memory"); error = 1; break; } ret = unzReadCurrentFile(zf,*buf,buflen); if(ret<=0) { g_warning("unable read %s inside zip archive %s\n",filename,zipfile); error = 1; break; } ret = unzCloseCurrentFile(zf); if(ret==UNZ_CRCERROR) { g_warning("CRC Error: %s inside zip archive %s\n",filename,zipfile); error = 1; break; } } while(0); unzClose(zf); if(!error) return buflen; g_free(*buf); *buf=NULL; return 0; } /***************/ /** return true if mapname is contained in maphash, false otherwise */ size_t q3_lookup_mapshot(GHashTable* maphash, const char* mapname, guchar** buf) { struct q3mapinfo* mi = g_hash_table_lookup(maphash,mapname); if(mi && mi != GINT_TO_POINTER(-1)) { if(!mi->zipfile) { size_t size; *buf = (guchar*)load_file_mem(mi->levelshot, &size); return size; } else return readimagefromzip(buf,mi->zipfile,mi->levelshot); } return 0; } /** return true if mapname is contained in maphash, false otherwise same as q3_lookup_mapshot except that the basename of the map is used */ size_t doom3_lookup_mapshot(GHashTable* maphash, const char* mapname, guchar** buf) { struct q3mapinfo* mi = g_hash_table_lookup(maphash,g_basename(mapname)); if(mi && mi != GINT_TO_POINTER(-1) && mi->zipfile) { return readimagefromzip(buf,mi->zipfile,mi->levelshot); } return 0; } static void process_levelshots(GHashTable* maphash) { GSList* ptr; for(ptr=shotslist;ptr;ptr=g_slist_next(ptr)) { struct q3mapinfo* mi = ptr->data; struct q3mapinfo* mih = NULL; char* mapname = NULL; const char* mapbase = NULL; char* origkey = NULL; gboolean found = FALSE; if(!mi->levelshot || strlen(mi->levelshot) <= 4 ) { g_free(mi); continue; } mapbase = g_basename(mi->levelshot); mapname = g_strndup(mapbase,strlen(mapbase)-4); g_strdown(mapname); found = g_hash_table_lookup_extended(maphash,mapname,(gpointer)&origkey,(gpointer)&mih); if(found != TRUE || mih != GINT_TO_POINTER(-1)) // not in hash or mapinfo alread defined { // debug(0,"drop shot %s %p",mapname,mih); g_free(mi); } else { // debug(0,"insert shot %s",mapname); g_hash_table_insert(maphash,origkey,mi); } g_free(mapname); } g_slist_free(shotslist); shotslist=NULL; } void findq3maps(GHashTable* maphash, const char* startdir) { traverse_dir(startdir, (FoundFileFunction)q3_contains_file, (FoundDirFunction)quake_contains_dir, maphash); process_levelshots(maphash); } void findquakemaps(GHashTable* maphash, const char* startdir) { traverse_dir(startdir, (FoundFileFunction)quake_contains_file, (FoundDirFunction)quake_contains_dir, maphash); } void finddoom3maps(GHashTable* maphash, const char* startdir) { traverse_dir(startdir, (FoundFileFunction)doom3_contains_file, (FoundDirFunction)quake_contains_dir, maphash); process_levelshots(maphash); } void findquake4maps(GHashTable* maphash, const char* startdir) { traverse_dir(startdir, (FoundFileFunction)quake4_contains_file, (FoundDirFunction)quake_contains_dir, maphash); process_levelshots(maphash); } #if 0 // gcc -g -Wall -O0 `glib-config --cflags` `glib-config --libs` -lz -o listq3maps q3maps.c zip/*.c debug.c static void maphashforeachfunc(char* key, gpointer value, gpointer user_data) { printf("%s ",key); } static void q3_print_maps(GHashTable* maphash) { g_hash_table_foreach(maphash, (GHFunc) maphashforeachfunc, NULL); printf("\n"); } int main (void) { GHashTable* maphash = NULL; maphash = q3_init_maphash(); // traverse_dir("/usr/local/games/quake3", (FoundFileFunction)q3_contains_file, (FoundDirFunction)quake_contains_dir, maphash); // traverse_dir("/home/madmax/.q3a", (FoundFileFunction)q3_contains_file, (FoundDirFunction)quake_contains_dir, maphash); // traverse_dir("/usr/share/games/quakeforge", (FoundFileFunction)quake_contains_file, (FoundDirFunction)quake_contains_dir, maphash); // traverse_dir("/usr/share/games/quake2", (FoundFileFunction)quake_contains_file, (FoundDirFunction)quake_contains_dir, maphash); traverse_dir("/usr/local/games/hl", (FoundFileFunction)quake_contains_file, (FoundDirFunction)quake_contains_dir, (gpointer)maphash); q3_print_maps(maphash); printf("%d\n",q3_lookup_map(maphash,"blub")); printf("%d\n",q3_lookup_map(maphash,"q3dm1")); q3_clear_maps(maphash); return 0; } #endif xqf-1.0.5/src/q3maps.h0000644002404400000620000000507210322272110011366 00000000000000/* XQF - Quake server browser and launcher * Functions for finding installed q3 maps * Copyright (C) 2002 Ludwig Nussel * * 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 */ #ifndef Q3MAPS_H #define Q3MAPS_H #include /** * name is the full path of a file at found at level l */ typedef void (*FoundFileFunction)(const char* name, int l, gpointer data); /** * the current directory which is at level l contains directory name. * return TRUE if this directory should be visited, false otherwise */ typedef gboolean (*FoundDirFunction)(const char* name, int l, gpointer data); /** free all keys and destroy maphash */ void q3_clear_maps(GHashTable* maphash); /** create map hash */ GHashTable* q3_init_maphash(); /** return true if mapname is contained in maphash, false otherwise */ gboolean q3_lookup_map(GHashTable* maphash, const char* mapname); /** return true if mapname is contained in maphash, false otherwise * same as q3_lookup_mapshot except operates on basename of mapname */ gboolean doom3_lookup_map(GHashTable* maphash, const char* mapname); /** acquire image data, function allocates space in buf, returns size. buf must * be freed by caller */ size_t q3_lookup_mapshot(GHashTable* maphash, const char* mapname, guchar** buf); /** acquire image data, function allocates space in buf, returns size. buf must * be freed by caller * * same as q3_lookup_mapshot except operates on basename of mapname */ size_t doom3_lookup_mapshot(GHashTable* maphash, const char* mapname, guchar** buf); /** * find all maps in .pk3 files one level under startdir */ void findq3maps(GHashTable* maphash, const char* startdir); /** * find all maps in .pk4 files one level under startdir */ void finddoom3maps(GHashTable* maphash, const char* startdir); void findquake4maps(GHashTable* maphash, const char* startdir); void findquakemaps(GHashTable* maphash, const char* startdir); #endif xqf-1.0.5/src/addserver.c0000644002404400000620000001446110205475430012150 00000000000000/* XQF - Quake server browser and launcher * Copyright (C) 1998-2000 Roman Pozlevich * * 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 */ #include "gnuconfig.h" #include "i18n.h" #include "game.h" #include "xqf-ui.h" #include "history.h" #include "dialogs.h" #include "utils.h" #include "config.h" #include "addserver.h" #include "srv-prop.h" #include "pref.h" static struct history *server_history = NULL; static char *enter_server_result; static enum server_type *server_type; static GtkWidget *server_combo; static void server_combo_activate_callback (GtkWidget *widget, gpointer data) { enter_server_result = strdup_strip (gtk_entry_get_text ( GTK_ENTRY (GTK_COMBO (server_combo)->entry))); history_add (server_history, enter_server_result); config_set_string ("/" CONFIG_FILE "/Add Server/game", type2id (*server_type)); } static void select_server_type_callback (GtkWidget *widget, enum server_type type) { *server_type = type; } /** dialog to prompt user for server type and address * @param type pointer where to store the selected type. if UNKNOWN_SERVER, * preset type will be read from hitory file * @param addr preset string value for address field, NULL for nothing * @returns address string or NULL if user pressed cancel. string must be freed */ char *add_server_dialog (enum server_type *type, const char* addr) { GtkWidget *window; GtkWidget *main_vbox; GtkWidget *option_menu; GtkWidget *hbox; GtkWidget *label; GtkWidget *button; GtkWidget *hseparator; g_return_val_if_fail(type != NULL, NULL); enter_server_result = NULL; if(*type == UNKNOWN_SERVER) { char *typestr; // Get last game type added (stored in server_combo_activate_callback) typestr = config_get_string ("/" CONFIG_FILE "/Add Server/game"); if (typestr) { *type = id2type (typestr); g_free (typestr); } else { *type = 0; // Set to first game } } server_type = type; window = dialog_create_modal_transient_window (_("Add Server"), TRUE, FALSE, NULL); main_vbox = gtk_vbox_new (FALSE, 0); gtk_container_add (GTK_CONTAINER (window), main_vbox); hbox = gtk_hbox_new (FALSE, 8); gtk_container_set_border_width (GTK_CONTAINER (hbox), 16); gtk_box_pack_start (GTK_BOX (main_vbox), hbox, FALSE, FALSE, 0); /* Server Entry */ label = gtk_label_new (_("Server:")); gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); gtk_widget_show (label); server_combo = gtk_combo_new (); gtk_widget_set_usize (server_combo, 200, -1); gtk_box_pack_start (GTK_BOX (hbox), server_combo, TRUE, TRUE, 0); gtk_entry_set_max_length (GTK_ENTRY (GTK_COMBO (server_combo)->entry), 128); gtk_combo_set_case_sensitive (GTK_COMBO (server_combo), TRUE); gtk_combo_set_use_arrows_always (GTK_COMBO (server_combo), TRUE); gtk_combo_disable_activate (GTK_COMBO (server_combo)); gtk_signal_connect ( GTK_OBJECT (GTK_COMBO (server_combo)->entry), "activate", GTK_SIGNAL_FUNC (server_combo_activate_callback), NULL); gtk_signal_connect_object ( GTK_OBJECT (GTK_COMBO (server_combo)->entry), "activate", GTK_SIGNAL_FUNC (gtk_widget_destroy), GTK_OBJECT (window)); GTK_WIDGET_SET_FLAGS (GTK_COMBO (server_combo)->entry, GTK_CAN_FOCUS); GTK_WIDGET_UNSET_FLAGS (GTK_COMBO (server_combo)->button, GTK_CAN_FOCUS); gtk_widget_grab_focus (GTK_COMBO (server_combo)->entry); gtk_widget_show (server_combo); combo_set_vals (server_combo, server_history->items, addr); /* Server Type Option Menu */ option_menu = create_server_type_menu (*type, create_server_type_menu_filter_configured, GTK_SIGNAL_FUNC(select_server_type_callback)); gtk_box_pack_start (GTK_BOX (hbox), option_menu, FALSE, FALSE, 0); gtk_widget_show (option_menu); gtk_widget_show (hbox); /* Separator */ hseparator = gtk_hseparator_new (); gtk_box_pack_start (GTK_BOX (main_vbox), hseparator, FALSE, FALSE, 0); gtk_widget_show (hseparator); /* Buttons */ hbox = gtk_hbox_new (FALSE, 8); gtk_container_set_border_width (GTK_CONTAINER (hbox), 8); gtk_box_pack_start (GTK_BOX (main_vbox), hbox, FALSE, FALSE, 0); /* Cancel Button */ button = gtk_button_new_with_label (_("Cancel")); gtk_box_pack_end (GTK_BOX (hbox), button, FALSE, FALSE, 0); gtk_widget_set_usize (button, 80, -1); gtk_signal_connect_object (GTK_OBJECT (button), "clicked", GTK_SIGNAL_FUNC (gtk_widget_destroy), GTK_OBJECT (window)); GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); gtk_widget_show (button); /* OK Button */ button = gtk_button_new_with_label ("OK"); gtk_box_pack_end (GTK_BOX (hbox), button, FALSE, FALSE, 0); gtk_widget_set_usize (button, 80, -1); gtk_signal_connect_object (GTK_OBJECT (button), "clicked", GTK_SIGNAL_FUNC (server_combo_activate_callback), GTK_OBJECT (GTK_COMBO (server_combo)->entry)); gtk_signal_connect_object (GTK_OBJECT (button), "clicked", GTK_SIGNAL_FUNC (gtk_widget_destroy), GTK_OBJECT (window)); GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); gtk_widget_grab_default (button); gtk_widget_show (button); gtk_widget_show (hbox); gtk_widget_show (main_vbox); gtk_widget_show (window); gtk_main (); unregister_window (window); return enter_server_result; } void add_server_init (void) { server_history = history_new (_("Add Server")); } void add_server_done (void) { if (server_history) { history_free (server_history); server_history = NULL; } } xqf-1.0.5/src/addserver.h0000644002404400000620000000244407767073702012172 00000000000000/* XQF - Quake server browser and launcher * Copyright (C) 1998-2000 Roman Pozlevich * * 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 */ #ifndef __ADDSERVER_H__ #define __ADDSERVER_H__ #include "xqf.h" /** dialog to prompt user for server type and address * @param type pointer where to store the selected type * @param addr preset string value for address field, NULL for nothing * @returns address string or NULL if user pressed cancel */ extern char *add_server_dialog (enum server_type *type, const char* addr); extern void add_server_init (void); extern void add_server_done (void); #endif /* __ADDSERVER_H__ */ xqf-1.0.5/src/source.c0000644002404400000620000012643210445245312011473 00000000000000/* XQF - Quake server browser and launcher Copyright (C) 1998-2000 Roman * Pozlevich * * 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 */ #include "gnuconfig.h" #include #include #include /* strtol */ #include /* strchr, strcmp, strstr */ #include /* stat */ #include /* stat */ #include /* inet_aton, inet_ntoa */ #include /* inet_aton, inet_ntoa */ #include /* inet_aton, inet_ntoa */ #include /* errno */ #include #include "i18n.h" #include "xqf.h" #include "xqf-ui.h" #include "source.h" #include "server.h" #include "host.h" #include "pref.h" #include "dialogs.h" #include "game.h" #include "utils.h" #include "config.h" #include "dns.h" #include "zipped.h" #include "stat.h" static gboolean master_options_compare(QFMasterOptions* lhs, QFMasterOptions* rhs); static QFMasterOptions parse_master_options(const char* str); static void master_options_release(QFMasterOptions* o, gboolean doit); struct master *favorites = NULL; GSList *master_groups = NULL; char* master_prefixes[MASTER_NUM_QUERY_TYPES] = { "master://", "gmaster://", "http://", "lan://", "file://", "gslist://", }; char* master_designation[MASTER_NUM_QUERY_TYPES] = { N_("Standard"), N_("Gamespy"), N_("http"), N_("LAN"), N_("File"), "gslist", }; static GSList *all_masters = NULL; static void save_list (FILE *f, struct master *m) { GSList *srv; struct server *s; if (!m->servers) return; debug (6, "save_list() -- Saving Server List \"%s\"", m->name ); #ifdef DEBUG fprintf (stderr, "Saving server list \"%s\"...\n", m->name); #endif if (m == favorites) { fprintf (f, "[%s]\n", m->name); } else { char* str = master_to_url(m); fputc('[', f); fputs(games[m->type].id, f); fputc(' ', f); fputs(str, f); fputs("]\n", f); g_free(str); } for (srv = m->servers; srv; srv = srv->next) { s = (struct server *) srv->data; fprintf (f, "%s %s:%d\n", games[s->type].id, inet_ntoa (s->host->ip), s->port); } fprintf (f, "\n"); } void save_favorites (void) { FILE *f; char *realname; debug (6, "save_favorites() --"); realname = file_in_dir (user_rcdir, FILENAME_FAVORITES); while (1) { f = fopen (realname, "w"); if (!f) { if (dialog_yesno (NULL, 0, _("Retry"), _("Skip"), _("Cannot write to file %s\nSystem Error: %s\n"), realname, g_strerror (errno))) { continue; } g_free (realname); return; } break; } save_list (f, favorites); fclose (f); g_free (realname); } static void save_lists (GSList *list, const char *filename) { char *realname; struct zstream z; debug (6, "save_lists() -- %s", filename); realname = file_in_dir (user_rcdir, filename); if (!list) { zstream_unlink (realname); g_free (realname); return; } zstream_open_w (&z, realname); if (z.f) { while (list) { save_list (z.f, (struct master *) list->data); list = list->next; } zstream_close (&z); } g_free (realname); } static void save_server_info (const char *filename, GSList *servers) { char *realname; struct zstream z; struct server *s; realname = file_in_dir (user_rcdir, filename); if (!servers) { zstream_unlink (realname); g_free (realname); return; } zstream_open_w (&z, realname); if (z.f) { while (servers) { s = (struct server *) servers->data; if (s->ref_count > 0 && games[s->type].save_info) (*games[s->type].save_info) (z.f, s); servers = servers->next; } zstream_close (&z); } g_free (realname); } static struct master *find_master_server (char *addr, unsigned short port, char *str, QFMasterOptions* options) { GSList *list; struct master *m = NULL; struct in_addr ip; if (!addr || !port) return NULL; for (list = all_masters; list; list = list->next) { m = (struct master *) list->data; if (m->port && m->port == port) { if (m->hostname) { if (!g_strcasecmp (m->hostname, addr)) { if((!str || // pre 0.9.4e list file !g_strcasecmp (games[m->type].id, str)) // list file in new format && master_options_compare(&m->options, options)) break; } } else { if (m->host && inet_aton (addr, &ip) && ip.s_addr == m->host->ip.s_addr) { if((!str || // pre 0.9.4e list file !g_strcasecmp (games[m->type].id, str)) && master_options_compare(&m->options, options)) break; } } } m = NULL; } return m; } /* * This is internal function to make compare_urls() function work. * Don't use it for any other purposes. * * Unification is * 1) lower case protocol and hostname * 2) remove port reference if it's standard port for the protocol * 3) remove trailing slashes from the end of the file location */ static char *unify_url (const char *url) { char *unified; char *ptr, *ptr2, *ptr3; long port; int len; if (!url) return NULL; ptr = strstr (url, "://"); if (ptr == NULL) return NULL; ptr += 3; if (*ptr == '\0') return NULL; unified = g_malloc (strlen (url) + 1); ptr2 = strchr (ptr, ':'); if (!ptr2) { ptr2 = strchr (ptr, '/'); if (!ptr2) ptr2 = ptr + strlen (ptr); ptr3 = ptr2; } else { port = strtol (ptr2 + 1, &ptr3, 10); if (port != 80) ptr2 = ptr3; } strncpy (unified, url, ptr2 - url); unified[ptr2 - url] = '\0'; g_strdown (unified); strcpy (unified + (ptr2 - url), ptr3); while ( (len = strlen (unified)) > 0 && unified[len - 1] == '/' ) unified[len - 1] = '\0'; #ifdef DEBUG fprintf (stderr, "URL unification %s -> %s\n", url, unified); #endif return unified; } static int _compare_urls (const char *url1, const char *url2, gboolean withopts) { char *uni1; char *uni2; int res = 1; uni1 = unify_url (url1); uni2 = unify_url (url2); /* * It's error if any URL is NULL * Don't take care of situation when both of URLs are NULL */ if (uni1 != NULL && uni2 != NULL) { if(!withopts) { char* p = NULL; p = strchr(uni1, ';'); if(p) *p='\0'; p = strchr(uni2, ';'); if(p) *p='\0'; } res = strcmp (uni1, uni2); } if (uni1) g_free (uni1); if (uni2) g_free (uni2); return res; } #if 0 static int compare_urls (const char *url1, const char *url2) { return _compare_urls(url1, url2, TRUE); } #endif static int compare_urls_noopts (const char *url1, const char *url2) { return _compare_urls(url1, url2, FALSE); } static struct master *find_master_url (char *url, QFMasterOptions* options) { GSList *list; struct master *m = NULL; if (!url) return NULL; debug(5, "%s %p", url, options); for (list = all_masters; list; list = list->next) { m = (struct master *) list->data; if (m->url && compare_urls_noopts (m->url, url) == 0 && master_options_compare(&m->options, options)) break; else m = NULL; } return m; } /** @param str type string or favorites->name @param url url string, NULL for favorites */ static struct master *read_list_parse_master (char *str, char *url) { char *addr; unsigned short port; struct master *m = NULL; enum master_query_type query_type; QFMasterOptions options = { 0, NULL }; char* optstr = NULL; if (favorites && !g_strcasecmp (str, favorites->name)) return favorites; debug(5, "%s %s", str, url); query_type = get_master_query_type_from_address(str); optstr = strchr(str + strlen(master_prefixes[query_type]), ';'); if(optstr) { *optstr++ = '\0'; options = parse_master_options(optstr); } switch(query_type) { case MASTER_NATIVE: case MASTER_GAMESPY: case MASTER_LAN: if (parse_address (str + strlen(master_prefixes[query_type]), &addr, &port)) { m = find_master_server (addr, port, url, &options); g_free (addr); } break; case MASTER_HTTP: case MASTER_FILE: case MASTER_GSLIST: m = find_master_url (str, &options); break; case MASTER_NUM_QUERY_TYPES: case MASTER_INVALID_TYPE: break; } master_options_release(&options, TRUE); return m; } static gint server_sorting_helper (const struct server *s1, const struct server *s2) { if(s1==s2) return 0; else if(s1servers = server_list_prepend_ndp (m->servers, s); /* Since the server_add increments the ref count, and server_list_prepend_ndp ups the ref_count, we should unref it once because we are only keeping it in one list after this function. */ server_unref (s); } host_unref (h); } else { /* hostname */ g_strdown (addr); if ((us = userver_add (addr, port, type)) != NULL) m->uservers = userver_list_add (m->uservers, us); } g_free (addr); } } static void read_lists (const char *filename) { struct zstream z; char *realname; char buf[4096]; char *ch; struct master *m = NULL; char *token[8]; int n; enum server_type type; realname = file_in_dir (user_rcdir, filename); zstream_open_r (&z, realname); if (z.f == NULL) { g_free (realname); return; } while (fgets (buf, 4096, z.f)) { n = tokenize (buf, token, 8, " \t\n\r"); if (n < 1) continue; if (token[0][0] == '[') { // line is a master ch = strchr (token[0] + 1, ']'); // does token 0 have a ]? if (ch) { // it's a favorites or pre 0.9.4e lists file *ch = '\0'; if (m && m->servers) m->servers = g_slist_reverse (m->servers); m = read_list_parse_master (token[0] + 1, NULL); } else { ch = strchr (token[1], ']'); // does token 1 have a ]? if (ch) { *ch = '\0'; if (m && m->servers) m->servers = g_slist_reverse (m->servers); m = read_list_parse_master (token[1], token[0] + 1); // master, type } } } else { if (!m || n < 2) continue; type = id2type (token[0]); if (type != UNKNOWN_SERVER) master_add_server (m, token[1], type); } } if (m && m->servers) m->servers = g_slist_reverse (m->servers); zstream_close (&z); g_free (realname); } static void read_server_info (const char *filename) { struct zstream z; char *realname; char *buf; char *pos; GSList *strings; int line = 1; debug(3,"read_server_info(%s)",filename); realname = file_in_dir (user_rcdir, filename); zstream_open_r (&z, realname); if (z.f == NULL) { g_free (realname); return; } buf = g_malloc (1024*16); pos = buf; strings = NULL; while (1) { if (pos - buf > 1024*16 - 16) { xqf_error("server record is too large in %s, line %d\n", realname, line); g_slist_free (strings); break; } if (!fgets (pos, 1024*16 - (pos - buf), z.f)) { /* EOF || Error */ if (strings) { parse_saved_server (strings); g_slist_free (strings); } break; } else { if (pos[0] == '\n') { /* empty line */ ++line; parse_saved_server (strings); g_slist_free (strings); strings = NULL; pos = buf; } else { strings = g_slist_append (strings, pos); while (*pos) { if (*pos == '\n') { ++line; *pos = '\0'; break; } pos++; } pos++; } } } g_free (buf); zstream_close (&z); g_free (realname); } static void read_favorites_old_format (char *fn) { FILE *f; char buf[1024]; char *token[3]; int n; enum server_type type; f = fopen (fn, "r"); if (!f) return; while (fgets (buf, 1024, f)) { n = tokenize_bychar (buf, token, 3, '|'); if (n < 2) continue; type = id2type (token[0]); if (type != UNKNOWN_SERVER) master_add_server (favorites, token[1], type); } if (favorites->servers) favorites->servers = g_slist_reverse (favorites->servers); fclose (f); } static void compat_convert_favorites (void) { struct stat statbuf; char *fn; fn = file_in_dir (user_rcdir, FILENAME_FAVORITES); if (stat (fn, &statbuf) == 0) { g_free (fn); return; } g_free (fn); fn = file_in_dir (user_rcdir, "Favorites"); read_favorites_old_format (fn); g_free (fn); } static struct master *create_master (char *name, enum server_type type, int group) { struct master *m; m = g_malloc0 (sizeof (struct master)); m->name = g_strdup (name); m->type = type; m->state = SOURCE_NA; m->isgroup = group; if (!group) all_masters = g_slist_append (all_masters, m); return m; } char* master_qstat_option(struct master* m) { g_return_val_if_fail(m!=NULL,NULL); if(m->_qstat_master_option) return m->_qstat_master_option; else return games[m->type].qstat_master_option; } void master_set_qstat_option(struct master* m, const char* opt) { g_return_if_fail(m!=NULL); g_free(m->_qstat_master_option); m->_qstat_master_option = opt?g_strdup(opt):NULL; } /** no deep copy! */ static QFMasterOptions parse_master_options(const char* str) { const char* semicolon = NULL; const char* val = NULL; QFMasterOptions options = {0, NULL}; if(!str) return options; while(str && *str) { semicolon = strchr(str, ';'); if(!semicolon) semicolon = str+strlen(str); // find next = before ; for(val=str; *val && *val != ';' && *val != '='; ++val); if(*val != '=') val = NULL; else ++val; if(val && semicolon-val && !strncmp(str, "gsmtype", 7)) options.gsmtype = g_strndup(val, semicolon-val); if(val && semicolon-val && !strncmp(str, "portadjust", 7)) options.portadjust = atoi(val); if(*semicolon) str = semicolon+1; else str = semicolon; } return options; } static gboolean master_options_compare(QFMasterOptions* lhs, QFMasterOptions* rhs) { if(!lhs || !rhs) return FALSE; if(lhs->portadjust != rhs->portadjust ) return FALSE; if(lhs->gsmtype && rhs->gsmtype && strcmp(lhs->gsmtype, rhs->gsmtype)) return FALSE; return TRUE; } #if 0 char* master_to_string(QFMaster* m) { char buf[1024] = {0}; switch(m->master_type) { case MASTER_NATIVE: case MASTER_GAMESPY: case MASTER_LAN: snprintf (buf, sizeof(buf), "[%s %s%s:%d", games[m->type].id, master_prefixes[m->master_type], (m->hostname)? m->hostname : inet_ntoa (m->host->ip), m->port ); break; case MASTER_HTTP: case MASTER_FILE: case MASTER_GSLIST: snprintf (buf, sizeof(buf), "[%s %s", games[m->type].id, m->url); break; case MASTER_NUM_QUERY_TYPES: case MASTER_INVALID_TYPE: break; } if(m->options.portadjust) snprintf(buf+strlen(buf), sizeof(buf)-strlen(buf), ";portadjust=%d", m->options.portadjust); if(m->options.gsmtype) snprintf(buf+strlen(buf), sizeof(buf)-strlen(buf), ";gsmtype=%s", m->options.gsmtype); snprintf(buf, sizeof(buf)-strlen(buf), "]\n"); if(*buf) return g_strdup(buf); else return NULL; } #endif char *master_to_url( QFMaster* m ) { char *query_type; char *address; char buf[1024] = {0}; if ( m->master_type >= MASTER_NATIVE && m->master_type < MASTER_NUM_QUERY_TYPES ) { query_type = master_prefixes[m->master_type]; } else return NULL; switch(m->master_type) { case MASTER_NATIVE: case MASTER_GAMESPY: case MASTER_LAN: if(m->hostname) { address = m->hostname; } else if(m->host) { address = inet_ntoa(m->host->ip); } else { xqf_error("master %s has neither hostname nor ip address", m->name); return NULL; } snprintf (buf, sizeof(buf), "%s%s:%d", query_type, address, m->port); break; case MASTER_HTTP: case MASTER_FILE: case MASTER_GSLIST: snprintf (buf, sizeof(buf), "%s", m->url); break; case MASTER_NUM_QUERY_TYPES: case MASTER_INVALID_TYPE: break; } if(m->options.portadjust) snprintf(buf+strlen(buf), sizeof(buf)-strlen(buf), ";portadjust=%d", m->options.portadjust); if(m->options.gsmtype) snprintf(buf+strlen(buf), sizeof(buf)-strlen(buf), ";gsmtype=%s", m->options.gsmtype); if(*buf) return g_strdup(buf); else return NULL; } /** only free content, not pointer itself */ static void master_options_release(QFMasterOptions* o, gboolean doit) { if(!doit || !o) return; g_free(o->gsmtype); } struct master *add_master (char *path, char *name, enum server_type type, const char* qstat_query_arg, int user, int lookup_only) { char *addr = NULL; unsigned short port = 0; struct master *m = NULL; struct host *h = NULL; struct master *group = NULL; enum master_query_type query_type; char* optstr = NULL; QFMasterOptions options = {0, NULL}; gboolean freeoptions = FALSE; debug(6,"%s,%s,%d,%d,%d",path,name,type,user,lookup_only); query_type = get_master_query_type_from_address(path); if( query_type == MASTER_INVALID_TYPE ) { debug(1,"Invalid Master %s",path); return NULL; } optstr = strchr(path + strlen(master_prefixes[query_type]), ';'); if(optstr) { *optstr++ = '\0'; options = parse_master_options(optstr); freeoptions = TRUE; } switch(query_type) { case MASTER_NATIVE: case MASTER_GAMESPY: case MASTER_LAN: // check for valid hostname/ip if (parse_address (path + strlen(master_prefixes[query_type]), &addr, &port)) { // if no port was specified, add default master port if available or fail if (!port) { // use default_port instead of default_master_port for lan broadcasts if( query_type == MASTER_LAN ) { port = games[type].default_port; /* no longer necessary as of qstat 2.5c // unreal needs one port higher if(!strcmp(games[type].qstat_option,"-uns")) { port++; type=GPS_SERVER; } */ } // do not use default for gamespy else if (query_type != MASTER_GAMESPY && games[type].default_master_port) { port = games[type].default_master_port; } else { master_options_release(&options, freeoptions); g_free (addr); // translator: %s == url, eg gmaster://bla.blub.org dialog_ok (NULL, _("You have to specify a port number for %s."),path); return NULL; } } m = find_master_server (addr, port, games[type].id, &options); } break; case MASTER_GSLIST: if(!options.gsmtype) { master_options_release(&options, freeoptions); dialog_ok (NULL, _("'gsmtype' options missing for master %s."), name); return NULL; } case MASTER_HTTP: case MASTER_FILE: m = find_master_url (path, &options); break; case MASTER_NUM_QUERY_TYPES: case MASTER_INVALID_TYPE: master_options_release(&options, freeoptions); return NULL; } if (lookup_only) { master_options_release(&options, freeoptions); g_free (addr); return m; } // we don't update qstat_query_arg for existing masters -- ln if (m) { if (user) { // Master renaming is forced by user g_free (m->name); m->name = g_strdup (name); m->user = TRUE; master_options_release(&m->options, TRUE); m->options = options; freeoptions = FALSE; } else { // Automatically rename masters that are not edited by user if (!m->user) { g_free (m->name); m->name = g_strdup (name); master_options_release(&m->options, TRUE); m->options = options; freeoptions = FALSE; } } master_options_release(&options, freeoptions); g_free (addr); return m; } // master was not known already, create new switch(query_type) { case MASTER_NATIVE: case MASTER_GAMESPY: case MASTER_LAN: m = create_master (name, type, FALSE); master_set_qstat_option(m, qstat_query_arg); h = host_add (addr); if (h) { m->host = h; host_ref (h); g_free (addr); addr = NULL; } else { m->hostname = addr; } m->port = port; break; case MASTER_HTTP: case MASTER_FILE: case MASTER_GSLIST: m = create_master (name, type, FALSE); m->url = g_strdup (path); break; case MASTER_NUM_QUERY_TYPES: case MASTER_INVALID_TYPE: master_options_release(&options, freeoptions); return NULL; } m->master_type = query_type; m->options = options; freeoptions = FALSE; if (m) { group = (struct master *) g_slist_nth_data (master_groups, type); group->masters = g_slist_append (group->masters, m); m->user = user; } master_options_release(&options, freeoptions); return m; } void free_master (struct master *m) { struct master *group; if (!m) return; if (m->isgroup) { while (m->masters) free_master ((struct master *) m->masters->data); } else { if (m->type != UNKNOWN_SERVER) { group = (struct master *) g_slist_nth_data (master_groups, m->type); group->masters = g_slist_remove (group->masters, m); } all_masters = g_slist_remove (all_masters, m); } host_unref (m->host); g_free (m->hostname); g_free (m->name); g_free (m->url); g_free (m->_qstat_master_option); g_free (m->options.gsmtype); server_list_free (m->servers); userver_list_free (m->uservers); g_free (m); } static char *builtin_masters_update_info[] = { "ADD QS http://www.gameaholic.com/servers/qspy-quake Gameaholic.Com", "DELETE QS http://ironman.planetquake.com/serversqspy.txt Ironman", // does no longer work "ADD QWS master://192.246.40.37:27000 id Limbo", "ADD QWS master://192.246.40.37:27002 id CTF", "ADD QWS master://192.246.40.37:27003 id Team Fortress", "ADD QWS master://192.246.40.37:27004 id Misc", "ADD QWS master://192.246.40.37:27006 id Deathmatch", "ADD QWS master://qwmaster.ocrana.de:27000 Germany", "DELETE QWS master://santa.quakeforge.net:27000 QuakeForge", // doesn't work (26.09.2004) "DELETE Q2S master://satan.idsoftware.com:27900 id", // doesn't work (26.09.2004) "DELETE Q2S master://q2master.planetquake.com:27900 PlanetQuake", // doesn't work (26.09.2004) "DELETE Q2S master://telefragged.com:27900 TeleFragged", // doesn't work (26.09.2004) "DELETE Q2S master://qwmaster.barrysworld.com:27900 BarrysWorld (UK)", // doesn't work (26.09.2004) "DELETE Q2S master://master.quake.inet.fi:27900 iNET (Finland)", // doesn't work (26.09.2004) "DELETE Q2S master://q2master.mondial.net.au:27900 Australia", // doesn't work (26.09.2004) "DELETE Q2S master://q2master.gxp.de:27900 gXp (Germany)", // doesn't work (26.09.2004) "ADD Q2S http://www.gameaholic.com/servers/qspy-quake2 Gameaholic.Com", "ADD Q2S http://www.lithium.com/quake2/gamespy.txt Lithium", "ADD Q2S master://masterserver.exhale.de exhale.de", "ADD Q2S master://netdome.biz netdome.biz", "ADD Q2S master://master.planetgloom.com gloom", "ADD Q3S master://master3.idsoftware.com id", // "ADD Q3S master://q3master.splatterworld.de Germany", // "ADD Q3S master://q3.golsyd.net.au Australia", "DELETE Q3S master://q3master.barrysworld.com:27950 BarrysWorld", // doesn't work (26.09.2004) "ADD Q3S http://www.gameaholic.com/servers/qspy-quake3 Gameaholic.com", "ADD Q4S master://q4master.idsoftware.com id", // "ADD HWS master://santa.quakeforge.net:26900 QuakeForge", "ADD SNS http://www.gameaholic.com/servers/qspy-sin Gameaholic.Com", "ADD SNS http://asp.planetquake.com/sinserverlist/servers.txt PlanetQuake", "DELETE HLS master://half-life.east.won.net WON East", // switched off "DELETE HLS master://half-life.west.won.net WON West", // switched off "ADD HLS,-stm master://steam1.steampowered.com Steam 1", "ADD HLS,-stm master://steam2.steampowered.com Steam 2", "ADD HLA2S master://steam1.steampowered.com Steam 1", "ADD A2S,-stma2s master://steam1.steampowered.com:27011 Steam 1", "ADD A2S,-stma2s master://steam2.steampowered.com:27011 Steam 2", "ADD A2S,-stma2s master://69.28.151.178:27011 Valve 1", "ADD Q2S:KP http://www.gameaholic.com/servers/qspy-kingpin Gameaholic.Com", "ADD Q2S:KP http://www.ogn.org:6666 OGN", "ADD Q2S:HR http://www.gameaholic.com/servers/qspy-heretic2 Gameaholic.Com", "DELETE UNS gmaster://unreal.epicgames.com:28900 Epic", // doesn't work (26.11.2004) "DELETE UNS gmaster://utmaster.barrysworld.com:28909 BarrysWorld", // doesn't work (26.09.2004) "DELETE T2S master://211.233.32.77:28002 Tribes2 Master", // does no longer work "DELETE T2S master://198.74.32.54:27999 Master 1", // does no longer work "DELETE T2S master://198.74.32.55:27999 Master 2", // does no longer work "DELETE T2S master://211.233.86.203:28002 Master 3", // does no longer work "ADD T2S master://198.74.35.11:27999 Master 1", "ADD T2S master://198.74.35.17:27999 Master 2", "ADD T2S master://198.74.35.18:27999 Master 3", "DELETE WOS master://wolf.idsoftware.com:27950 id", // does no longer work "ADD WOS master://wolfmaster.idsoftware.com:27950 id", "ADD WOETS master://etmaster.idsoftware.com:27950 id", "ADD DM3S master://idnet.ua-corp.com:27650 id", "ADD EFS http://www.gameaholic.com/servers/qspy-startrekeliteforce Gameaholic.com", "ADD EFS master://master.stef1.ravensoft.com:27953 Ravensoft", "DELETE D3P master://gt.pxo.net:3445 PXO", // doesn't work "DELETE D3P http://www.gameaholic.com/servers/qspy-descent3 gameaholic.com", // no usable servers anymore "ADD D3G http://d3.descent.cx/d3cxraw.d3?terse=y d3.descent.cx", "ADD SFS http://www.gameaholic.com/servers/qspy-soldieroffortune gameaholic.com", "ADD RUNESRV http://www.gameaholic.com/servers/qspy-rune gameaholic.com", "ADD SOF2S master://master.sof2.ravensoft.com:20110 Raven", "DELETE UT2S http://ut2003master.epicgames.com/serverlist/full-all.txt Epic", // does no longer work "DELETE UT2S http://ut2003master.epicgames.com/serverlist/demo-all.txt Epic Demo", // does no longer work "DELETE SAS http://masterserver.savagedemo.s2games.com/gamelist.dat S2 Games", // does no longer work "ADD SAS http://masterserver.savage.s2games.com/gamelist_full.dat S2 Games", "DELETE UNS http://tourneys.multiplay.co.uk/public/servers.pl?opt=ListGamespy&event=Online&type=UT&hostport=1 multiplay.co.uk - UT", // does no longer work "DELETE MHS http://tourneys.multiplay.co.uk/public/servers.pl?opt=ListGamespy&event=Online&type=MOHAA&hostport=1 multiplay.co.uk - MOHAA", // does no longer work "DELETE EFS http://tourneys.multiplay.co.uk/public/servers.pl?opt=ListGamespy&event=Online&type=EF&hostport=1 multiplay.co.uk - Elite Force", // does no longer work "ADD AMS http://simplembs.armygame.com/sparse.txt armygame.com", // version 2.0 not listed here "DELETE AMS http://tourneys.multiplay.co.uk/public/servers.pl?opt=ListGamespy&event=Online&type=AA&hostport=1 multiplay.co.uk - Army Ops", // does no longer work "DELETE SOF2S http://tourneys.multiplay.co.uk/public/servers.pl?opt=ListGamespy&event=Online&type=SOF2&hostport=1 multiplay.co.uk - SOF2", // does no longer work "DELETE UT2S http://tourneys.multiplay.co.uk/public/servers.pl?opt=ListGamespy&event=Online&type=UT2K3&hostport=1 multiplay.co.uk - UT2003", // does no longer work "DELETE UT2004S http://tourneys.multiplay.co.uk/public/servers.pl?opt=ListGamespy&event=Online&type=UT2K4&hostport=1 multiplay.co.uk - UT2004", // does no longer work "DELETE UT2004S http://tourneys.multiplay.co.uk/public/servers.pl?opt=ListGamespy&event=Online&type=UT2K4D&hostport=1 multiplay.co.uk - UT2004 Demo", // does no longer work "DELETE HLS http://tourneys.multiplay.co.uk/public/servers.pl?opt=ListGamespy&event=Online&type=HLS&hostport=1 multiplay.co.uk - Half-Life", // does no longer work "ADD CODS master://cod01.activision.com Activision", "DELETE CODS http://tourneys.multiplay.co.uk/public/servers.pl?opt=ListGamespy&event=Online&type=COD multiplay.co.uk - Call of Duty", "DELETE BF1942 http://tourneys.multiplay.co.uk/public/servers.pl?opt=ListGamespy&event=Online&type=BF1942&hostport=1 multiplay.co.uk - BF1942", "ADD JK3S master://masterjk3.ravensoft.com:29060 Ravensoft", "ADD UT2004S master://ut2004master1.epicgames.com:28902 Epic 1", "ADD UT2004S master://ut2004master2.epicgames.com:28902 Epic 2", "ADD NETP master://netpanzer.dyndns.org netpanzer.dyndns.org", "ADD NEXUIZS master://ghdigital.com ghdigital.com", "ADD NEXUIZS master://dpmaster.deathmask.net dpmaster.deathmask.net", "ADD WARSOWS master://ghdigital.com ghdigital.com", "ADD WARSOWS master://dpmaster.deathmask.net dpmaster.deathmask.net", "ADD TREMULOUS master://master.tremulous.net:30710 tremulous.net", "ADD QS lan://255.255.255.255 LAN", "ADD QWS lan://255.255.255.255 LAN", "ADD Q2S lan://255.255.255.255 LAN", "ADD HLS lan://255.255.255.255 LAN", "ADD Q3S lan://255.255.255.255 LAN", "ADD Q4S lan://255.255.255.255 LAN", "ADD WOS lan://255.255.255.255 LAN", "ADD WOETS lan://255.255.255.255 LAN", "ADD EFS lan://255.255.255.255 LAN", "ADD UT2S lan://255.255.255.255 LAN", "ADD UT2004S lan://255.255.255.255 LAN", "ADD UNS lan://255.255.255.255 LAN", "ADD RUNESRV lan://255.255.255.255 LAN", "ADD MHS lan://255.255.255.255 LAN", "ADD AMS lan://255.255.255.255 LAN", "ADD CODS lan://255.255.255.255 LAN", "ADD JK3S lan://255.255.255.255 LAN", "ADD T2S lan://255.255.255.255 LAN", "ADD POSTAL2 lan://255.255.255.255 LAN", "ADD SFS lan://255.255.255.255 LAN", "ADD DM3S lan://255.255.255.255 LAN", NULL }; static char *builtin_gslist_masters_update_info[] = { "ADD QS gslist://master.gamespy.com;gsmtype=quake1 Gslist", "ADD QWS gslist://master.gamespy.com;gsmtype=quakeworld Gslist", "ADD Q2S gslist://master.gamespy.com;gsmtype=quake2 Gslist", "ADD Q3S gslist://master.gamespy.com;gsmtype=quake3 Gslist", "ADD Q4S gslist://master.gamespy.com;gsmtype=quake4 Gslist", "ADD WOS gslist://master.gamespy.com;gsmtype=rtcw Gslist", "ADD WOETS gslist://master.gamespy.com;gsmtype=rtcwet Gslist", "ADD DM3S gslist://master.gamespy.com;gsmtype=doom3 Gslist", "ADD RUNESRV gslist://master.gamespy.com;portadjust=-1;gsmtype=rune Gslist", "ADD UNS gslist://master.gamespy.com;portadjust=-1;gsmtype=ut Gslist", "ADD UT2004S gslist://master.gamespy.com;portadjust=-10;gsmtype=ut2004 Gslist", "ADD UT2004S gslist://master.gamespy.com;portadjust=-10;gsmtype=ut2004d Gslist (Demo)", "ADD POSTAL2 gslist://master.gamespy.com;portadjust=-1;gsmtype=postal2 Gslist", "ADD POSTAL2 gslist://master.gamespy.com;portadjust=-1;gsmtype=postal2d Gslist (Demo)", "ADD AMS gslist://master.gamespy.com;portadjust=-1;gsmtype=armygame Gslist", "ADD D3G gslist://master.gamespy.com;gsmtype=descent3 Gslist", "ADD SOF2S gslist://master.gamespy.com;gsmtype=sof2 Gslist", // "ADD GPS gslist://master.gamespy.com;gsmtype=mohaa Gslist", // no fixed port offset // "ADD SMS gslist://master.gamespy.com;portadjust=-1;gsmtype=serioussam Gslist", // not compatible with linux version // "ADD SMSSE gslist://master.gamespy.com;portadjust=-1;gsmtype=serioussamse Gslist", // not compatible with linux version NULL }; /** parse type of the form [,QSTAT_MASTER_OPION] * DESTRUCTIVE * @return qstat_master_option or NULL */ char* master_id2type(char* token, enum server_type* type) { char* ret = NULL; char* coma = strchr(token, ','); if(coma) { *coma = '\0'; ret = ++coma; } *type = id2type(token); return ret; } /* * Format: Action ServerType URL Description */ static void update_master_list_action (const char *action) { char *str; char *token[4]; int n; enum server_type type; struct master *m; str = strdup_strip (action); if (!str || !*str) return; n = tokenize (str, token, 4, " \t\n\r"); if (n == 4) { char* qstat_query_arg = master_id2type (token[1], &type); if (type != UNKNOWN_SERVER) { if (g_strcasecmp (token[0], ACTION_ADD) == 0) { m = add_master (token[2], token[3], type, qstat_query_arg, FALSE, FALSE); if (m && source_ctree != NULL) source_ctree_add_master (source_ctree, m); } else if (g_strcasecmp (token[0], ACTION_DELETE) == 0) { m = add_master (token[2], token[3], type, qstat_query_arg, FALSE, TRUE); if (m) { if (source_ctree != NULL) source_ctree_delete_master (source_ctree, m); free_master (m); } } } } g_free (str); } void update_master_list_builtin (void) { char **ptr; for (ptr = builtin_masters_update_info; *ptr; ptr++) update_master_list_action (*ptr); } void update_master_gslist_builtin (void) { char **ptr; for (ptr = builtin_gslist_masters_update_info; *ptr; ptr++) update_master_list_action (*ptr); } // Refresh list of games and masters in left pane void refresh_source_list (void) { GtkCTreeNode *node; GSList *list; struct master *m; struct master *group = NULL; // Re-add masters to the list, or remove them if game is not // configured and set to show only configured games. for (list = all_masters; list; list = list->next) { m = (struct master *) list->data; if (m == favorites || m->isgroup) continue; // Look for existing entry in ctree so we only re-add if needed, // otherwise everthing gets re-expanded node = gtk_ctree_find_by_row_data (GTK_CTREE (source_ctree), NULL, m); // If it's not there check to see if we should add it if (!node) // It's not in the list so maybe we should add it { if (!default_show_only_configured_games || games[m->type].cmd) source_ctree_add_master (source_ctree, m); } else // It's in the list so maybe we should delete it if (default_show_only_configured_games && !games[m->type].cmd) source_ctree_delete_master (source_ctree, m); } // Remove master group if set to show only configured games. for (list = all_masters; list; list = list->next) { m = (struct master *) list->data; if (m == favorites) continue; if (default_show_only_configured_games && !games[m->type].cmd) { group = (struct master *) g_slist_nth_data (master_groups, m->type); source_ctree_remove_master_group (source_ctree, group); } } } void update_master_list_web (void) { char **ptr; for (ptr = builtin_masters_update_info; *ptr; ptr++) update_master_list_action (*ptr); } static void load_master_list (void) { struct master *m; enum server_type type; char* qstat_query_arg = NULL; char conf[64]; char *token[3]; char *str; char *tmp; int user; int i = 0; int n; config_push_prefix ("/" CONFIG_FILE "/Master List"); while (1) { g_snprintf (conf, 64, "master%d", i); str = config_get_string (conf); if (!str) break; n = tokenize (str, token, 3, " \t\n\r"); if (n == 3) { user = FALSE; tmp = strrchr (token[0], ','); if (tmp) { user = (g_strcasecmp (tmp+1, "USER") == 0); if(user) *tmp = '\0'; } qstat_query_arg = master_id2type (token[0], &type); if (type != UNKNOWN_SERVER) { /* Use 'user' mode to insert master to the master list * and fix m->user after that. */ m = add_master (token[1], token[2], type, qstat_query_arg, TRUE, FALSE); if (m) m->user = user; } } g_free (str); i++; } config_pop_prefix (); } static void save_master_list (void) { GSList *list; struct master *m; char conf[64]; char typeid[128] = {0}; char *confstr; char *str; int n = 0; config_clean_section ("/" CONFIG_FILE "/Master List"); config_push_prefix ("/" CONFIG_FILE "/Master List"); for (list = all_masters; list; list = list->next) { m = (struct master *) list->data; if (m == favorites || m->isgroup) continue; g_snprintf (conf, 64, "master%d", n); g_snprintf (typeid, sizeof(typeid), "%s%s%s%s", type2id (m->type), m->_qstat_master_option?",":"", m->_qstat_master_option?m->_qstat_master_option:"", m->user?",USER":""); str = master_to_url(m); confstr = g_strjoin (" ", typeid, str, m->name, NULL); config_set_string (conf, confstr); g_free (str); g_free (confstr); n++; } config_pop_prefix (); } void init_masters (int update) { typedef void (*server_unref_void)(void*); struct master *m; struct master *m2; int i; GSList *list; favorites = create_master (N_("Favorites"), UNKNOWN_SERVER, FALSE); for (i = 0; i < GAMES_TOTAL; i++) { m = create_master (games[i].name, i, TRUE); master_groups = g_slist_append (master_groups, m); } load_master_list (); if (update) { update_master_list_builtin (); if(have_gslist_masters()) update_master_gslist_builtin(); config_sync (); } compat_convert_favorites (); read_lists (FILENAME_FAVORITES); debug (2, "starting to read server list"); read_lists (FILENAME_LISTS); debug (2, "finished reading server list"); // Go through all servers, sort them and then remove duplicates // master_add_server now uses server_list_prepend_ndp which does not // search for duplicates while adding servers. This is much faster. // Because of this, duplicate checking must be done here. // Only working on servers, not uservers. Lists file only contains IPs. debug (2, "Searching for duplicate server entries"); // for each master for (list = all_masters; list; list = list->next) { m2 = (struct master *) list->data; if(!m2) continue; debug (2, " Working on master: %s",m2->name); m2->servers = slist_sort_remove_dups(m2->servers,(GCompareFunc)server_sorting_helper,(server_unref_void)server_unref); } read_server_info (FILENAME_SRVINFO); } void free_masters (void) { GSList *tmp; debug (6, "free_masters() --"); save_favorites (); if (default_save_lists) { tmp = g_slist_copy (all_masters); tmp = g_slist_remove (tmp, favorites); save_lists (tmp, FILENAME_LISTS); g_slist_free (tmp); if (default_save_srvinfo) { tmp = all_servers (); /* free done in two lines */ save_server_info (FILENAME_SRVINFO, tmp); server_list_free (tmp); } } else { save_lists (NULL, FILENAME_LISTS); if (default_save_srvinfo) { save_server_info (FILENAME_SRVINFO, favorites->servers); } } save_master_list (); free_master (favorites); favorites = NULL; g_slist_foreach (master_groups, (GFunc) free_master, NULL); g_slist_free (master_groups); master_groups = NULL; } static inline GSList *master_list_add_sigle (GSList *list, struct master *m) { if (g_slist_find (list, m) == NULL) list = g_slist_append (list, m); return list; } static void master_list_add (GSList **masters, GSList **servers, GSList **uservers, struct master *m) { GSList *tmp; debug (6, "master_list_add() -- master '%s'", m->name); if (m->isgroup || m == favorites) { if (servers) { *servers = server_list_append_list (*servers, favorites->servers, m->type); } if (uservers) { *uservers = userver_list_append_list (*uservers, favorites->uservers, m->type); } } if (masters) { if (m->isgroup) { for (tmp = m->masters; tmp; tmp = tmp->next) *masters = master_list_add_sigle (*masters, (struct master *) tmp->data); } else { if (m != favorites) *masters = master_list_add_sigle (*masters, m); } } } void collate_server_lists (GSList *masters, GSList **servers, GSList **uservers) { struct master *m; GSList *tmp; for (tmp = masters; tmp; tmp = tmp->next) { m = (struct master *) tmp->data; if (servers) { *servers = server_list_append_list (*servers, m->servers, UNKNOWN_SERVER); } if (uservers) { *uservers = userver_list_append_list (*uservers, m->uservers, UNKNOWN_SERVER); } } } void master_selection_to_lists (GSList *list, GSList **masters, GSList **servers, GSList **uservers) { struct master *m; GSList *tmp; debug (6, "master_selection_to_lists() --"); for (tmp = list; tmp; tmp = tmp->next) { m = (struct master *) tmp->data; uservers_to_servers (&m->uservers, &m->servers); master_list_add (masters, servers, uservers, m); } } int source_has_masters_to_update (GSList *source) { GSList *tmp; struct master *m; for (tmp = source; tmp; tmp = tmp->next) { m = (struct master *) tmp->data; if (m->isgroup) { if (source_has_masters_to_update (m->masters)) return TRUE; } else { if (m != favorites) return TRUE; } } return FALSE; } int source_has_masters_to_delete (GSList *source) { GSList *tmp; struct master *m; for (tmp = source; tmp; tmp = tmp->next) { m = (struct master *) tmp->data; if (m != favorites && !m->isgroup) return TRUE; } return FALSE; } GSList *references_to_server (struct server *s) { GSList *list; GSList *res = NULL; struct master *m; for (list = all_masters; list; list = list->next) { m = (struct master *) list->data; if (g_slist_find (m->servers, s)) res = g_slist_append (res, m); } return res; } enum master_query_type get_master_query_type_from_address(char* address) { enum master_query_type type; // check for known master prefix debug(6,"get_master_query_type_from_address(%s)",address); for (type=MASTER_NATIVE;typenext) { m = (struct master *) list->data; if (m->master_type == MASTER_GSLIST) return TRUE; } return FALSE; } gboolean have_gslist_installed() { char* gslist = find_file_in_path("gslist"); g_free(gslist); return (gslist != NULL); } void master_remove_server(struct master* m, struct server* s) { if(!m || !s) return; m->servers = server_list_remove(m->servers, s); } void server_remove_from_all(struct server *s) { GSList *list; struct master *m; for (list = all_masters; list; list = list->next) { m = (struct master *) list->data; if (m == favorites) continue; m->servers = server_list_remove(m->servers, s); } } xqf-1.0.5/src/source.h0000644002404400000620000000516010445245312011472 00000000000000/* XQF - Quake server browser and launcher * Copyright (C) 1998-2000 Roman Pozlevich * * 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 */ #ifndef __SOURCE_H__ #define __SOURCE_H__ #include "xqf.h" #define FILENAME_FAVORITES "favorites" #define FILENAME_LISTS "lists" #define FILENAME_SRVINFO "srvinfo" //#define PREFIX_MASTER "master://" //#define PREFIX_GMASTER "gmaster://" //#define PREFIX_URL_HTTP "http://" #define ACTION_ADD "ADD" #define ACTION_DELETE "DELETE" extern char* master_prefixes[MASTER_NUM_QUERY_TYPES]; extern char* master_designation[MASTER_NUM_QUERY_TYPES]; extern struct master *favorites; extern GSList *master_groups; extern struct master *add_master (char *path, char *name, enum server_type type, const char* qstat_query_arg, int user, int lookup_only); extern void free_master (struct master *m); extern void save_favorites (void); extern void init_masters (int autoupdate); extern void update_master_list_builtin (void); extern void update_master_gslist_builtin (void); extern void free_masters (void); extern void collate_server_lists (GSList *masters, GSList **servers, GSList **uservers); extern void master_selection_to_lists (GSList *list, GSList **masters, GSList **servers, GSList **uservers); extern int source_has_masters_to_update (GSList *source); extern int source_has_masters_to_delete (GSList *source); extern GSList *references_to_server (struct server *s); extern enum master_query_type get_master_query_type_from_address(char* address); /** \brief check whether any gslist master is configured */ extern gboolean have_gslist_masters(); /** \brief check whether the gslist program is in $PATH */ extern gboolean have_gslist_installed(); void master_remove_server(struct master* m, struct server* s); void server_remove_from_all(struct server *s); #endif /* __SOURCE_H__ */ xqf-1.0.5/src/xqf-ui.c0000644002404400000620000006255210354466164011417 00000000000000/* XQF - Quake server browser and launcher * Copyright (C) 1998-2000 Roman Pozlevich * * 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 */ #include "gnuconfig.h" #include #include #include /* va_start, va_end */ #include #include #include "i18n.h" #include "xqf.h" #include "xqf-ui.h" #include "srv-list.h" #include "source.h" #include "game.h" #include "config.h" #include "sort.h" #include "pref.h" #include "debug.h" #include "trayicon.h" static GSList *xqf_windows = NULL; static GtkWidget *target_window = NULL; GtkWidget *pane1_widget; GtkWidget *pane2_widget; GtkWidget *pane3_widget; /* If you add a column here to appear in the server list, you need to also add an entry in sort.h and sort.c */ static struct clist_column server_columns[] = { { name: N_("Name"), width: 180, justify: GTK_JUSTIFY_LEFT, sort_mode: { SORT_SERVER_NAME, SORT_SERVER_TYPE, -1 }, sort_name: { NULL, N_("Type") }, }, { name: N_("Address"), width: 140, justify: GTK_JUSTIFY_LEFT, sort_mode: { SORT_SERVER_ADDRESS, SORT_SERVER_COUNTRY, -1 }, sort_name: { NULL, N_("Country") }, }, { name: N_("Ping"), width: 45, justify: GTK_JUSTIFY_RIGHT, sort_mode: { SORT_SERVER_PING, -1 } }, { name: N_("TO"), width: 35, justify: GTK_JUSTIFY_RIGHT, sort_mode: { SORT_SERVER_TO, -1 } }, { name: N_("Priv"), width: 35, justify: GTK_JUSTIFY_RIGHT, sort_mode: { SORT_SERVER_PRIVATE, SORT_SERVER_ANTICHEAT, -1 }, // Translator: "PunkBuster" sort_name: { NULL, N_("PB") }, }, { name: N_("Players"), width: 65, justify: GTK_JUSTIFY_RIGHT, sort_mode: { SORT_SERVER_PLAYERS, SORT_SERVER_MAXPLAYERS, -1 }, // Translator: Max as in max players sort_name: { NULL, N_("Max") }, }, { name: N_("Map"), width: 55, justify: GTK_JUSTIFY_LEFT, sort_mode: { SORT_SERVER_MAP, -1 } }, { name: N_("Game"), width: 55, justify: GTK_JUSTIFY_LEFT, sort_mode: { SORT_SERVER_GAME, -1 } }, { name: N_("GameType"), width: 55, justify: GTK_JUSTIFY_LEFT, sort_mode: { SORT_SERVER_GAMETYPE, -1 } }, }; struct clist_def server_clist_def = { CWIDGET_CLIST, "Server List", server_columns, 9, GTK_SELECTION_EXTENDED, 630, 270, SORT_SERVER_PING, GTK_SORT_ASCENDING }; static struct clist_column player_columns[] = { { name: N_("Name"), width: 100, justify: GTK_JUSTIFY_LEFT, sort_mode: { SORT_PLAYER_NAME, -1 }, }, { name: N_("Frags"), width: 50, justify: GTK_JUSTIFY_RIGHT, sort_mode: { SORT_PLAYER_FRAGS, -1 }, }, { name: N_("Colors"), width: 60, justify: GTK_JUSTIFY_LEFT, sort_mode: { SORT_PLAYER_COLOR, -1 }, }, { name: N_("Skin"), width: 50, justify: GTK_JUSTIFY_LEFT, sort_mode: { SORT_PLAYER_SKIN, -1 }, }, { name: N_("Ping"), width: 45, justify: GTK_JUSTIFY_RIGHT, sort_mode: { SORT_PLAYER_PING, -1 }, }, { name: N_("Time"), width: 45, justify: GTK_JUSTIFY_LEFT, sort_mode: { SORT_PLAYER_TIME, -1 }, } }; struct clist_def player_clist_def = { CWIDGET_CLIST, "Player List", player_columns, 6, GTK_SELECTION_SINGLE, 400, 180, SORT_PLAYER_FRAGS, GTK_SORT_DESCENDING }; static struct clist_column srvinf_columns[] = { { name: N_("Rule"), width: 90, justify: GTK_JUSTIFY_LEFT, sort_mode: { SORT_INFO_RULE, -1 }, }, { name: N_("Value"), width: 80, justify: GTK_JUSTIFY_LEFT, sort_mode: { SORT_INFO_VALUE, -1 }, } }; struct clist_def srvinf_clist_def = { CWIDGET_CTREE, "Rule List", srvinf_columns, 2, GTK_SELECTION_SINGLE, 210, 180, SORT_INFO_RULE, GTK_SORT_ASCENDING }; void print_status (GtkWidget *sbar, char *fmt, ...) { unsigned context_id; char buf[1024]; va_list ap; if (sbar) { buf[0] = ' '; /* indent */ buf[1] = '\0'; if (fmt) { va_start (ap, fmt); g_vsnprintf (buf + 1, 1024 - 1, fmt, ap); va_end (ap); } #ifdef DEBUG fprintf (stderr, "Status: %s\n", buf); #endif context_id = gtk_statusbar_get_context_id (GTK_STATUSBAR (sbar), "XQF"); gtk_statusbar_pop (GTK_STATUSBAR (sbar), context_id); gtk_statusbar_push (GTK_STATUSBAR (sbar), context_id, buf); if (default_show_tray_icon) tray_icon_set_tooltip(buf); } } int window_delete_event_callback (GtkWidget *widget, gpointer data) { if (default_show_tray_icon && tray_icon_work()) { tray_delete_event_hook(); } else { target_window = widget; gtk_widget_destroy ((GtkWidget *) (xqf_windows->data)); } return TRUE; } void register_window (GtkWidget *window) { xqf_windows = g_slist_prepend (xqf_windows, window); debug(6, "%p", window); } void unregister_window (GtkWidget *window) { GSList *first; first = xqf_windows; xqf_windows = g_slist_next (xqf_windows); g_slist_free_1 (first); if (target_window && target_window != window) gtk_widget_destroy ((GtkWidget *) (xqf_windows->data)); else target_window = NULL; debug(6, "%p", window); } GtkWidget *top_window (void) { if (xqf_windows) return (GtkWidget *) xqf_windows->data; else return NULL; } static void clist_column_set_title (GtkCList *clist, struct clist_def *cldef, int set_mark) { char buf[256]; if (set_mark) { const char* name = cldef->cols[clist->sort_column].sort_name[cldef->cols[clist->sort_column].current_sort_mode]; g_snprintf (buf, 128, "%s %c", _(cldef->cols[clist->sort_column].name), (clist->sort_type == GTK_SORT_DESCENDING)? '>' : '<'); if(name) { snprintf(buf+strlen(buf), sizeof(buf)-strlen(buf), " (%s)", _(name)); } gtk_label_set (GTK_LABEL (cldef->cols[clist->sort_column].widget), buf); } else { gtk_label_set (GTK_LABEL (cldef->cols[clist->sort_column].widget), _(cldef->cols[clist->sort_column].name)); } } GtkWidget *create_cwidget (GtkWidget *scrollwin, struct clist_def *cldef) { GtkWidget *alignment; GtkWidget *label; GtkWidget *clist; char buf[256]; int i; switch (cldef->type) { case CWIDGET_CLIST: clist = gtk_clist_new (cldef->columns); break; case CWIDGET_CTREE: clist = gtk_ctree_new (cldef->columns, 0); gtk_ctree_set_line_style (GTK_CTREE (clist), GTK_CTREE_LINES_NONE); gtk_ctree_set_expander_style (GTK_CTREE (clist), GTK_CTREE_EXPANDER_TRIANGLE); gtk_ctree_set_indent (GTK_CTREE (clist), 10); break; default: return NULL; } gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrollwin), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); GTK_CLIST_SET_FLAG (GTK_CLIST (clist), CLIST_SHOW_TITLES); gtk_container_add (GTK_CONTAINER (scrollwin), clist); gtk_clist_set_selection_mode (GTK_CLIST (clist), cldef->mode); for (i = 0; i < cldef->columns; i++) { g_snprintf (buf, 256, "/" CONFIG_FILE "/%s Geometry/%s=%d", cldef->name, cldef->cols[i].name, cldef->cols[i].width); gtk_clist_set_column_width (GTK_CLIST (clist), i, config_get_int (buf)); if (cldef->cols[i].justify != GTK_JUSTIFY_LEFT) { gtk_clist_set_column_justification (GTK_CLIST (clist), i, cldef->cols[i].justify); } alignment = gtk_alignment_new (0.0, 0.5, 0.0, 0.0); label = gtk_label_new (_(cldef->cols[i].name)); gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT); gtk_container_add (GTK_CONTAINER (alignment), label); gtk_widget_show (label); cldef->cols[i].widget = label; gtk_clist_set_column_widget (GTK_CLIST (clist), i, alignment); gtk_widget_show (alignment); } gtk_clist_set_sort_column (GTK_CLIST (clist), cldef->sort_column); gtk_clist_set_sort_type (GTK_CLIST (clist), cldef->sort_type); clist_column_set_title (GTK_CLIST (clist), cldef, TRUE); return clist; } #define DIMOF(arr) (sizeof(arr)/sizeof(arr[0])) void clist_set_sort_column (GtkCList *clist, int column, struct clist_def *cldef) { if (column == clist->sort_column) { if(clist->sort_type == GTK_SORT_DESCENDING) { cldef->cols[column].current_sort_mode = ++cldef->cols[column].current_sort_mode%DIMOF(cldef->cols[column].sort_mode); if(cldef->cols[column].sort_mode[cldef->cols[column].current_sort_mode] == -1) cldef->cols[column].current_sort_mode = 0; } gtk_clist_set_sort_type (clist, GTK_SORT_DESCENDING + GTK_SORT_ASCENDING - clist->sort_type); } else { cldef->cols[column].current_sort_mode = 0; clist_column_set_title (clist, cldef, FALSE); gtk_clist_set_sort_column (clist, column); } debug(3, "%d %hhd", column, cldef->cols[column].current_sort_mode); clist_column_set_title (clist, cldef, TRUE); gtk_clist_sort (clist); if (clist == server_clist) { server_clist_selection_visible (); } } void source_ctree_show_node_status (GtkWidget *ctree, struct master *m) { GtkCTreeNode *node; struct pixmap *pix = NULL; int is_leaf; int expanded; node = gtk_ctree_find_by_row_data (GTK_CTREE (ctree), NULL, m); if (m->isgroup || m == favorites) { pix = games[m->type].pix; } else { pix = &server_status[m->state]; } gtk_ctree_get_node_info (GTK_CTREE (ctree), node, NULL, NULL, NULL, NULL, NULL, NULL, &is_leaf, &expanded); gtk_ctree_set_node_info (GTK_CTREE (ctree), node, _(m->name), 4, (pix)? pix->pix : NULL, (pix)? pix->mask : NULL, (pix)? pix->pix : NULL, (pix)? pix->mask : NULL, is_leaf, expanded); } static void source_ctree_enable_master_group (GtkWidget *ctree, struct master *m, int expand) { GtkCTreeNode *node; GtkCTreeNode *sibling = NULL; char cfgkey[128]; GSList *list; int expanded; if (!m->isgroup) return; node = gtk_ctree_find_by_row_data (GTK_CTREE (ctree), NULL, m); if (node != NULL) { if (expand) gtk_ctree_expand (GTK_CTREE (ctree), node); return; } g_snprintf (cfgkey, 128, "/" CONFIG_FILE "/Source Tree/%s node collapsed=false", m->name); if (expand) config_set_bool (cfgkey, expanded = TRUE); else expanded = TRUE - config_get_bool (cfgkey); /* Find the place to insert new master group */ list = g_slist_nth (master_groups, m->type); if (list) list = list->next; while (!sibling && list) { sibling = gtk_ctree_find_by_row_data (GTK_CTREE (ctree), NULL, (struct master *) list->data); list = list->next; } node = gtk_ctree_insert_node (GTK_CTREE (ctree), NULL, sibling, NULL, 4, NULL, NULL, NULL, NULL, FALSE, expanded); gtk_ctree_node_set_row_data (GTK_CTREE (ctree), node, m); source_ctree_show_node_status (ctree, m); } /* * Add master or update master's name if master is already in tree * This function works only on non-group masters */ void source_ctree_add_master (GtkWidget *ctree, struct master *m) { GtkCTreeNode *node; GtkCTreeNode *parent = NULL; struct master *group = NULL; if (m->isgroup) return; // If set to display only configured games, and game is not configured, // and it's not the 'Favorites' master, just return so the display // isn't updated with the game type and masters. if (!(games[m->type].cmd) && default_show_only_configured_games && m != favorites) return; if (m->type != UNKNOWN_SERVER) { group = (struct master *) g_slist_nth_data (master_groups, m->type); source_ctree_enable_master_group (ctree, group, TRUE); } node = gtk_ctree_find_by_row_data (GTK_CTREE (ctree), NULL, m); if (!node) { if (group) { parent = gtk_ctree_find_by_row_data (GTK_CTREE (ctree), NULL, group); } node = gtk_ctree_insert_node (GTK_CTREE (ctree), parent, NULL, NULL, 4, NULL, NULL, NULL, NULL, TRUE, FALSE); gtk_ctree_node_set_row_data (GTK_CTREE (ctree), node, m); } source_ctree_show_node_status (ctree, m); } //static void source_ctree_remove_master_group (GtkWidget *ctree, void source_ctree_remove_master_group (GtkWidget *ctree, struct master *m) { GtkCTreeNode *node; if (!m->isgroup) return; node = gtk_ctree_find_by_row_data (GTK_CTREE (ctree), NULL, m); if (node) { gtk_ctree_remove_node (GTK_CTREE (ctree), node); } } void source_ctree_delete_master (GtkWidget *ctree, struct master *m) { GtkCTreeNode *node; struct master *group; node = gtk_ctree_find_by_row_data (GTK_CTREE (ctree), NULL, m); if (!node) return; gtk_ctree_remove_node (GTK_CTREE (ctree), node); /* Remove empty master group from the tree */ if (m->type != UNKNOWN_SERVER) { group = (struct master *) g_slist_nth_data (master_groups, m->type); if (group && (group->masters == NULL || (g_slist_length (group->masters) == 1 && group->masters->data == m))) { source_ctree_remove_master_group (ctree, group); } } } static void fill_source_ctree (GtkWidget *ctree) { GSList *list; GSList *list2; GtkCTreeNode *node; GtkCTreeNode *parent; struct master *group; struct master *m; source_ctree_add_master (ctree, favorites); for (list = master_groups; list; list = list->next) { group = (struct master *) list->data; if (group->masters) { // If set to display only configured games, and game is not configured, // don't update the display with the master. if (games[group->type].cmd || !default_show_only_configured_games) { source_ctree_enable_master_group (ctree, group, FALSE); parent = gtk_ctree_find_by_row_data (GTK_CTREE (ctree), NULL, group); for (list2 = group->masters; list2; list2 = list2->next) { m = (struct master *) list2->data; node = gtk_ctree_insert_node (GTK_CTREE (ctree), parent, NULL, NULL, 4, NULL, NULL, NULL, NULL, TRUE, FALSE); gtk_ctree_node_set_row_data (GTK_CTREE (ctree), node, m); source_ctree_show_node_status (ctree, m); } } } } } GtkWidget *create_source_ctree (GtkWidget *scrollwin) { char *titles[1] = { _("Source") }; GtkWidget *ctree; gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrollwin), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); ctree = gtk_ctree_new_with_titles (1, 0, titles); gtk_container_add (GTK_CONTAINER (scrollwin), ctree); gtk_clist_set_selection_mode (GTK_CLIST (ctree), GTK_SELECTION_EXTENDED); gtk_ctree_set_line_style (GTK_CTREE (ctree), GTK_CTREE_LINES_NONE); gtk_ctree_set_expander_style (GTK_CTREE (ctree), GTK_CTREE_EXPANDER_TRIANGLE); gtk_ctree_set_indent (GTK_CTREE (ctree), 10); fill_source_ctree (ctree); return ctree; } void source_ctree_select_source (struct master *m) { GtkCTreeNode *node; GtkVisibility vis; node = gtk_ctree_find_by_row_data (GTK_CTREE (source_ctree), NULL, m); gtk_ctree_unselect_recursive (GTK_CTREE (source_ctree), NULL); gtk_ctree_select (GTK_CTREE (source_ctree), node); vis = gtk_ctree_node_is_visible (GTK_CTREE (source_ctree), node); if (vis != GTK_VISIBILITY_FULL) gtk_ctree_node_moveto (GTK_CTREE (source_ctree), node, 0, 0.2, 0.0); } int calculate_clist_row_height (GtkWidget *clist, GdkPixmap *pixmap) { int pix_h, pix_w; int height; gdk_window_get_size (pixmap, &pix_w, &pix_h); /*FIXME_GTK2: style->font not working with gtk2*/ #ifdef USE_GTK2 height=pix_h+1; #else height = MAX (pix_h, clist->style->font->ascent + clist->style->font->descent + 1); if (height == pix_h + 1) height++; /* beautify selection */ #endif return height; } void set_toolbar_appearance (GtkToolbar *toolbar, int style, int tips) { /*FIXME_GTK2: gtk_toolbar_set_button_relief (), gtk_toolbar_set_space_style () */ /*gtk_toolbar_set_space_size () is deprecated*/ #ifdef USE_GTK2 switch (style) { case 0: gtk_toolbar_set_style (toolbar, GTK_TOOLBAR_ICONS); break; case 1: gtk_toolbar_set_style (toolbar, GTK_TOOLBAR_TEXT); break; case 2: gtk_toolbar_set_style (toolbar, GTK_TOOLBAR_BOTH); break; default: break; } #else switch (style) { case 0: gtk_toolbar_set_style (toolbar, GTK_TOOLBAR_ICONS); gtk_toolbar_set_button_relief (toolbar, GTK_RELIEF_NONE); gtk_toolbar_set_space_style (toolbar, GTK_TOOLBAR_SPACE_LINE); gtk_toolbar_set_space_size (toolbar, 16); break; case 1: gtk_toolbar_set_style (toolbar, GTK_TOOLBAR_TEXT); gtk_toolbar_set_button_relief (toolbar, GTK_RELIEF_NORMAL); gtk_toolbar_set_space_style (toolbar, GTK_TOOLBAR_SPACE_EMPTY); gtk_toolbar_set_space_size (toolbar, 8); break; case 2: gtk_toolbar_set_style (toolbar, GTK_TOOLBAR_BOTH); gtk_toolbar_set_button_relief (toolbar, GTK_RELIEF_NONE); gtk_toolbar_set_space_style (toolbar, GTK_TOOLBAR_SPACE_LINE); gtk_toolbar_set_space_size (toolbar, 16); break; default: break; } #endif gtk_toolbar_set_tooltips (toolbar, tips); } /******************************* Progress Bar *****************************/ struct pbarinfo { int activity_mode; int timeout_id; }; static void progress_bar_destroy_event (GtkWidget* widget) { struct pbarinfo *info; info = gtk_object_get_user_data (GTK_OBJECT (widget)); if (info->activity_mode) gtk_timeout_remove (info->timeout_id); g_free (info); } GtkWidget *create_progress_bar (void) { GtkWidget *pbar; struct pbarinfo *info; pbar = gtk_progress_bar_new (); info = g_malloc0 (sizeof (struct pbarinfo)); gtk_object_set_user_data (GTK_OBJECT (pbar), info); gtk_signal_connect (GTK_OBJECT (pbar), "destroy", (GtkSignalFunc) progress_bar_destroy_event, NULL); gtk_progress_set_format_string (GTK_PROGRESS (pbar), "%1p%%"); /* gtk_progress_configure (GTK_PROGRESS (pbar), 0.0, 0.0, 100.0); */ gtk_progress_bar_set_activity_step (GTK_PROGRESS_BAR (pbar), 5); return pbar; } void progress_bar_reset (GtkWidget *pbar) { struct pbarinfo *info; info = gtk_object_get_user_data (GTK_OBJECT (pbar)); if (info->activity_mode) { gtk_timeout_remove (info->timeout_id); info->activity_mode = FALSE; } gtk_progress_set_activity_mode (GTK_PROGRESS (pbar), FALSE); gtk_progress_set_show_text (GTK_PROGRESS (pbar), FALSE); gtk_progress_set_percentage (GTK_PROGRESS (pbar), 0.0); } static int progress_bar_timeout_callback (GtkWidget *pbar) { gfloat new_val; GtkAdjustment *adj; adj = GTK_PROGRESS (pbar)->adjustment; new_val = adj->value + 1; if (new_val > adj->upper) new_val = adj->lower; gtk_progress_set_value (GTK_PROGRESS (pbar), new_val); return TRUE; } void progress_bar_start (GtkWidget *pbar, int activity_mode) { struct pbarinfo *info; progress_bar_reset (pbar); if (activity_mode) { info = gtk_object_get_user_data (GTK_OBJECT (pbar)); info->activity_mode = TRUE; info->timeout_id = gtk_timeout_add (100, (GtkFunction) progress_bar_timeout_callback, pbar); gtk_progress_set_activity_mode (GTK_PROGRESS (pbar), TRUE); } else { gtk_progress_set_show_text (GTK_PROGRESS (pbar), TRUE); } } void progress_bar_set_percentage (GtkWidget *pbar, float percentage) { struct pbarinfo *info; info = gtk_object_get_user_data (GTK_OBJECT (pbar)); if (!info->activity_mode) gtk_progress_set_percentage (GTK_PROGRESS (pbar), percentage); } static void save_cwidget_geometry (GtkWidget *clist, struct clist_def *cldef) { char buf[256]; int i; g_snprintf (buf, 256, "/" CONFIG_FILE "/%s Geometry/", cldef->name); config_push_prefix (buf); for (i = 0; i < cldef->columns; i++) config_set_int (cldef->cols[i].name, GTK_CLIST (clist)->column[i].width); config_pop_prefix (); } void ui_done (void) { GtkCTreeNode *node; char cfgkey[128]; int expanded; GSList *list; struct master *m; save_cwidget_geometry (GTK_WIDGET (server_clist), &server_clist_def); save_cwidget_geometry (GTK_WIDGET (player_clist), &player_clist_def); save_cwidget_geometry (GTK_WIDGET (srvinf_ctree), &srvinf_clist_def); config_push_prefix ("/" CONFIG_FILE "/Main Window Geometry/"); config_set_int ("height", main_window->allocation.height); config_set_int ("width", main_window->allocation.width); config_set_int ("pane1", GTK_PANED (pane1_widget)->child1->allocation.width); config_set_int ("pane2", GTK_PANED (pane2_widget)->child1->allocation.height); config_set_int ("pane3", GTK_PANED (pane3_widget)->child1->allocation.width); config_pop_prefix (); config_clean_section ("/" CONFIG_FILE "/Source Tree"); for (list = master_groups; list; list = list->next) { m = (struct master *) list->data; if (m->isgroup) { node = gtk_ctree_find_by_row_data (GTK_CTREE (source_ctree), NULL, m); if (node) { gtk_ctree_get_node_info (GTK_CTREE (source_ctree), node, NULL, NULL, NULL, NULL, NULL, NULL, NULL, &expanded); if (!expanded) { g_snprintf (cfgkey, 128, "/" CONFIG_FILE "/Source Tree/%s node collapsed=false", m->name); config_set_bool (cfgkey, TRUE - expanded); } } } } } void restore_main_window_geometry (void) { int height, width; int pane1, pane2, pane3; config_push_prefix ("/" CONFIG_FILE "/Main Window Geometry/"); height = config_get_int ("height=480"); width = config_get_int ("width=640"); pane1 = config_get_int ("pane1"); pane2 = config_get_int ("pane2"); pane3 = config_get_int ("pane3"); config_pop_prefix (); if (height && width) { /* gtk_widget_set_usize (GTK_WIDGET (main_window), width, height); */ gtk_window_set_default_size (GTK_WINDOW (main_window), width, height); } gtk_paned_set_position (GTK_PANED (pane1_widget), (pane1)? pane1 : 120); /*FIXME_GTK2: GTK_PANED ()->gutter_size is not working, do not know why*/ #ifdef USE_GTK2 gtk_paned_set_position (GTK_PANED (pane2_widget), (pane2)? pane2 : server_clist_def.height +4); gtk_paned_set_position (GTK_PANED (pane3_widget), (pane3)? pane3 : player_clist_def.height + 4); #else gtk_paned_set_position (GTK_PANED (pane2_widget), (pane2)? pane2 : server_clist_def.height + GTK_PANED (pane2_widget)->gutter_size/2); gtk_paned_set_position (GTK_PANED (pane3_widget), (pane3)? pane3 : player_clist_def.height + GTK_PANED (pane3_widget)->gutter_size/2); #endif } GtkWidget* lookup_widget (GtkWidget* widget, const gchar* widget_name) { GtkWidget *parent, *found_widget; for (;;) { if (GTK_IS_MENU (widget)) parent = gtk_menu_get_attach_widget (GTK_MENU (widget)); else parent = widget->parent; if (parent == NULL) break; widget = parent; } found_widget = (GtkWidget*) gtk_object_get_data (GTK_OBJECT (widget), widget_name); if (!found_widget) g_warning ("Widget not found: %s", widget_name); return found_widget; } // Skip a game if it's not configured and show only configured is enabled gboolean create_server_type_menu_filter_configured(enum server_type type) { if (!games[type].cmd && default_show_only_configured_games) return FALSE; else return TRUE; } GtkWidget *create_server_type_menu (int active_type, gboolean (*filterfunc)(enum server_type), GtkSignalFunc callback) { GtkWidget *option_menu = NULL; GtkWidget *menu = NULL; GtkWidget *menu_item = NULL; GtkWidget *first_menu_item = NULL; int i; int j = 0; int menu_type = 0; option_menu = gtk_option_menu_new (); menu = gtk_menu_new (); for (i = 0; i < GAMES_TOTAL; ++i) { if(filterfunc && !filterfunc(i)) continue; menu_item = gtk_menu_item_new (); if (i == active_type) { first_menu_item = menu_item; menu_type = j; } else if (!first_menu_item) first_menu_item = menu_item; gtk_menu_append (GTK_MENU (menu), menu_item); gtk_container_add (GTK_CONTAINER (menu_item), game_pixmap_with_label (i)); if(callback) gtk_signal_connect (GTK_OBJECT (menu_item), "activate", GTK_SIGNAL_FUNC (callback), GINT_TO_POINTER(i)); gtk_widget_show (menu_item); ++j; // must be here in case the continue was used } gtk_option_menu_set_menu (GTK_OPTION_MENU (option_menu), menu); // initiates callback to set servertype to first configured game if(active_type != -1 && first_menu_item) { gtk_menu_item_activate (GTK_MENU_ITEM (first_menu_item)); gtk_option_menu_set_history (GTK_OPTION_MENU (option_menu), menu_type); } return option_menu; } xqf-1.0.5/src/xqf-ui.h0000644002404400000620000001077010275430450011406 00000000000000/* XQF - Quake server browser and launcher * Copyright (C) 1998-2000 Roman Pozlevich * * 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 */ #ifndef XQF_UI_H__ #define XQF_UI_H__ #include #include struct clist_column { const char *name; int width; GtkJustification justify; GtkWidget *widget; const char* const sort_name[3]; signed char sort_mode[3]; unsigned char current_sort_mode; }; enum cwidget_type { CWIDGET_CLIST = 0, CWIDGET_CTREE }; struct clist_def { enum cwidget_type type; char *name; struct clist_column *cols; int columns; GtkSelectionMode mode; int width; int height; int sort_column; GtkSortType sort_type; }; extern struct clist_def server_clist_def; extern struct clist_def player_clist_def; extern struct clist_def srvinf_clist_def; extern GtkWidget *pane1_widget; extern GtkWidget *pane2_widget; extern GtkWidget *pane3_widget; extern GtkWidget *main_window; extern GtkWidget *source_ctree; extern GtkCList *server_clist; extern GtkCList *player_clist; extern GtkCTree *srvinf_ctree; extern GtkWidget *view_hostnames_menu_item; extern GtkWidget *view_defport_menu_item; extern int window_delete_event_callback (GtkWidget *widget, gpointer data); extern void register_window (GtkWidget *window); extern void unregister_window (GtkWidget *window); extern GtkWidget *top_window (void); extern void set_widgets_sensitivity (void); extern GtkWidget *server_filter_widget[]; extern void print_status (GtkWidget *sbar, char *fmt, ...); extern GtkWidget *create_cwidget (GtkWidget *scrollwin, struct clist_def *cldef); extern int clist_change_sort_mode (struct clist_def *cldef, int col); extern void clist_set_sort_column (GtkCList *clist, int column, struct clist_def *cldef); extern void source_ctree_show_node_status (GtkWidget *ctree, struct master *m); extern void source_ctree_add_master (GtkWidget *ctree, struct master *m); extern void source_ctree_delete_master (GtkWidget *ctree, struct master *m); extern void source_ctree_remove_master_group (GtkWidget *ctree, struct master *m); extern GtkWidget *create_source_ctree (GtkWidget *scrollwin); extern void source_ctree_select_source (struct master *m); extern int calculate_clist_row_height (GtkWidget *clist, GdkPixmap *pixmap); extern void set_toolbar_appearance (GtkToolbar *toolbar, int style, int tips); extern GtkWidget *create_progress_bar (void); extern void progress_bar_reset (GtkWidget *pbar); extern void progress_bar_start (GtkWidget *pbar, int activity_mode); extern void progress_bar_set_percentage (GtkWidget *pbar, float percentage); extern void ui_done (void); extern void restore_main_window_geometry (void); extern GtkTooltips *tooltips; /* * This function returns a widget in a component created by Glade. * Call it with the toplevel widget in the component (i.e. a window/dialog), * or alternatively any widget in the component, and the name of the widget * you want returned. */ GtkWidget* lookup_widget (GtkWidget* widget, const gchar* widget_name); /** create a GtkOptionMenu that contains all game names @param active_type which game to set active by default. set to -1 for none @param filterfunc only add game to menu if this function return true. can be NULL to show all @param callback a callback function to connect if a game entry is activated. the user_data will be set to the game type @return a GtkOptionMenu */ GtkWidget *create_server_type_menu (int active_type, gboolean (*filterfunc)(enum server_type), GtkSignalFunc callback); /** Skip a game if it's not configured and show only configured is enabled */ gboolean create_server_type_menu_filter_configured(enum server_type type); #endif /* XQF_UI_H__ */ xqf-1.0.5/src/splash.c0000644002404400000620000001060410150364610011452 00000000000000/* XQF - Quake server browser and launcher * Splash screen * Copyright (C) 2002 Ludwig Nussel * * 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 */ #include "gnuconfig.h" #include #include #include #include #include #include #include "splash.h" #include "xqf-ui.h" #include "loadpixmap.h" #include "i18n.h" #include "pref.h" #include "xutils.h" static GtkWidget* splashscreen; static guint current_progress; void destroy_splashscreen(void) { if(!splashscreen) return; gtk_widget_destroy(splashscreen); splashscreen = NULL; } void create_splashscreen (void) { GtkWidget *vbox1; GtkWidget *logo; GtkWidget *entry; GtkWidget *progress; if(splashscreen) return; if(!default_show_splash) return; splashscreen = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_object_set_data (GTK_OBJECT (splashscreen), "splashscreen", splashscreen); gtk_window_set_title (GTK_WINDOW (splashscreen), _("XQF: Loading")); gtk_window_set_position (GTK_WINDOW (splashscreen), GTK_WIN_POS_CENTER); gtk_window_set_modal (GTK_WINDOW (splashscreen), TRUE); #ifdef USE_GTK2 gtk_window_set_type_hint(GTK_WINDOW (splashscreen), GDK_WINDOW_TYPE_HINT_SPLASHSCREEN); #endif vbox1 = gtk_vbox_new (FALSE, 0); gtk_widget_ref (vbox1); gtk_object_set_data_full (GTK_OBJECT (splashscreen), "vbox1", vbox1, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (vbox1); gtk_container_add (GTK_CONTAINER (splashscreen), vbox1); gtk_container_set_border_width (GTK_CONTAINER (vbox1), 3); logo = load_pixmap (splashscreen, "splash.png"); gtk_widget_ref (logo); gtk_object_set_data_full (GTK_OBJECT (splashscreen), "logo", logo, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (logo); gtk_box_pack_start (GTK_BOX (vbox1), logo, TRUE, TRUE, 0); entry = gtk_entry_new (); gtk_widget_ref (entry); gtk_object_set_data_full (GTK_OBJECT (splashscreen), "entry", entry, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (entry); gtk_box_pack_start (GTK_BOX (vbox1), entry, FALSE, FALSE, 0); gtk_entry_set_editable (GTK_ENTRY (entry), FALSE); gtk_entry_set_text (GTK_ENTRY (entry), _("Loading ...")); progress = gtk_progress_bar_new (); gtk_widget_ref (progress); gtk_object_set_data_full (GTK_OBJECT (splashscreen), "progress", progress, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (progress); gtk_box_pack_start (GTK_BOX (vbox1), progress, FALSE, FALSE, 0); gtk_progress_configure (GTK_PROGRESS (progress), 42, 0, 100); gtk_signal_connect (GTK_OBJECT (splashscreen), "destroy", GTK_SIGNAL_FUNC (destroy_splashscreen), NULL); gtk_widget_show (splashscreen); // force it to draw now. gdk_flush(); // go into main loop, processing events. while (gtk_events_pending() || !GTK_WIDGET_REALIZED(logo)) gtk_main_iteration(); // test while (gdk_events_pending()) gdk_flush(); current_progress = 0; } /* set percentage on splash screen, thanks to lopster for this code */ void splash_set_progress(const char* message, guint per) { GtkProgressBar* progress; GtkEntry* entry; if (!splashscreen) return; if (per > 100) per = 100; current_progress = per; progress = GTK_PROGRESS_BAR(lookup_widget(splashscreen, "progress")); entry = GTK_ENTRY(lookup_widget(splashscreen, "entry")); if (message) gtk_entry_set_text(entry, message); gtk_progress_bar_update(progress, per*1.0/100); while (gtk_events_pending()) gtk_main_iteration(); } void splash_increase_progress(const char* message, guint per) { if(!splashscreen) return; splash_set_progress(message,current_progress+per); } xqf-1.0.5/src/splash.h0000644002404400000620000000235207612633113011466 00000000000000/* XQF - Quake server browser and launcher * Splash screen * Copyright (C) 2002 Ludwig Nussel * * 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 */ #ifndef SPLASH_H #define SPLASH_H #include #define MAPLOAD_PERCENT .8 void create_splashscreen (void); void destroy_splashscreen(void); /* set percentage on splash screen to absolute value, thanks to lopster for * this code */ void splash_set_progress(const char* message, guint per); /* add per to current percentage */ void splash_increase_progress(const char* message, guint per); #endif xqf-1.0.5/src/skin_pcx.c0000644002404400000620000000771407201342721012010 00000000000000/* XQF - Quake server browser and launcher * Copyright (C) 1998-2000 Roman Pozlevich * * 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 */ #include #include /* FILE */ #include /* malloc */ #include /* memset */ #include "skin_pcx.h" struct pcx_header { unsigned char manufacturer; unsigned char version; unsigned char encoding; unsigned char bitsperpixel; unsigned char nplanes; unsigned bytesperline; unsigned width; unsigned height; }; static int check_pcx_header (FILE *f, struct pcx_header *h, int quake2) { unsigned char raw[128]; if (fread (raw, 128, 1, f) != 1) { #ifdef DEBUG fprintf (stderr, "Cannot read PCX header\n"); #endif return 0; } h->manufacturer = raw[0]; h->version = raw[1]; h->encoding = raw[2]; h->bitsperpixel = raw[3]; h->nplanes = raw[65]; h->bytesperline = raw[66] + (raw[67] << 8); h->width = (raw[9] << 8) + raw[8] - ((raw[5] << 8) + raw[4]) + 1; h->height = (raw[11] << 8) + raw[10] - ((raw[7] << 8) + raw[6]) + 1; if (h->manufacturer != 10 || h->encoding != 1 || h->bitsperpixel != 8 || h->nplanes != 1) { #ifdef DEBUG fprintf (stderr, "Invalid PCX header: manufacturer %d(10), " "encoding %d(1), bitsperpixel %d(8), nplanes %d(1)\n", h->manufacturer, h->encoding, h->bitsperpixel, h->nplanes); #endif return 0; } if (quake2) { if (h->width != 32 || h->width != 32) { #ifdef DEBUG fprintf (stderr, "Wrong Quake2 skin size: [%d,%d]\n", h->width, h->height); #endif return 0; } } else { if (h->width > 320 || h->width < 296 || h->height > 200 || h->height < 194) { #ifdef DEBUG fprintf (stderr, "Wrong QuakeWorld skin size: [%d,%d]\n", h->width, h->height); #endif return 0; } } return 1; } static int read_pcx_line (FILE *f, char *buf, int len) { char *ptr; int cnt; int c; for (ptr = buf; ptr < buf + len; ) { if ((c = getc (f)) == EOF) { #ifdef DEBUG fprintf (stderr, "Unexpected EOF\n"); #endif return 0; } if ((c & 0xC0) != 0xC0) *ptr++ = c; else { cnt = c & 0x3F; if ((c = getc (f)) == EOF) { #ifdef DEBUG fprintf (stderr, "Unexpected EOF\n"); #endif return 0; } memset (ptr, c, cnt); ptr += cnt; } } return 1; } char *read_skin_pcx (char *filename, int quake2) { FILE *f = NULL; char *buf = NULL; char *ptr; int lines = 0; struct pcx_header h; if ((f = fopen (filename, "r")) == NULL) return NULL; if (!check_pcx_header (f, &h, quake2) || (buf = malloc ((quake2)? 32*32 : 320*200)) == NULL) { fclose (f); return NULL; } ptr = buf; for (lines = 0; lines < h.height; lines++) { if (read_pcx_line (f, ptr, h.width) == 0) { free (buf); buf = NULL; } if (quake2) { ptr += 32; } else { if (320 - h.width > 0) memset (ptr + h.width, 0, 320 - h.width); ptr += 320; } } if (!quake2 && lines < 200) memset (ptr, 0, (200 - lines) * 320); fclose (f); return buf; } xqf-1.0.5/src/skin_pcx.h0000644002404400000620000000167007201342721012010 00000000000000/* XQF - Quake server browser and launcher * Copyright (C) 1998-2000 Roman Pozlevich * * 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 */ #ifndef __SKIN_PCX_H__ #define __SKIN_PCX_H__ extern char *read_skin_pcx (char *, int quake2); #endif /* __SKIN_PCX_H__ */ xqf-1.0.5/src/quake_pal.h0000644002404400000620000001077707201342720012143 000000000000000x00, 0x00, 0x00, 0x0f, 0x0f, 0x0f, 0x1f, 0x1f, 0x1f, 0x2f, 0x2f, 0x2f, 0x3f, 0x3f, 0x3f, 0x4b, 0x4b, 0x4b, 0x5b, 0x5b, 0x5b, 0x6b, 0x6b, 0x6b, 0x7b, 0x7b, 0x7b, 0x8b, 0x8b, 0x8b, 0x9b, 0x9b, 0x9b, 0xab, 0xab, 0xab, 0xbb, 0xbb, 0xbb, 0xcb, 0xcb, 0xcb, 0xdb, 0xdb, 0xdb, 0xeb, 0xeb, 0xeb, 0x0f, 0x0b, 0x07, 0x17, 0x0f, 0x0b, 0x1f, 0x17, 0x0b, 0x27, 0x1b, 0x0f, 0x2f, 0x23, 0x13, 0x37, 0x2b, 0x17, 0x3f, 0x2f, 0x17, 0x4b, 0x37, 0x1b, 0x53, 0x3b, 0x1b, 0x5b, 0x43, 0x1f, 0x63, 0x4b, 0x1f, 0x6b, 0x53, 0x1f, 0x73, 0x57, 0x1f, 0x7b, 0x5f, 0x23, 0x83, 0x67, 0x23, 0x8f, 0x6f, 0x23, 0x0b, 0x0b, 0x0f, 0x13, 0x13, 0x1b, 0x1b, 0x1b, 0x27, 0x27, 0x27, 0x33, 0x2f, 0x2f, 0x3f, 0x37, 0x37, 0x4b, 0x3f, 0x3f, 0x57, 0x47, 0x47, 0x67, 0x4f, 0x4f, 0x73, 0x5b, 0x5b, 0x7f, 0x63, 0x63, 0x8b, 0x6b, 0x6b, 0x97, 0x73, 0x73, 0xa3, 0x7b, 0x7b, 0xaf, 0x83, 0x83, 0xbb, 0x8b, 0x8b, 0xcb, 0x00, 0x00, 0x00, 0x07, 0x07, 0x00, 0x0b, 0x0b, 0x00, 0x13, 0x13, 0x00, 0x1b, 0x1b, 0x00, 0x23, 0x23, 0x00, 0x2b, 0x2b, 0x07, 0x2f, 0x2f, 0x07, 0x37, 0x37, 0x07, 0x3f, 0x3f, 0x07, 0x47, 0x47, 0x07, 0x4b, 0x4b, 0x0b, 0x53, 0x53, 0x0b, 0x5b, 0x5b, 0x0b, 0x63, 0x63, 0x0b, 0x6b, 0x6b, 0x0f, 0x07, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x17, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x27, 0x00, 0x00, 0x2f, 0x00, 0x00, 0x37, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x47, 0x00, 0x00, 0x4f, 0x00, 0x00, 0x57, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x67, 0x00, 0x00, 0x6f, 0x00, 0x00, 0x77, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x13, 0x13, 0x00, 0x1b, 0x1b, 0x00, 0x23, 0x23, 0x00, 0x2f, 0x2b, 0x00, 0x37, 0x2f, 0x00, 0x43, 0x37, 0x00, 0x4b, 0x3b, 0x07, 0x57, 0x43, 0x07, 0x5f, 0x47, 0x07, 0x6b, 0x4b, 0x0b, 0x77, 0x53, 0x0f, 0x83, 0x57, 0x13, 0x8b, 0x5b, 0x13, 0x97, 0x5f, 0x1b, 0xa3, 0x63, 0x1f, 0xaf, 0x67, 0x23, 0x23, 0x13, 0x07, 0x2f, 0x17, 0x0b, 0x3b, 0x1f, 0x0f, 0x4b, 0x23, 0x13, 0x57, 0x2b, 0x17, 0x63, 0x2f, 0x1f, 0x73, 0x37, 0x23, 0x7f, 0x3b, 0x2b, 0x8f, 0x43, 0x33, 0x9f, 0x4f, 0x33, 0xaf, 0x63, 0x2f, 0xbf, 0x77, 0x2f, 0xcf, 0x8f, 0x2b, 0xdf, 0xab, 0x27, 0xef, 0xcb, 0x1f, 0xff, 0xf3, 0x1b, 0x0b, 0x07, 0x00, 0x1b, 0x13, 0x00, 0x2b, 0x23, 0x0f, 0x37, 0x2b, 0x13, 0x47, 0x33, 0x1b, 0x53, 0x37, 0x23, 0x63, 0x3f, 0x2b, 0x6f, 0x47, 0x33, 0x7f, 0x53, 0x3f, 0x8b, 0x5f, 0x47, 0x9b, 0x6b, 0x53, 0xa7, 0x7b, 0x5f, 0xb7, 0x87, 0x6b, 0xc3, 0x93, 0x7b, 0xd3, 0xa3, 0x8b, 0xe3, 0xb3, 0x97, 0xab, 0x8b, 0xa3, 0x9f, 0x7f, 0x97, 0x93, 0x73, 0x87, 0x8b, 0x67, 0x7b, 0x7f, 0x5b, 0x6f, 0x77, 0x53, 0x63, 0x6b, 0x4b, 0x57, 0x5f, 0x3f, 0x4b, 0x57, 0x37, 0x43, 0x4b, 0x2f, 0x37, 0x43, 0x27, 0x2f, 0x37, 0x1f, 0x23, 0x2b, 0x17, 0x1b, 0x23, 0x13, 0x13, 0x17, 0x0b, 0x0b, 0x0f, 0x07, 0x07, 0xbb, 0x73, 0x9f, 0xaf, 0x6b, 0x8f, 0xa3, 0x5f, 0x83, 0x97, 0x57, 0x77, 0x8b, 0x4f, 0x6b, 0x7f, 0x4b, 0x5f, 0x73, 0x43, 0x53, 0x6b, 0x3b, 0x4b, 0x5f, 0x33, 0x3f, 0x53, 0x2b, 0x37, 0x47, 0x23, 0x2b, 0x3b, 0x1f, 0x23, 0x2f, 0x17, 0x1b, 0x23, 0x13, 0x13, 0x17, 0x0b, 0x0b, 0x0f, 0x07, 0x07, 0xdb, 0xc3, 0xbb, 0xcb, 0xb3, 0xa7, 0xbf, 0xa3, 0x9b, 0xaf, 0x97, 0x8b, 0xa3, 0x87, 0x7b, 0x97, 0x7b, 0x6f, 0x87, 0x6f, 0x5f, 0x7b, 0x63, 0x53, 0x6b, 0x57, 0x47, 0x5f, 0x4b, 0x3b, 0x53, 0x3f, 0x33, 0x43, 0x33, 0x27, 0x37, 0x2b, 0x1f, 0x27, 0x1f, 0x17, 0x1b, 0x13, 0x0f, 0x0f, 0x0b, 0x07, 0x6f, 0x83, 0x7b, 0x67, 0x7b, 0x6f, 0x5f, 0x73, 0x67, 0x57, 0x6b, 0x5f, 0x4f, 0x63, 0x57, 0x47, 0x5b, 0x4f, 0x3f, 0x53, 0x47, 0x37, 0x4b, 0x3f, 0x2f, 0x43, 0x37, 0x2b, 0x3b, 0x2f, 0x23, 0x33, 0x27, 0x1f, 0x2b, 0x1f, 0x17, 0x23, 0x17, 0x0f, 0x1b, 0x13, 0x0b, 0x13, 0x0b, 0x07, 0x0b, 0x07, 0xff, 0xf3, 0x1b, 0xef, 0xdf, 0x17, 0xdb, 0xcb, 0x13, 0xcb, 0xb7, 0x0f, 0xbb, 0xa7, 0x0f, 0xab, 0x97, 0x0b, 0x9b, 0x83, 0x07, 0x8b, 0x73, 0x07, 0x7b, 0x63, 0x07, 0x6b, 0x53, 0x00, 0x5b, 0x47, 0x00, 0x4b, 0x37, 0x00, 0x3b, 0x2b, 0x00, 0x2b, 0x1f, 0x00, 0x1b, 0x0f, 0x00, 0x0b, 0x07, 0x00, 0x00, 0x00, 0xff, 0x0b, 0x0b, 0xef, 0x13, 0x13, 0xdf, 0x1b, 0x1b, 0xcf, 0x23, 0x23, 0xbf, 0x2b, 0x2b, 0xaf, 0x2f, 0x2f, 0x9f, 0x2f, 0x2f, 0x8f, 0x2f, 0x2f, 0x7f, 0x2f, 0x2f, 0x6f, 0x2f, 0x2f, 0x5f, 0x2b, 0x2b, 0x4f, 0x23, 0x23, 0x3f, 0x1b, 0x1b, 0x2f, 0x13, 0x13, 0x1f, 0x0b, 0x0b, 0x0f, 0x2b, 0x00, 0x00, 0x3b, 0x00, 0x00, 0x4b, 0x07, 0x00, 0x5f, 0x07, 0x00, 0x6f, 0x0f, 0x00, 0x7f, 0x17, 0x07, 0x93, 0x1f, 0x07, 0xa3, 0x27, 0x0b, 0xb7, 0x33, 0x0f, 0xc3, 0x4b, 0x1b, 0xcf, 0x63, 0x2b, 0xdb, 0x7f, 0x3b, 0xe3, 0x97, 0x4f, 0xe7, 0xab, 0x5f, 0xef, 0xbf, 0x77, 0xf7, 0xd3, 0x8b, 0xa7, 0x7b, 0x3b, 0xb7, 0x9b, 0x37, 0xc7, 0xc3, 0x37, 0xe7, 0xe3, 0x57, 0x7f, 0xbf, 0xff, 0xab, 0xe7, 0xff, 0xd7, 0xff, 0xff, 0x67, 0x00, 0x00, 0x8b, 0x00, 0x00, 0xb3, 0x00, 0x00, 0xd7, 0x00, 0x00, 0xff, 0x00, 0x00, 0xff, 0xf3, 0x93, 0xff, 0xf7, 0xc7, 0xff, 0xff, 0xff, 0x9f, 0x5b, 0x53 xqf-1.0.5/src/menus.c0000644002404400000620000001220407746512345011326 00000000000000/* XQF - Quake server browser and launcher * Copyright (C) 1998-2000 Roman Pozlevich * * 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 */ #include "gnuconfig.h" #include #include #include #include #include "i18n.h" #include "menus.h" static void create_menu_recursive (GtkWidget *menu, const struct menuitem *items, GtkAccelGroup *accel_group) { GtkWidget *menu_item; GtkWidget *label; guint ac_key; // GtkWidget *button= NULL; // GSList *group = NULL; while (items->type != MENU_END) { switch (items->type) { #if 0 /* This does not work, I need to figure out how to add some sort of indicator as to the active filter */ case MENU_RADIO_ITEM: if( button == NULL ){ button = gtk_radio_button_new_with_label( NULL, items->label ); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE); } else { group = gtk_radio_button_group (GTK_RADIO_BUTTON ( button )); button = gtk_radio_button_new_with_label(group, "button2"); } if (GTK_IS_MENU_BAR (menu)) gtk_menu_bar_append (GTK_MENU_BAR (menu), button); else gtk_menu_append (GTK_MENU (menu), button); gtk_widget_show (button); if (items->widget) *items->widget = button; break; #endif case MENU_ITEM: case MENU_CHECK_ITEM: case MENU_RADIO_ITEM: case MENU_BRANCH: case MENU_LAST_BRANCH: switch (items->type) { case MENU_RADIO_ITEM: menu_item = NULL; /* Not Implemented */ case MENU_CHECK_ITEM: menu_item = gtk_check_menu_item_new (); gtk_check_menu_item_set_show_toggle ( GTK_CHECK_MENU_ITEM (menu_item), TRUE); break; default: menu_item = gtk_menu_item_new (); break; } label = gtk_widget_new (GTK_TYPE_ACCEL_LABEL, "GtkWidget::visible", TRUE, "GtkWidget::parent", menu_item, "GtkAccelLabel::accel_widget", menu_item, "GtkMisc::xalign", 0.0, NULL); ac_key = gtk_label_parse_uline (GTK_LABEL (label), _(items->label)); if (accel_group && ac_key != GDK_VoidSymbol) { /*FIXME_GTK2: this do not work with GTK2*/ #ifndef USE_GTK2 if (GTK_IS_MENU_BAR (menu)) { gtk_widget_add_accelerator (menu_item, "activate_item", accel_group, ac_key, GDK_MOD1_MASK, GTK_ACCEL_LOCKED); } if (GTK_IS_MENU (menu)) { gtk_widget_add_accelerator (menu_item, "activate_item", gtk_menu_ensure_uline_accel_group (GTK_MENU (menu)), ac_key, 0, GTK_ACCEL_LOCKED); } #endif } if (items->type != MENU_BRANCH && items->type != MENU_LAST_BRANCH) { if (items->callback) { gtk_signal_connect (GTK_OBJECT (menu_item), "activate", GTK_SIGNAL_FUNC (items->callback), items->user_data); } if (accel_group && items->accel_key) { gtk_widget_add_accelerator (menu_item, "activate", accel_group, items->accel_key, items->accel_mods, GTK_ACCEL_VISIBLE); } } else { /* Branch */ if (items->type == MENU_LAST_BRANCH) gtk_menu_item_right_justify (GTK_MENU_ITEM (menu_item)); gtk_menu_item_set_submenu (GTK_MENU_ITEM (menu_item), create_menu (items->user_data, accel_group)); } if (GTK_IS_MENU_BAR (menu)) gtk_menu_bar_append (GTK_MENU_BAR (menu), menu_item); else gtk_menu_append (GTK_MENU (menu), menu_item); gtk_widget_show (menu_item); if (items->widget) *items->widget = menu_item; break; case MENU_SEPARATOR: menu_item = gtk_menu_item_new (); gtk_widget_set_sensitive (menu_item, FALSE); gtk_menu_append (GTK_MENU (menu), menu_item); gtk_widget_show (menu_item); break; case MENU_TEAROFF: menu_item = gtk_tearoff_menu_item_new (); gtk_menu_append (GTK_MENU (menu), menu_item); gtk_widget_show (menu_item); break; default: break; } items++; } } GtkWidget *create_menu (const struct menuitem *items, GtkAccelGroup *accel_group) { GtkWidget *menu; menu = gtk_menu_new (); create_menu_recursive (menu, items, accel_group); return menu; } GtkWidget *create_menubar (const struct menuitem *items, GtkAccelGroup *accel_group) { GtkWidget *menubar; menubar = gtk_menu_bar_new (); create_menu_recursive (menubar, items, accel_group); return menubar; } xqf-1.0.5/src/menus.h0000644002404400000620000000302607201342720011315 00000000000000/* XQF - Quake server browser and launcher * Copyright (C) 1998-2000 Roman Pozlevich * * 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 */ #ifndef __MENUS_H__ #define __MENUS_H__ #include enum menuitem_type { MENU_END = 0, MENU_ITEM, MENU_CHECK_ITEM, MENU_RADIO_ITEM, MENU_SEPARATOR, MENU_TEAROFF, MENU_BRANCH, MENU_LAST_BRANCH }; struct menuitem { enum menuitem_type type; const char *label; guint accel_key; GdkModifierType accel_mods; GtkSignalFunc callback; gpointer user_data; GtkWidget **widget; }; extern GtkWidget *create_menu (const struct menuitem *items, GtkAccelGroup *accel_group); extern GtkWidget *create_menubar (const struct menuitem *items, GtkAccelGroup *accel_group); #endif /* __MENUS_H__ */ xqf-1.0.5/src/filter.c0000644002404400000620000020774010277622247011473 00000000000000/* XQF - Quake server browser and launcher * Copyright (C) 1998-2000 Roman Pozlevich * * 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 */ #include "gnuconfig.h" #include #include #include #include #include #include #include "i18n.h" #include "xqf.h" #include "xqf-ui.h" #include "dialogs.h" #include "server.h" #include "config.h" #include "filter.h" #include "flt-player.h" #include "utils.h" #include "pref.h" #ifdef USE_GEOIP #include "country-filter.h" static void country_select_button_pressed(GtkWidget * widget, gpointer data); static void country_add_button(GtkWidget * widget, gpointer data); static void country_delete_button(GtkWidget * widget, gpointer data); static void country_clear_list(GtkWidget * widget, gpointer data); static void country_create_popup_window(void); // TODO: get rid of global variables static gint selected_row_left_list=-1; static gint selected_row_right_list=-1; static int last_row_right_list = 0; static int last_row_country_list = 0; #endif static void server_filter_vars_free(struct server_filter_vars* v); static int server_pass_filter (struct server *s); static void server_filter_init (void); static void server_filter_on_ok(); static void server_filter_on_cancel(); static void server_filter_fill_widgets(guint num); static void server_filter_save_settings (int number, struct server_filter_vars* oldfilter, struct server_filter_vars* newfilter); static void filter_select_callback (GtkWidget *widget, guint number); void server_filter_print(struct server_filter_vars* f); // whether the currently displayed filter page has been altered static gboolean server_filter_changed = FALSE; static gboolean server_filter_deleted = FALSE; GArray* server_filters; static GArray* backup_server_filters; // copy of server_filters, for restoring on cancel static gboolean cleaned_up = FALSE; /* QUICK FILTER */ static char* quick_filter_token[8]; static char quick_filter_str[512] = {0}; static int quick_filter (struct server *s); void filter_quick_set (const char* str); const char* filter_quick_get(void); void filter_quick_unset (void); /* /QUICK FILTER */ struct filter filters[FILTERS_TOTAL] = { { N_("Server"), N_("S Filter"), N_("SF Cfg"), server_pass_filter, server_filter_init, NULL, server_filter_on_ok, server_filter_on_cancel, 1, FILTER_NOT_CHANGED, &sfilter_pix, &sfilter_cfg_pix, }, { N_("Player"), N_("P Filter"), N_("PF Cfg"), player_filter, player_filter_init, player_filter_done, player_filter_new_defaults, NULL, 1, FILTER_NOT_CHANGED, &pfilter_pix, &pfilter_cfg_pix, }, { "not visible", "not visible", "not visible", quick_filter, NULL, NULL, NULL, NULL, 1, FILTER_NOT_CHANGED, NULL, NULL, } }; unsigned char cur_filter = 0; static unsigned filter_current_time = 1; unsigned server_filter_dialog_current_filter = 0; static GtkWidget *filter_option_menu; static GtkWidget *filter_retries_spinner; static GtkWidget *filter_ping_spinner; static GtkWidget *filter_not_full_check_button; static GtkWidget *filter_not_empty_check_button; static GtkWidget *filter_no_cheats_check_button; static GtkWidget *filter_no_password_check_button; static GtkWidget *game_contains_entry; static GtkWidget *filter_game_type_entry; static GtkWidget *version_contains_entry; static GtkWidget *map_contains_entry; static GtkWidget *server_name_contains_entry; #ifdef USE_GEOIP static GtkWidget *country_left_list; static GtkWidget *country_right_list; static GtkWidget *country_filter_list; static GtkWidget *scrolledwindow_fcountry; static GtkWidget *country_selection_button; static GtkWidget *country_clear_button; static GtkWidget *country_show_all_check_button; #endif static struct server_filter_vars* server_filter_vars_new() { struct server_filter_vars* f = g_malloc( sizeof( struct server_filter_vars )); if(!f) return NULL; f->filter_retries = 2; f->filter_ping = 9999; f->filter_not_full = 0; f->filter_not_empty = 0; f->filter_no_cheats = 0; f->filter_no_password = 0; f->filter_name = NULL; f->game_contains = NULL; f->version_contains = NULL; f->game_type = NULL; f->map_contains = NULL; f->server_name_contains=NULL; #ifdef USE_GEOIP f->countries = g_array_new (FALSE, FALSE, sizeof (int)); #endif return f; } static void server_filter_vars_free(struct server_filter_vars* v) { if(!v) return; g_free(v->filter_name); g_free(v->game_contains); g_free(v->version_contains); g_free(v->map_contains); g_free(v->server_name_contains); g_free(v->game_type); #ifdef USE_GEOIP g_array_free(v->countries,TRUE); v->countries=NULL; #endif } // deep copy of server_filter_vars static struct server_filter_vars* server_filter_vars_copy(struct server_filter_vars* v) { struct server_filter_vars* f; unsigned i; if(!v) return NULL; f = server_filter_vars_new(); if(!f) return NULL; f->filter_retries = v->filter_retries; f->filter_ping = v->filter_ping; f->filter_not_full = v->filter_not_full; f->filter_not_empty = v->filter_not_empty; f->filter_no_cheats = v->filter_no_cheats; f->filter_no_password = v->filter_no_password; f->filter_name = g_strdup(v->filter_name); f->game_contains = g_strdup(v->game_contains); f->version_contains = g_strdup(v->version_contains); f->game_type = g_strdup(v->game_type); f->map_contains = g_strdup(v->map_contains); f->server_name_contains = g_strdup(v->server_name_contains); #ifdef USE_GEOIP //FIXME reserve space first, then insert for (i =0; i< v->countries->len;i++) g_array_append_val (f->countries,g_array_index(v->countries,int,i)); #endif return f; } void server_filter_print(struct server_filter_vars* f) { #ifdef USE_GEOIP unsigned i; #endif printf("Filter: %s\n",f->filter_name); printf(" retries: %d\n",f->filter_retries); printf(" ping: %d\n",f->filter_ping); printf(" not full: %d\n",f->filter_not_full); printf(" not empty: %d\n",f->filter_not_empty); printf(" no cheats: %d\n",f->filter_no_cheats); printf(" no password: %d\n",f->filter_no_password); printf(" game: %s\n",f->game_contains); printf(" version: %s\n",f->version_contains); printf(" game type: %s\n",f->game_type); printf(" map: %s\n",f->map_contains); printf(" server name: %s\n",f->server_name_contains); #ifdef USE_GEOIP for (i =0; i< f->countries->len;i++) printf("country id: %d ",g_array_index(f->countries,int,i)); printf("\n"); #endif } void apply_filters (unsigned mask, struct server *s) { /* This function gets called once per server */ unsigned flt_time; unsigned i; int n; flt_time = s->flt_last; for (n = 0, i = 1; n < FILTERS_TOTAL; n++, i <<= 1) { if ((mask & i) == i && ( (filters[n].last_changed > s->flt_last) || ((s->flt_mask & i) != i) ) ) { /* baa -- The 'vars' (second param to the func) only matters with the server filter call. It gets passed to the player filter call but not used. */ /* if ((*filters[n].func) (s, vars)) */ //if ((*filters[n].func) (s, &server_filters[current_server_filter])) if ((*filters[n].func) (s)) s->filters |= i; else s->filters &= ~i; if (flt_time < filters[n].last_changed) flt_time = filters[n].last_changed; } } s->flt_mask |= mask; s->flt_last = flt_time; } /* build_filtered_list -- Return a list of servers that pass the filter requirements. Called from server_clist_setlist() and server_clist_build_filtered(). */ GSList *build_filtered_list (unsigned mask, GSList *server_list) { struct server *server; GSList *list = NULL; while (server_list) { server = (struct server *) server_list->data; apply_filters (mask | FILTER_PLAYER_MASK, server); /* in filter.c */ if ((server->filters & mask) == mask) { list = g_slist_prepend (list, server); debug (6, "build_filtered_list() -- Server %lx added to list", server); server_ref (server); } server_list = server_list->next; } list = g_slist_reverse (list); return list; } /* This applies a filter's attributes to a server entry and returns true if it passes the filter or false if not. */ static int server_pass_filter (struct server *s){ char **info_ptr; struct server_filter_vars* filter; int players = s->curplayers; /* Filter Zero is No Filter */ if( current_server_filter == 0 ){ return TRUE; } filter = g_array_index (server_filters, struct server_filter_vars*, current_server_filter-1); // server_filter_print(filter); if (s->ping == -1) /* no information */ return FALSE; if(s->retries >= filter->filter_retries) return FALSE; if(s->ping >= filter->filter_ping) return FALSE; if(serverlist_countbots && s->curbots <= players) players-=s->curbots; if(filter->filter_not_full && (players >= s->maxplayers)) return FALSE; if(filter->filter_not_empty && (players == 0)) return FALSE; if(filter->filter_no_cheats && ((s->flags & SERVER_CHEATS) != 0)) return FALSE; if(filter->filter_no_password && ((s->flags & SERVER_PASSWORD) != 0)) return FALSE; if( filter->game_contains && *filter->game_contains ) { if(!s->game) return FALSE; else if(!lowcasestrstr(s->game,filter->game_contains)) return FALSE; } if( filter->game_type && *filter->game_type ) { if( !s->gametype ) return FALSE; else if(!lowcasestrstr(s->gametype, filter->game_type)) return FALSE; } if( filter->map_contains && *filter->map_contains ) { if( !s->map ) return FALSE; else if(!lowcasestrstr(s->map, filter->map_contains)) return FALSE; } if( filter->version_contains && *filter->version_contains) { const char* version = NULL; /* Filter for the version */ for (info_ptr = s->info; info_ptr && *info_ptr; info_ptr += 2) { if (strcmp (*info_ptr, "version") == 0) { version=info_ptr[1]; } } if(!version) return FALSE; else if(!lowcasestrstr( version, filter->version_contains )){ return FALSE; } }/*end version check */ #ifdef USE_GEOIP if (filter->countries->len > 0 ) { gboolean have_country=FALSE; unsigned i; if (!s->country_id) return FALSE; else { for (i = 0; i < filter->countries->len; ++i) if (g_array_index(filter->countries,int,i)==s->country_id) have_country=TRUE; if (!have_country) return FALSE; } } #endif if( filter->server_name_contains && *filter->server_name_contains ) { if( !s->name ) return FALSE; else if(!lowcasestrstr(s->name, filter->server_name_contains)) return FALSE; } return TRUE; } /** initialize server_filters array from config file */ static void server_filter_init (void) { int i; char config_section[64]; int isdefault = FALSE; // used to determine whether key exists in config char* filtername; #ifdef USE_GEOIP char *str = NULL; #endif struct server_filter_vars* filter; /* This is called before the window has been created so we cannot set the filter names in the pulldown yet. */ server_filters = g_array_new( FALSE,FALSE, sizeof(struct server_filter_vars*)); if(!server_filters) return; i = 1; snprintf( config_section, 64, "/" CONFIG_FILE "/Server Filter/%d", i ); config_push_prefix (config_section ); filtername = config_get_string_with_default ("filter_name",&isdefault); while(!isdefault) { filter = server_filter_vars_new(); if(!filter) break; filter->filter_name = filtername; filter->filter_retries = config_get_int ("retries=2"); filter->filter_ping = config_get_int ("ping=9999"); filter->filter_not_full = config_get_bool ("not full=false"); filter->filter_not_empty = config_get_bool ("not empty=false"); filter->filter_no_cheats = config_get_bool ("no cheats=false"); filter->filter_no_password = config_get_bool ("no password=false"); filter->game_contains = config_get_string("game_contains"); filter->version_contains = config_get_string("version_contains"); filter->game_type = config_get_string("game_type"); filter->map_contains = config_get_string("map_contains"); filter->server_name_contains = config_get_string("server_name_contains"); #ifdef USE_GEOIP /*country filter ids*/ str = config_get_string("server_country_contains"); if(str) { int nr; gchar **buf = NULL; buf = g_strsplit(str," ",0); for(nr = 0; buf && buf[nr]; ++nr) { int flag_nr = geoip_id_by_code(buf[nr]); if(flag_nr > 0) g_array_append_val (filter->countries,flag_nr); } g_strfreev(buf); } #endif g_array_append_val(server_filters,filter); config_pop_prefix (); i++; snprintf( config_section, 64, "/" CONFIG_FILE "/Server Filter/%d", i ); config_push_prefix (config_section ); filtername = config_get_string_with_default ("filter_name",&isdefault); } config_pop_prefix (); debug(3,"number of server filters: %d",server_filters->len); sprintf( config_section, "/" CONFIG_FILE "/Server Filter" ); config_push_prefix (config_section ); current_server_filter = config_get_int ("current_server_filter=0"); if (current_server_filter<0 || current_server_filter>server_filters->len) current_server_filter = 0; config_pop_prefix (); } static void server_filter_on_cancel() { // restore server filter array unsigned i; struct server_filter_vars* filter; for(i=0;ilen;++i) { filter = g_array_index (server_filters, struct server_filter_vars*, i); server_filter_vars_free(filter); } g_array_free(server_filters, FALSE); server_filters = backup_server_filters; filters[FILTER_SERVER].changed = FILTER_CHANGED; } // query widgets and put values in a new struct static struct server_filter_vars* server_filter_new_from_widgets() { #ifdef USE_GEOIP int country_nr; int i; #endif struct server_filter_vars* filter = server_filter_vars_new(); if(!filter) return NULL; filter->filter_retries = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (filter_retries_spinner)); filter->filter_ping = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (filter_ping_spinner)); filter->filter_not_full = GTK_TOGGLE_BUTTON (filter_not_full_check_button)->active; filter->filter_not_empty = GTK_TOGGLE_BUTTON (filter_not_empty_check_button)->active; filter->filter_no_password = GTK_TOGGLE_BUTTON (filter_no_password_check_button)->active; filter->filter_no_cheats = GTK_TOGGLE_BUTTON (filter_no_cheats_check_button)->active; filter->game_type = gtk_editable_get_chars (GTK_EDITABLE (filter_game_type_entry), 0, -1 ); filter->version_contains = gtk_editable_get_chars (GTK_EDITABLE (version_contains_entry), 0, -1 ); filter->game_contains = gtk_editable_get_chars (GTK_EDITABLE (game_contains_entry), 0, -1 ); filter->map_contains = gtk_editable_get_chars (GTK_EDITABLE (map_contains_entry), 0, -1 ); filter->server_name_contains = gtk_editable_get_chars (GTK_EDITABLE (server_name_contains_entry), 0, -1 ); #ifdef USE_GEOIP for (i = 0; i < last_row_country_list; ++i) { country_nr=GPOINTER_TO_INT(gtk_clist_get_row_data(GTK_CLIST(country_filter_list), i)); g_array_append_val(filter->countries,country_nr); } #endif return filter; } static void server_filter_on_ok () { // struct server_filter_vars** oldfilter = NULL; // struct server_filter_vars* newfilter = NULL; unsigned i; struct server_filter_vars* filter; if( server_filter_dialog_current_filter == 0 && server_filter_deleted == FALSE ){ return; } /* oldfilter = &g_array_index (server_filters, struct server_filter_vars*, server_filter_dialog_current_filter-1); if(!oldfilter || !*oldfilter) { debug(0,"Bug: filter is NULL"); return; } */ filter_select_callback(NULL,server_filter_dialog_current_filter); /* newfilter = server_filter_vars_new(); if(!newfilter) return; filters[FILTER_SERVER].changed = FILTER_CHANGED; newfilter = server_filter_new_from_widgets(); newfilter->filter_name = g_strdup((*oldfilter)->filter_name); server_filter_save_settings ( server_filter_dialog_current_filter, *oldfilter, newfilter); server_filter_vars_free(*oldfilter); *oldfilter = newfilter; if(server_filter_deleted == TRUE)*/ { /* as some filter in the middle could have changed, clear all of them and set all new */ guint i; config_clean_section("/" CONFIG_FILE "/Server Filter"); for(i=0;ilen;i++) { struct server_filter_vars* newfilter = NULL; struct server_filter_vars* oldfilter = server_filter_vars_new(); newfilter = g_array_index (server_filters, struct server_filter_vars*, i); server_filter_save_settings(i+1,oldfilter,newfilter); server_filter_vars_free(oldfilter); } } current_server_filter = server_filter_dialog_current_filter; #ifdef DEBUG { unsigned i; struct server_filter_vars* filter = NULL; for(i=0;ilen;i++) { filter = g_array_index (server_filters, struct server_filter_vars*, i); server_filter_print(filter); } } #endif { // save number of current server filters enum { buflen = 64 }; char config_section[buflen]; sprintf( config_section, "/" CONFIG_FILE "/Server Filter" ); config_push_prefix (config_section ); config_set_int ("current_server_filter", current_server_filter); config_pop_prefix(); } for(i=0;ilen;i++) { filter = g_array_index (backup_server_filters, struct server_filter_vars*, i); server_filter_vars_free(filter); } g_array_free(backup_server_filters,FALSE); } /** save settings of current server filter and detect if filter has changed * oldfilter is currently dummy * modifies oldfilter */ static void server_filter_save_settings (int number, struct server_filter_vars* oldfilter, struct server_filter_vars* newfilter) { int text_changed; enum { buflen = 64 }; char config_section[buflen]; if( number == 0 ){ return; } snprintf( config_section, buflen, "/" CONFIG_FILE "/Server Filter/%d", number ); config_push_prefix (config_section ); config_set_string ("filter_name", newfilter->filter_name ); if (oldfilter->filter_retries != newfilter->filter_retries) { config_set_int ("retries", oldfilter->filter_retries = newfilter->filter_retries); filters[FILTER_SERVER].changed = FILTER_CHANGED; } if (oldfilter->filter_ping != newfilter->filter_ping) { config_set_int ("ping", oldfilter->filter_ping = newfilter->filter_ping); filters[FILTER_SERVER].changed = FILTER_CHANGED; } /* GAMECONTAINS string values -- baa */ text_changed = 0; if(newfilter->game_contains && strlen(newfilter->game_contains )){ /* First case, the user entered something. See if the value is different */ if (oldfilter->game_contains){ if( strcmp(newfilter->game_contains, oldfilter->game_contains )) text_changed = 1; g_free( oldfilter->game_contains ); } else { text_changed = 1; } oldfilter->game_contains = g_strdup(newfilter->game_contains ); if (text_changed) { config_set_string ("game_contains", oldfilter->game_contains ); filters[FILTER_SERVER].changed = FILTER_CHANGED; } } else { if (oldfilter->game_contains){ text_changed = 1; /* From something to nothing */ g_free( oldfilter->game_contains ); config_set_string ("game_contains", "" ); filters[FILTER_SERVER].changed = FILTER_CHANGED; } oldfilter->game_contains = NULL; } /* Version string values -- baa */ text_changed = 0; if( newfilter->version_contains && strlen( newfilter->version_contains )){ /* First case, the user entered something. See if the value is different */ if (oldfilter->version_contains){ if( strcmp( newfilter->version_contains, oldfilter->version_contains )) text_changed = 1; g_free( oldfilter->version_contains ); } else { text_changed = 1; } oldfilter->version_contains = g_strdup( newfilter->version_contains ); if (text_changed) { config_set_string ("version_contains", oldfilter->version_contains ); filters[FILTER_SERVER].changed = FILTER_CHANGED; } } else { if (oldfilter->version_contains){ text_changed = 1; /* From something to nothing */ g_free( oldfilter->version_contains ); config_set_string ("version_contains", "" ); filters[FILTER_SERVER].changed = FILTER_CHANGED; } oldfilter->version_contains = NULL; } /* GAMETYPE string values -- baa */ text_changed = 0; if( newfilter->game_type && strlen( newfilter->game_type )){ /* First case, the user entered something. See if the value is different */ if (oldfilter->game_type){ if( strcmp( newfilter->game_type, oldfilter->game_type )) text_changed = 1; g_free( oldfilter->game_type ); } else { text_changed = 1; } oldfilter->game_type = g_strdup( newfilter->game_type ); if (text_changed) { config_set_string ("game_type", oldfilter->game_type ); filters[FILTER_SERVER].changed = FILTER_CHANGED; } } else { if (oldfilter->game_type){ text_changed = 1; /* From something to nothing */ g_free( oldfilter->game_type ); config_set_string ("game_type", "" ); filters[FILTER_SERVER].changed = FILTER_CHANGED; } oldfilter->game_type = NULL; } /* end game_type filter */ /* map string values */ text_changed = 0; if( newfilter->map_contains && strlen( newfilter->map_contains )){ /* First case, the user entered something. See if the value is different */ if (oldfilter->map_contains){ if( strcmp( newfilter->map_contains, oldfilter->map_contains )) text_changed = 1; g_free( oldfilter->map_contains); } else { text_changed = 1; } oldfilter->map_contains = g_strdup( newfilter->map_contains ); if (text_changed) { config_set_string ("map_contains", oldfilter->map_contains ); filters[FILTER_SERVER].changed = FILTER_CHANGED; } } else { if (oldfilter->map_contains){ text_changed = 1; /* From something to nothing */ g_free( oldfilter->map_contains ); config_set_string ("map_contains", "" ); filters[FILTER_SERVER].changed = FILTER_CHANGED; } oldfilter->map_contains= NULL; } /* end of map filter */ /* servername string values */ text_changed = 0; if( newfilter->server_name_contains && strlen( newfilter->server_name_contains )){ /* First case, the user entered something. See if the value is different */ if (oldfilter->server_name_contains){ if( strcmp( newfilter->server_name_contains, oldfilter->server_name_contains )) text_changed = 1; g_free( oldfilter->server_name_contains); } else { text_changed = 1; } oldfilter->server_name_contains = g_strdup( newfilter->server_name_contains ); if (text_changed) { config_set_string ("server_name_contains", oldfilter->server_name_contains ); filters[FILTER_SERVER].changed = FILTER_CHANGED; } } else { if (oldfilter->server_name_contains){ text_changed = 1; /* From something to nothing */ g_free( oldfilter->server_name_contains ); config_set_string ("server_name_contains", "" ); filters[FILTER_SERVER].changed = FILTER_CHANGED; } oldfilter->server_name_contains = NULL; } /* end of server filter */ #ifdef USE_GEOIP /* country string values */ if (newfilter->countries->len > 0) { unsigned i; char* buf = NULL; buf = g_new(char,newfilter->countries->len*3); for (i = 0; i < newfilter->countries->len; ++i) { const char* code = geoip_code_by_id(g_array_index(newfilter->countries,int,i)); if(strlen(code)!=2) code = " "; // may not happen buf[i*3]=code[0]; buf[i*3+1]=code[1]; buf[i*3+2]=' '; } buf[i*3-1]='\0'; config_set_string ("server_country_contains", buf); g_free(buf); filters[FILTER_SERVER].changed = FILTER_CHANGED; } #endif if (oldfilter->filter_not_full != newfilter->filter_not_full) { config_set_bool ("not full", oldfilter->filter_not_full = newfilter->filter_not_full); filters[FILTER_SERVER].changed = FILTER_CHANGED; } if (oldfilter->filter_not_empty != newfilter->filter_not_empty) { config_set_bool ("not empty", oldfilter->filter_not_empty = newfilter->filter_not_empty); filters[FILTER_SERVER].changed = FILTER_CHANGED; } if (oldfilter->filter_no_cheats != newfilter->filter_no_cheats) { config_set_bool ("no cheats", oldfilter->filter_no_cheats = newfilter->filter_no_cheats); filters[FILTER_SERVER].changed = FILTER_CHANGED; } if (oldfilter->filter_no_password != newfilter->filter_no_password) { config_set_bool ("no password", oldfilter->filter_no_password = newfilter->filter_no_password); filters[FILTER_SERVER].changed = FILTER_CHANGED; } #if 0 /* This from the Gtk FAQ, mostly. */ if( server_filter_widget[current_server_filter + filter_start_index] && GTK_BIN (server_filter_widget[current_server_filter + filter_start_index])->child) { GtkWidget *child = GTK_BIN (server_filter_widget[current_server_filter + filter_start_index])->child; /* do stuff with child */ if (GTK_IS_LABEL (child)) { if( filter->filter_name != NULL && strlen( filter->filter_name )){ gtk_label_set (GTK_LABEL (child), filter->filter_name ); } else { /* Reuse the config_secion var */ sprintf( config_section, "Filter %d", current_server_filter ); gtk_label_set (GTK_LABEL (child), config_section ); } } } #endif config_pop_prefix (); if (filters[FILTER_SERVER].changed == FILTER_CHANGED) filters[FILTER_SERVER].last_changed = filter_time_inc(); } // store changed widget values static void filter_select_callback (GtkWidget *widget, guint number) { struct server_filter_vars** filter = NULL; char* name; if(server_filter_changed && server_filter_dialog_current_filter > 0 ) { /* int cont = dialog_yesno(_("Server filter changed"), 1, _("Continue"), _("Cancel"), _("Your changes will be lost if you change server filters now")); if(!cont) { gtk_option_menu_set_history(GTK_OPTION_MENU(filter_option_menu), server_filter_dialog_current_filter-1); return FALSE; } */ filter = &g_array_index (server_filters, struct server_filter_vars*, server_filter_dialog_current_filter-1); name = g_strdup((*filter)->filter_name); server_filter_vars_free(*filter); *filter = server_filter_new_from_widgets(); (*filter)->filter_name = name; } server_filter_dialog_current_filter = number; server_filter_fill_widgets(number); return; } static GtkWidget *create_filter_menu() { GtkWidget *menu; GtkWidget *menu_item; guint i; struct server_filter_vars* filter; menu = gtk_menu_new (); // gtk_signal_connect (GTK_OBJECT (menu_item), "activate", // GTK_SIGNAL_FUNC (callback), (gpointer) 0); for (i = 0;ilen;i++) { filter = g_array_index (server_filters, struct server_filter_vars*, i); if(!filter) { debug(0,"Bug: filter is NULL"); continue; } menu_item = gtk_menu_item_new_with_label(filter->filter_name?filter->filter_name:"(null)"); gtk_menu_append (GTK_MENU (menu), menu_item); gtk_widget_show (menu_item); gtk_signal_connect (GTK_OBJECT (menu_item), "activate", GTK_SIGNAL_FUNC (filter_select_callback), GINT_TO_POINTER(i+1)); // array starts from zero but filters from 1 } gtk_widget_show (menu); return menu; } /** create new filter if number == 0, rename current filter number if number >0 */ static void filter_new_rename_callback (int number) { char *str = NULL; struct server_filter_vars* filter = NULL; debug(3,"%s %d",str, number); // renaming the none filter is not possible if(number && server_filter_dialog_current_filter < 1) return; // remember changes if(!number) { filter_select_callback(NULL,server_filter_dialog_current_filter); } str = enter_string_dialog(TRUE,_("Enter filter name")); if(str && *str) { filters[FILTER_SERVER].changed = FILTER_CHANGED; if(!number) { filter = server_filter_vars_new(); filter->filter_name = str; g_array_append_val(server_filters,filter); server_filter_dialog_current_filter = server_filters->len; gtk_widget_grab_focus (GTK_WIDGET (game_contains_entry)); } else { filter = g_array_index (server_filters, struct server_filter_vars*, server_filter_dialog_current_filter-1); filter->filter_name = str; } gtk_option_menu_set_menu (GTK_OPTION_MENU (filter_option_menu), create_filter_menu()); gtk_option_menu_set_history(GTK_OPTION_MENU(filter_option_menu), server_filter_dialog_current_filter-1); server_filter_fill_widgets(server_filter_dialog_current_filter); server_filter_changed = TRUE; } } static void filter_delete_callback (void* dummy) { struct server_filter_vars* filter = NULL; int cont = 0; if(server_filter_dialog_current_filter == 0) return; filter = g_array_index (server_filters, struct server_filter_vars*, server_filter_dialog_current_filter-1); if(!filter) return; cont = dialog_yesno(_("Delete server filter"), 1, _("Yes"), _("No"), _("Really delete server filter \"%s\"?"),filter->filter_name); if(!cont) return; filters[FILTER_SERVER].changed = FILTER_CHANGED; server_filter_deleted = TRUE; server_filter_vars_free(filter); g_array_remove_index (server_filters,server_filter_dialog_current_filter-1); server_filter_dialog_current_filter = server_filters->len; debug(3,"number of filters: %d",server_filter_dialog_current_filter); gtk_option_menu_set_menu (GTK_OPTION_MENU (filter_option_menu), create_filter_menu()); gtk_option_menu_set_history(GTK_OPTION_MENU(filter_option_menu), server_filter_dialog_current_filter-1); server_filter_fill_widgets(server_filter_dialog_current_filter); /* for(cont=0;contlen;cont++) { filter = g_array_index (server_filters, struct server_filter_vars*, cont); server_filter_print(filter); } */ } /** set all server filter widgets sensitive */ static void server_filter_set_widgets_sensitive(gboolean sensitive) { gtk_widget_set_sensitive(filter_game_type_entry,sensitive); gtk_widget_set_sensitive(version_contains_entry,sensitive); gtk_widget_set_sensitive(game_contains_entry,sensitive); gtk_widget_set_sensitive(map_contains_entry,sensitive); gtk_widget_set_sensitive(server_name_contains_entry,sensitive); gtk_widget_set_sensitive(filter_ping_spinner,sensitive); gtk_widget_set_sensitive(filter_retries_spinner,sensitive); gtk_widget_set_sensitive(filter_not_full_check_button,sensitive); gtk_widget_set_sensitive(filter_not_empty_check_button,sensitive); gtk_widget_set_sensitive(filter_not_full_check_button,sensitive); gtk_widget_set_sensitive(filter_no_cheats_check_button,sensitive); gtk_widget_set_sensitive(filter_no_password_check_button,sensitive); #ifdef USE_GEOIP if (geoip_is_working()) { gtk_widget_set_sensitive(country_filter_list, sensitive); gtk_widget_set_sensitive(scrolledwindow_fcountry, sensitive); gtk_widget_set_sensitive(country_selection_button, sensitive); gtk_widget_set_sensitive(country_clear_button, sensitive); if (!sensitive) { gtk_clist_clear(GTK_CLIST(country_filter_list)); } } #endif } static void server_filter_fill_widgets(guint num) { struct server_filter_vars* filter = NULL; gboolean dofree = FALSE; #ifdef USE_GEOIP char buf[3]; int f_number; int rw = 0; struct pixmap* countrypix = NULL; buf[2]='\0'; #endif if(num > 0) { filter = g_array_index (server_filters, struct server_filter_vars*, num-1); if(!filter) { debug(0,"Bug: filter is NULL"); filter = server_filter_vars_new(); dofree = TRUE; } server_filter_set_widgets_sensitive(TRUE); } else { server_filter_set_widgets_sensitive(FALSE); filter = server_filter_vars_new(); dofree = TRUE; } gtk_entry_set_text (GTK_ENTRY (filter_game_type_entry), filter->game_type?filter->game_type:"" ); gtk_entry_set_text (GTK_ENTRY (version_contains_entry), filter->version_contains?filter->version_contains:"" ); gtk_entry_set_text (GTK_ENTRY (game_contains_entry), filter->game_contains?filter->game_contains:"" ); gtk_entry_set_text (GTK_ENTRY (map_contains_entry), filter->map_contains?filter->map_contains:"" ); gtk_entry_set_text (GTK_ENTRY (server_name_contains_entry), filter->server_name_contains?filter->server_name_contains:"" ); #ifdef USE_GEOIP gtk_clist_clear(GTK_CLIST(country_filter_list)); last_row_country_list=0; /*fill the country_filter_list from filter->countries*/ if (geoip_is_working()) { unsigned i; gchar buf[64] = {0}; gchar *text[1] = {buf}; if (filter->countries != NULL) { for (i = 0; i < filter->countries->len; ++i) { f_number=g_array_index(filter->countries,int,i); // gtk_clist_insert third parameter is not const! strncpy(buf,geoip_name_by_id(f_number),sizeof(buf)); gtk_clist_insert(GTK_CLIST(country_filter_list), rw, text); countrypix = get_pixmap_for_country_with_fallback(f_number); if(countrypix) { gtk_clist_set_pixtext(GTK_CLIST(country_filter_list), rw, 0,geoip_name_by_id(f_number), 4, countrypix->pix, countrypix->mask); } gtk_clist_set_row_data(GTK_CLIST(country_filter_list),rw,GINT_TO_POINTER(f_number)); last_row_country_list++; ++rw; } } } #endif gtk_adjustment_set_value(gtk_spin_button_get_adjustment( GTK_SPIN_BUTTON(filter_ping_spinner)),filter->filter_ping); gtk_adjustment_set_value(gtk_spin_button_get_adjustment( GTK_SPIN_BUTTON(filter_retries_spinner)),filter->filter_retries); gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON (filter_not_full_check_button), filter->filter_not_full); gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON (filter_not_empty_check_button), filter->filter_not_empty); gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON (filter_no_cheats_check_button), filter->filter_no_cheats); gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON (filter_no_password_check_button), filter->filter_no_password); server_filter_changed = FALSE; if(dofree == TRUE) server_filter_vars_free(filter); } // set changed flag to status static void server_filter_set_changed_callback(int status) { server_filter_changed = status; } static void server_filter_page (GtkWidget *notebook) { GtkWidget *page_vbox; GtkWidget *alignment; GtkWidget *frame; GtkWidget *table; GtkWidget *label; GtkWidget *hbox; GtkWidget *button; GtkObject *adj; #ifdef USE_GEOIP GtkWidget *vbuttonbox1; #endif // char label_buf[64]; int row = 0; /* for auto inserting entry boxes */ cleaned_up = FALSE; /* One cannot edit the "None" filter */ if( current_server_filter < 0 ) { current_server_filter = 0; debug(0,"invalid filter nr %d", server_filter_dialog_current_filter ); } else if ( current_server_filter > server_filters->len ) { current_server_filter = 1; debug(0,"invalid filter nr %d", server_filter_dialog_current_filter ); } server_filter_deleted = FALSE; server_filter_dialog_current_filter = current_server_filter; {// back up server filter array unsigned i; struct server_filter_vars* filter; backup_server_filters = g_array_new( FALSE,FALSE, sizeof(struct server_filter_vars*)); // g_array_set_size(backup_server_filters,server_filters->len); for(i=0;ilen;i++) { filter = server_filter_vars_copy(g_array_index (server_filters, struct server_filter_vars*, i)); g_array_append_val(backup_server_filters, filter ); } } page_vbox = gtk_vbox_new (FALSE, 8); gtk_container_set_border_width (GTK_CONTAINER (page_vbox), 8); label = gtk_label_new (_("Server Filter")); gtk_widget_show (label); gtk_notebook_append_page (GTK_NOTEBOOK (notebook), page_vbox, label); hbox = gtk_hbox_new (FALSE, 8); gtk_box_pack_start (GTK_BOX (page_vbox), hbox, FALSE, FALSE, 0); gtk_widget_show(hbox); filter_option_menu = gtk_option_menu_new (); gtk_box_pack_start (GTK_BOX (hbox), filter_option_menu, FALSE, FALSE, 0); gtk_option_menu_set_menu (GTK_OPTION_MENU (filter_option_menu), create_filter_menu()); gtk_widget_show(filter_option_menu); button = gtk_button_new_with_label (_("New")); gtk_widget_set_usize (button, 80, -1); gtk_signal_connect_object (GTK_OBJECT (button), "clicked", GTK_SIGNAL_FUNC (filter_new_rename_callback), (gpointer)0); gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0); gtk_widget_show(button); button = gtk_button_new_with_label (_("Rename")); gtk_widget_set_usize (button, 80, -1); gtk_signal_connect_object (GTK_OBJECT (button), "clicked", GTK_SIGNAL_FUNC (filter_new_rename_callback), (gpointer)1); gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0); gtk_widget_show(button); button = gtk_button_new_with_label (_("Delete")); gtk_widget_set_usize (button, 80, -1); gtk_signal_connect_object (GTK_OBJECT (button), "clicked", GTK_SIGNAL_FUNC (filter_delete_callback), NULL); gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0); gtk_widget_show(button); frame = gtk_frame_new (_("Server would pass filter if")); gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_ETCHED_IN); gtk_box_pack_start (GTK_BOX (page_vbox), frame, FALSE, FALSE, 0); alignment = gtk_alignment_new (0.5, 0.5, 0.0, 0.0); gtk_container_add (GTK_CONTAINER (frame), alignment); #ifdef USE_GEOIP table = gtk_table_new (8, 5, FALSE); #else table = gtk_table_new (6, 5, FALSE); #endif gtk_table_set_row_spacings (GTK_TABLE (table), 2); gtk_table_set_col_spacings (GTK_TABLE (table), 4); gtk_container_set_border_width (GTK_CONTAINER (table), 6); gtk_container_add (GTK_CONTAINER (alignment), table); /*row=0..1 */ /* max ping */ label = gtk_label_new (_("ping is less than")); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_table_attach (GTK_TABLE (table), label, 0, 1, row, row+1, GTK_FILL, GTK_FILL, 0, 0); gtk_widget_show (label); adj = gtk_adjustment_new (MAX_PING, 0.0, MAX_PING, 100.0, 1000.0, 0.0); filter_ping_spinner = gtk_spin_button_new (GTK_ADJUSTMENT (adj), 0, 0); gtk_spin_button_set_update_policy (GTK_SPIN_BUTTON (filter_ping_spinner), GTK_UPDATE_ALWAYS); gtk_widget_set_usize (filter_ping_spinner, 64, -1); gtk_signal_connect_object (GTK_OBJECT (filter_ping_spinner), "changed", GTK_SIGNAL_FUNC (server_filter_set_changed_callback), (gpointer) TRUE); gtk_table_attach_defaults (GTK_TABLE (table), filter_ping_spinner, 1, 2, row, row+1); gtk_widget_show (filter_ping_spinner); /* GAMECONTAINS Filter -- baa */ /* http://developer.gnome.org/doc/API/gtk/gtktable.html */ label = gtk_label_new (_("the game contains the string")); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_table_attach (GTK_TABLE (table), label, 3, 4, row, row+1, GTK_FILL, GTK_FILL, 0, 0); gtk_widget_show (label); game_contains_entry = gtk_entry_new_with_max_length (32); gtk_widget_set_usize (game_contains_entry, 64, -1); gtk_entry_set_editable (GTK_ENTRY (game_contains_entry), TRUE); gtk_signal_connect_object (GTK_OBJECT (game_contains_entry), "changed", GTK_SIGNAL_FUNC (server_filter_set_changed_callback), (gpointer) TRUE); gtk_table_attach_defaults (GTK_TABLE (table), game_contains_entry, 4, 5, row, row+1); gtk_widget_show (game_contains_entry); row++; /*row=1..2*/ /* max timeouts */ label = gtk_label_new (_("the number of retries is fewer than")); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_table_attach (GTK_TABLE (table), label, 0, 1, row, row+1, GTK_FILL, GTK_FILL, 0, 0); gtk_widget_show (label); adj = gtk_adjustment_new (2, 0.0, MAX_RETRIES, 1.0, 1.0, 0.0); filter_retries_spinner = gtk_spin_button_new (GTK_ADJUSTMENT (adj), 0, 0); gtk_widget_set_usize (filter_retries_spinner, 64, -1); gtk_signal_connect_object (GTK_OBJECT (filter_retries_spinner), "changed", GTK_SIGNAL_FUNC (server_filter_set_changed_callback), (gpointer) TRUE); gtk_table_attach_defaults (GTK_TABLE (table), filter_retries_spinner, 1, 2, row, row+1); gtk_widget_show (filter_retries_spinner); /* GAMETYPE Filter -- baa */ /* http://developer.gnome.org/doc/API/gtk/gtktable.html */ label = gtk_label_new (_("the game type contains the string")); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_table_attach (GTK_TABLE (table), label, 3, 4, row, row+1, GTK_FILL, GTK_FILL, 0, 0); gtk_widget_show (label); filter_game_type_entry = gtk_entry_new_with_max_length (32); gtk_widget_set_usize (filter_game_type_entry, 64, -1); gtk_entry_set_editable (GTK_ENTRY (filter_game_type_entry), TRUE); gtk_signal_connect_object (GTK_OBJECT (filter_game_type_entry), "changed", GTK_SIGNAL_FUNC (server_filter_set_changed_callback), (gpointer) TRUE); gtk_table_attach_defaults (GTK_TABLE (table), filter_game_type_entry, 4, 5, row, row+1); gtk_widget_show (filter_game_type_entry); row++; /*row=2..3*/ /*not full */ filter_not_full_check_button =gtk_check_button_new_with_label(_("it is not full")); gtk_signal_connect_object(GTK_OBJECT(filter_not_full_check_button),"toggled", GTK_SIGNAL_FUNC(server_filter_set_changed_callback),(gpointer) TRUE); gtk_table_attach_defaults(GTK_TABLE(table),filter_not_full_check_button, 0, 2, row, row+1); gtk_widget_show(filter_not_full_check_button); /* Version Filter -- baa */ label = gtk_label_new (_("the version contains the string")); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_table_attach (GTK_TABLE (table), label, 3, 4, row, row+1, GTK_FILL, GTK_FILL, 0, 0); gtk_widget_show (label); version_contains_entry = gtk_entry_new_with_max_length (32); gtk_widget_set_usize (version_contains_entry, 64, -1); gtk_entry_set_editable (GTK_ENTRY (version_contains_entry), TRUE); gtk_signal_connect_object (GTK_OBJECT (version_contains_entry), "changed", GTK_SIGNAL_FUNC (server_filter_set_changed_callback), (gpointer) TRUE); gtk_table_attach_defaults (GTK_TABLE (table), version_contains_entry, 4, 5, row, row+1); gtk_widget_show (version_contains_entry); row++; /*row=3..4*/ /* not empty */ filter_not_empty_check_button = gtk_check_button_new_with_label (_("it is not empty")); gtk_signal_connect_object (GTK_OBJECT (filter_not_empty_check_button), "toggled", GTK_SIGNAL_FUNC (server_filter_set_changed_callback), (gpointer) TRUE); gtk_table_attach_defaults (GTK_TABLE (table), filter_not_empty_check_button, 0, 2, row, row+1); gtk_widget_show (filter_not_empty_check_button); /* Map filter*/ label = gtk_label_new (_("the map contains the string")); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_table_attach (GTK_TABLE (table), label, 3, 4, row, row+1, GTK_FILL, GTK_FILL, 0, 0); gtk_widget_show (label); map_contains_entry = gtk_entry_new_with_max_length (32); gtk_widget_set_usize (map_contains_entry, 64, -1); gtk_entry_set_editable (GTK_ENTRY (map_contains_entry), TRUE); gtk_signal_connect_object (GTK_OBJECT (map_contains_entry), "changed", GTK_SIGNAL_FUNC (server_filter_set_changed_callback), (gpointer) TRUE); gtk_table_attach_defaults (GTK_TABLE (table), map_contains_entry, 4, 5, row, row+1); gtk_widget_show (map_contains_entry); row++; /*row=4..5*/ /* no cheats */ filter_no_cheats_check_button = gtk_check_button_new_with_label (_("cheats are not allowed")); gtk_signal_connect_object (GTK_OBJECT (filter_no_cheats_check_button), "toggled", GTK_SIGNAL_FUNC (server_filter_set_changed_callback), (gpointer) TRUE); gtk_table_attach_defaults (GTK_TABLE (table), filter_no_cheats_check_button, 0, 2, row, row+1); gtk_widget_show (filter_no_cheats_check_button); /* Server name filter*/ label = gtk_label_new (_("the server name contains the string")); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_table_attach (GTK_TABLE (table), label, 3, 4, row, row+1, GTK_FILL, GTK_FILL, 0, 0); gtk_widget_show (label); server_name_contains_entry = gtk_entry_new_with_max_length (32); gtk_widget_set_usize (server_name_contains_entry, 64, -1); gtk_entry_set_editable (GTK_ENTRY (server_name_contains_entry), TRUE); gtk_signal_connect_object (GTK_OBJECT (server_name_contains_entry), "changed", GTK_SIGNAL_FUNC (server_filter_set_changed_callback), (gpointer) TRUE); gtk_table_attach_defaults (GTK_TABLE (table),server_name_contains_entry , 4, 5, row, row+1); gtk_widget_show (server_name_contains_entry); row++; /*row=5..6*/ /* no password */ filter_no_password_check_button = gtk_check_button_new_with_label (_("no password required")); gtk_signal_connect_object (GTK_OBJECT (filter_no_password_check_button), "toggled", GTK_SIGNAL_FUNC (server_filter_set_changed_callback), (gpointer) TRUE); gtk_table_attach_defaults (GTK_TABLE (table), filter_no_password_check_button, 0, 2, row, row+1); gtk_widget_show (filter_no_password_check_button); row++; /*country list */ #ifdef USE_GEOIP label = gtk_label_new(_("Country filter:")); gtk_table_attach_defaults(GTK_TABLE(table), label, 0, 1, 6, 7); gtk_misc_set_padding(GTK_MISC(label), 0, 15); gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5); gtk_widget_show(label); scrolledwindow_fcountry = gtk_scrolled_window_new(NULL, NULL); gtk_widget_set_sensitive(scrolledwindow_fcountry,FALSE); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW (scrolledwindow_fcountry), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); country_filter_list = gtk_clist_new(1); gtk_clist_set_shadow_type(GTK_CLIST(country_filter_list),GTK_SHADOW_NONE); gtk_widget_set_sensitive(country_filter_list,FALSE); gtk_clist_set_column_justification(GTK_CLIST(country_filter_list), 0, GTK_JUSTIFY_LEFT); gtk_clist_set_column_width(GTK_CLIST(country_filter_list), 0, 100); gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW (scrolledwindow_fcountry), country_filter_list); gtk_widget_set_usize(scrolledwindow_fcountry, 100, 100); gtk_table_attach_defaults(GTK_TABLE(table), scrolledwindow_fcountry, 0, 1, 7, 8); gtk_widget_show(scrolledwindow_fcountry); gtk_widget_show(country_filter_list); /*select and clear buttons */ vbuttonbox1 = gtk_vbutton_box_new(); gtk_widget_show(vbuttonbox1); gtk_table_attach_defaults(GTK_TABLE(table), vbuttonbox1, 1, 2, 7, 8); gtk_button_box_set_layout(GTK_BUTTON_BOX(vbuttonbox1), GTK_BUTTONBOX_START); gtk_button_box_set_spacing(GTK_BUTTON_BOX(vbuttonbox1), 1); gtk_button_box_set_child_size(GTK_BUTTON_BOX(vbuttonbox1), 80, 0); gtk_button_box_set_child_ipadding(GTK_BUTTON_BOX(vbuttonbox1), 5, -1); country_selection_button = gtk_button_new_with_label(_("select...")); gtk_widget_set_sensitive(country_selection_button,FALSE); gtk_widget_show(country_selection_button); gtk_container_add(GTK_CONTAINER(vbuttonbox1), country_selection_button); gtk_widget_set_usize(country_selection_button, 80, -1); gtk_signal_connect(GTK_OBJECT(country_selection_button), "clicked", GTK_SIGNAL_FUNC(country_select_button_pressed), NULL); gtk_signal_connect_object(GTK_OBJECT(country_selection_button), "clicked", GTK_SIGNAL_FUNC(server_filter_set_changed_callback),(gpointer) TRUE); country_clear_button = gtk_button_new_with_label(_("clear")); gtk_widget_set_sensitive(country_clear_button,FALSE); gtk_signal_connect(GTK_OBJECT(country_clear_button), "clicked", GTK_SIGNAL_FUNC(country_clear_list), NULL); gtk_signal_connect_object(GTK_OBJECT(country_clear_button), "clicked", GTK_SIGNAL_FUNC(server_filter_set_changed_callback),(gpointer) TRUE); gtk_widget_show(country_clear_button); gtk_container_add(GTK_CONTAINER(vbuttonbox1), country_clear_button); gtk_widget_set_usize(country_clear_button, 80, -1); #endif gtk_widget_show (table); gtk_widget_show (alignment); gtk_widget_show (frame); gtk_widget_show (page_vbox); gtk_option_menu_set_history(GTK_OPTION_MENU(filter_option_menu), server_filter_dialog_current_filter-1); server_filter_fill_widgets(server_filter_dialog_current_filter); } static void filters_on_ok (void) { int i; cleaned_up = TRUE; for (i = 0; i < FILTERS_TOTAL; i++) { if (filters[i].filter_on_ok) (*filters[i].filter_on_ok) (); } } static void filters_on_cancel (void) { int i; // ok was pressed if(cleaned_up) return; for (i = 0; i < FILTERS_TOTAL; i++) { if (filters[i].filter_on_cancel) (*filters[i].filter_on_cancel) (); } } int filters_cfg_dialog (int page_num) { GtkWidget *vbox; GtkWidget *hbox; GtkWidget *notebook; GtkWidget *button; GtkWidget *window; int changed = FALSE; int i; #ifdef DEBUG const char *flt_status[3] = { "not changed", "changed", "data changed" }; #endif window = dialog_create_modal_transient_window (_("XQF: Filters"), TRUE, TRUE, filters_on_cancel); vbox = gtk_vbox_new (FALSE, 8); gtk_container_set_border_width (GTK_CONTAINER (vbox), 8); gtk_container_add (GTK_CONTAINER (window), vbox); /* * Notebook */ notebook = gtk_notebook_new (); gtk_notebook_set_tab_pos (GTK_NOTEBOOK (notebook), GTK_POS_TOP); gtk_notebook_set_tab_hborder (GTK_NOTEBOOK (notebook), 4); gtk_box_pack_start (GTK_BOX (vbox), notebook, TRUE, TRUE, 0); server_filter_page (notebook); player_filter_page (notebook); gtk_widget_show (notebook); /* * Buttons at the bottom */ hbox = gtk_hbox_new (FALSE, 8); gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0); button = gtk_button_new_with_label (_("Cancel")); gtk_widget_set_usize (button, 80, -1); /* gtk_signal_connect_object (GTK_OBJECT (button), "clicked", GTK_SIGNAL_FUNC (filters_on_cancel), NULL); */ gtk_signal_connect_object (GTK_OBJECT (button), "clicked", GTK_SIGNAL_FUNC (gtk_widget_destroy), GTK_OBJECT (window)); gtk_box_pack_end (GTK_BOX (hbox), button, FALSE, FALSE, 0); GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); gtk_widget_show (button); button = gtk_button_new_with_label (_("OK")); gtk_widget_set_usize (button, 80, -1); gtk_signal_connect (GTK_OBJECT (button), "clicked", GTK_SIGNAL_FUNC (filters_on_ok), NULL); gtk_signal_connect_object (GTK_OBJECT (button), "clicked", GTK_SIGNAL_FUNC (gtk_widget_destroy), GTK_OBJECT (window)); gtk_box_pack_end (GTK_BOX (hbox), button, FALSE, FALSE, 0); GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); gtk_widget_grab_default (button); gtk_widget_show (button); gtk_widget_show (hbox); gtk_widget_show (vbox); gtk_widget_show (window); for (i = 0; i < FILTERS_TOTAL; i++) filters[i].changed = FILTER_NOT_CHANGED; gtk_notebook_set_page (GTK_NOTEBOOK (notebook), page_num); gtk_main (); unregister_window (window); player_filter_cfg_clean_up (); #ifdef DEBUG for (i = 0; i < FILTERS_TOTAL; i++) { fprintf (stderr, "%s Filter (%d): %s\n", filters[i].name, i, flt_status[filters[i].changed]); } #endif for (i = 0; i < FILTERS_TOTAL; i++) { if (filters[i].changed == FILTER_CHANGED) { changed = TRUE; break; } } return changed; } void filters_init (void) { int i; for (i = 0; i < FILTERS_TOTAL; i++) { if (filters[i].filter_init) (*filters[i].filter_init) (); } } void filters_done (void) { int i; for (i = 0; i < FILTERS_TOTAL; i++) { if (filters[i].filter_done) (*filters[i].filter_done) (); } } #ifdef USE_GEOIP /* * * country filter stuff * */ /*callback: row selection left list*/ void country_selection_left_list(GtkWidget * list, gint row_select, gint column, GdkEventButton * event, gpointer data) { selected_row_left_list = row_select; return; } /*callback: row selection right list*/ void country_selection_right_list(GtkWidget * list, gint row_select, gint column, GdkEventButton * event, gpointer data) { selected_row_right_list = row_select; return; } /*callback: no row is selected*/ void country_unselection_right_list(GtkWidget * list, gint row_select, gint column, GdkEventButton * event, gpointer data) { selected_row_right_list = -1; return; } /*show the country selection popup window*/ static void country_select_button_pressed(GtkWidget * widget, gpointer data) { country_create_popup_window(); } /*callback: clear button*/ static void country_clear_list(GtkWidget * widget, gpointer data) { gtk_clist_clear(GTK_CLIST(country_filter_list)); last_row_country_list=0; } /** add the country selected in the left list to the right list */ static void country_add_selection_to_right_list() { gint i; gint flag_id; gchar buf[64] = {0}; gchar *text[1] = {buf}; struct pixmap* countrypix = NULL; if (selected_row_left_list < 0) return; flag_id = GPOINTER_TO_INT(gtk_clist_get_row_data(GTK_CLIST(country_left_list), selected_row_left_list)); /* do nothing if country is already in right list */ for (i = 0; i < last_row_right_list; i++) if (flag_id == GPOINTER_TO_INT(gtk_clist_get_row_data(GTK_CLIST(country_right_list), i))) return; countrypix = get_pixmap_for_country(flag_id); // gtk_clist_insert third parameter is not const! strncpy(buf,geoip_name_by_id(flag_id),sizeof(buf)); gtk_clist_append(GTK_CLIST(country_right_list), text); if(countrypix) { gtk_clist_set_pixtext(GTK_CLIST(country_right_list), last_row_right_list, 0, geoip_name_by_id(flag_id), 4, countrypix->pix, countrypix->mask); } gtk_clist_set_row_data(GTK_CLIST(country_right_list), last_row_right_list, GINT_TO_POINTER(flag_id)); ++last_row_right_list; } /*callback: >> button*/ static void country_add_button(GtkWidget * widget, gpointer data) { country_add_selection_to_right_list(); } /*callback: << button*/ static void country_delete_button(GtkWidget * widget, gpointer data) { if ((selected_row_right_list != -1) && (last_row_right_list > 0)) { gtk_clist_remove(GTK_CLIST(country_right_list), selected_row_right_list); last_row_right_list--; } } /** callback: double click on row */ gint country_mouse_click_left_list(GtkWidget * widget, GdkEventButton * event, gpointer func_data) { if ((event->type == GDK_2BUTTON_PRESS) && (event->button==1)) { country_add_selection_to_right_list(); } return FALSE; } /*callback: double click on row*/ gint country_mouse_click_right_list(GtkWidget * widget, GdkEventButton * event, gpointer func_data) { if ((event->type == GDK_2BUTTON_PRESS) && (event->button==1)) { country_delete_button(NULL,NULL); } return FALSE; } /*callback: ready with country selection*/ static void country_selection_on_ok(void) { int i; gint country_nr; gchar buf[64] = {0}; gchar *text[1] = {buf}; struct pixmap* countrypix = NULL; selected_row_right_list=-1; gtk_clist_freeze(GTK_CLIST(country_filter_list)); gtk_clist_clear(GTK_CLIST(country_filter_list)); for (i = 0; i < last_row_right_list; ++i) { country_nr = GPOINTER_TO_INT(gtk_clist_get_row_data(GTK_CLIST(country_right_list), i)); countrypix = get_pixmap_for_country(country_nr); // gtk_clist_insert third parameter is not const! strncpy(buf,geoip_name_by_id(country_nr),sizeof(buf)); gtk_clist_insert(GTK_CLIST(country_filter_list), i, text); if(countrypix) { gtk_clist_set_pixtext(GTK_CLIST(country_filter_list), i, 0, text[0], 4,countrypix->pix,countrypix->mask); } gtk_clist_set_row_data(GTK_CLIST(country_filter_list),i,GINT_TO_POINTER(country_nr)); } gtk_clist_thaw(GTK_CLIST(country_filter_list)); last_row_country_list=last_row_right_list; } static void country_selection_on_cancel(void) { selected_row_right_list=-1; } /** populate a clist with country names&flags * @param clist the clist * @param all if false only show countries that have a flag */ static void populate_country_clist(GtkWidget* clist, gboolean all) { struct pixmap* countrypix = NULL; int row_number = -1; unsigned i; gchar buf[64] = {0}; gchar *text[1] = {buf}; g_return_if_fail(GTK_IS_CLIST(clist)); gtk_clist_freeze(GTK_CLIST(clist)); gtk_clist_clear(GTK_CLIST(clist)); for (i = 0; i <= MaxCountries; ++i) { if(all) countrypix = get_pixmap_for_country_with_fallback(i); else countrypix = get_pixmap_for_country(i); if (!all && !countrypix ) continue; ++row_number; // gtk_clist_insert third parameter is not const! strncpy(buf,geoip_name_by_id(i),sizeof(buf)); gtk_clist_insert(GTK_CLIST(clist), row_number, text); if(countrypix) { gtk_clist_set_pixtext(GTK_CLIST(clist), row_number, 0, geoip_name_by_id(i), 4, countrypix->pix, countrypix->mask); } /*save the flag number*/ gtk_clist_set_row_data(GTK_CLIST(clist), row_number, GINT_TO_POINTER(i)); } gtk_clist_thaw(GTK_CLIST(clist)); } static void country_show_all_changed_callback (GtkWidget *widget, GtkWidget *clist) { populate_country_clist(clist,gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget))); } /*country selection window*/ static void country_create_popup_window(void) { GtkWidget *country_popup_window; GtkWidget *vbox1; GtkWidget *vbox2; GtkWidget *frame1; GtkWidget *hbox1; GtkWidget *scrolledwindow1; GtkWidget *vbuttonbox1; GtkWidget *button3; GtkWidget *button4; GtkWidget *scrolledwindow2; GtkWidget *hbuttonbox1; GtkWidget *button1; GtkWidget *button2; int i; int flag_nr; gchar buf[64] = {0}; gchar *text[1] = {buf}; struct pixmap* countrypix = NULL; /* window caption for country filter */ country_popup_window = dialog_create_modal_transient_window(_("Configure Country Filter"), TRUE, TRUE, country_selection_on_cancel); gtk_widget_set_usize(GTK_WIDGET(country_popup_window), 480, 320); vbox1 = gtk_vbox_new(FALSE, 0); gtk_widget_show(vbox1); gtk_container_add(GTK_CONTAINER(country_popup_window), vbox1); frame1 = gtk_frame_new(_("Country filter:")); gtk_widget_show(frame1); gtk_box_pack_start(GTK_BOX(vbox1), frame1, TRUE, TRUE, 0); gtk_container_set_border_width(GTK_CONTAINER(frame1), 4); vbox2 = gtk_vbox_new(FALSE, 0); gtk_widget_show(vbox2); gtk_container_add(GTK_CONTAINER(frame1), vbox2); gtk_container_set_border_width(GTK_CONTAINER(frame1), 4); hbox1 = gtk_hbox_new(FALSE, 0); gtk_widget_show(hbox1); gtk_box_pack_start(GTK_BOX(vbox2), hbox1, TRUE, TRUE, 0); /* left clist */ scrolledwindow1 = gtk_scrolled_window_new(NULL, NULL); gtk_container_set_border_width(GTK_CONTAINER(scrolledwindow1), 8); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolledwindow1), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS); country_left_list = gtk_clist_new(1); gtk_clist_set_shadow_type(GTK_CLIST(country_left_list),GTK_SHADOW_NONE); gtk_clist_set_selection_mode(GTK_CLIST(country_left_list), GTK_SELECTION_SINGLE); gtk_clist_set_column_justification(GTK_CLIST(country_left_list), 0, GTK_JUSTIFY_LEFT); gtk_clist_set_column_width(GTK_CLIST(country_left_list), 0, 100); gtk_signal_connect(GTK_OBJECT(country_left_list), "select_row", GTK_SIGNAL_FUNC(country_selection_left_list), NULL); gtk_signal_connect(GTK_OBJECT(country_left_list), "button_press_event", GTK_SIGNAL_FUNC(country_mouse_click_left_list), NULL); /* fill the list with all countries if the flag is available*/ populate_country_clist(country_left_list, FALSE); gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(scrolledwindow1), GTK_WIDGET(country_left_list)); gtk_box_pack_start(GTK_BOX(hbox1), scrolledwindow1, TRUE, TRUE, 0); gtk_widget_show(scrolledwindow1); gtk_widget_show(country_left_list); /* >> and << buttons */ /*>> */ vbuttonbox1 = gtk_vbutton_box_new(); gtk_widget_show(vbuttonbox1); gtk_box_pack_start(GTK_BOX(hbox1), vbuttonbox1, FALSE, TRUE, 0); gtk_button_box_set_layout(GTK_BUTTON_BOX(vbuttonbox1), GTK_BUTTONBOX_SPREAD); gtk_button_box_set_spacing(GTK_BUTTON_BOX(vbuttonbox1), 0); // gtk_button_box_set_child_size(GTK_BUTTON_BOX(vbuttonbox1), 63, -1); button3 = gtk_button_new_with_label(">>"); gtk_signal_connect(GTK_OBJECT(button3), "clicked", GTK_SIGNAL_FUNC(country_add_button), NULL); gtk_widget_show(button3); gtk_container_add(GTK_CONTAINER(vbuttonbox1), button3); GTK_WIDGET_SET_FLAGS(button3, GTK_CAN_DEFAULT); /*<< */ button4 = gtk_button_new_with_label("<<"); gtk_signal_connect(GTK_OBJECT(button4), "clicked", GTK_SIGNAL_FUNC(country_delete_button), NULL); gtk_widget_show(button4); gtk_container_add(GTK_CONTAINER(vbuttonbox1), button4); GTK_WIDGET_SET_FLAGS(button4, GTK_CAN_DEFAULT); /*right clist */ scrolledwindow2 = gtk_scrolled_window_new(NULL, NULL); gtk_container_set_border_width(GTK_CONTAINER(scrolledwindow2), 8); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolledwindow2), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); country_right_list = gtk_clist_new(1); gtk_clist_set_shadow_type(GTK_CLIST(country_right_list),GTK_SHADOW_NONE); gtk_clist_set_selection_mode(GTK_CLIST(country_right_list), GTK_SELECTION_SINGLE); gtk_clist_set_column_justification(GTK_CLIST(country_right_list), 0, GTK_JUSTIFY_LEFT); gtk_clist_set_column_width(GTK_CLIST(country_right_list), 0, 100); gtk_signal_connect(GTK_OBJECT(country_right_list), "select_row", GTK_SIGNAL_FUNC(country_selection_right_list), NULL); gtk_signal_connect(GTK_OBJECT(country_right_list), "unselect_row", GTK_SIGNAL_FUNC(country_unselection_right_list), NULL); gtk_signal_connect(GTK_OBJECT(country_right_list), "button_press_event", GTK_SIGNAL_FUNC(country_mouse_click_right_list), NULL); /*fill the clist with the same countries as in country_filter_list */ for (i = 0; ipix,countrypix->mask); } gtk_clist_set_row_data(GTK_CLIST(country_right_list),i,GINT_TO_POINTER(flag_nr)); } last_row_right_list=last_row_country_list; gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW (scrolledwindow2), country_right_list); gtk_box_pack_start(GTK_BOX(hbox1), scrolledwindow2, TRUE, TRUE, 0); gtk_widget_show(scrolledwindow2); gtk_widget_show(country_right_list); country_show_all_check_button = gtk_check_button_new_with_label(_("Show all countries")); gtk_signal_connect(GTK_OBJECT(country_show_all_check_button),"toggled", GTK_SIGNAL_FUNC(country_show_all_changed_callback), (gpointer)country_left_list); gtk_widget_show(country_show_all_check_button); gtk_box_pack_start(GTK_BOX(vbox2), country_show_all_check_button, FALSE, FALSE, 0); gtk_container_set_border_width(GTK_CONTAINER(country_show_all_check_button), 4); /*OK and Cancel buttons */ hbuttonbox1 = gtk_hbutton_box_new(); gtk_widget_show(hbuttonbox1); gtk_box_pack_start(GTK_BOX(vbox1), hbuttonbox1, FALSE, TRUE, 0); gtk_container_set_border_width(GTK_CONTAINER(hbuttonbox1), 4); gtk_button_box_set_layout(GTK_BUTTON_BOX(hbuttonbox1), GTK_BUTTONBOX_END); gtk_button_box_set_spacing(GTK_BUTTON_BOX(hbuttonbox1), 1); // gtk_button_box_set_child_size(GTK_BUTTON_BOX(hbuttonbox1), 79, 38); button1 = gtk_button_new_with_label(_("OK")); // gtk_widget_set_usize(button1, 80, -1); gtk_signal_connect(GTK_OBJECT(button1), "clicked", GTK_SIGNAL_FUNC(country_selection_on_ok), NULL); gtk_signal_connect_object(GTK_OBJECT(button1), "clicked", GTK_SIGNAL_FUNC(gtk_widget_destroy), GTK_OBJECT(country_popup_window)); gtk_widget_show(button1); gtk_container_add(GTK_CONTAINER(hbuttonbox1), button1); GTK_WIDGET_SET_FLAGS(button1, GTK_CAN_DEFAULT); button2 = gtk_button_new_with_label(_("Cancel")); // gtk_widget_set_usize(button2, 80, -1); gtk_signal_connect_object(GTK_OBJECT(button2), "clicked", GTK_SIGNAL_FUNC(gtk_widget_destroy), GTK_OBJECT(country_popup_window)); gtk_widget_show(button2); gtk_container_add(GTK_CONTAINER(hbuttonbox1), button2); GTK_WIDGET_SET_FLAGS(button2, GTK_CAN_DEFAULT); gtk_widget_show(country_popup_window); gtk_main(); unregister_window(country_popup_window); } #endif unsigned filter_time_inc() { ++filter_current_time; if(!filter_current_time) { struct server* s; GSList* list = all_servers(); printf("CONGRATULATION! You managed to filter more than %u times\n", UINT_MAX); for(;list; list = list->next) { s = (struct server *) list->data; s->flt_last = 0; } ++filter_current_time; } return filter_current_time; } static int quick_filter (struct server *s) { unsigned i; size_t max = sizeof(quick_filter_token)/sizeof(quick_filter_token[0]); if(!s || !*quick_filter_str) return TRUE; for(i = 0; i < max && quick_filter_token[i]; ++i) { if(s->map && strstr(s->map, quick_filter_token[i])) continue; if(s->game && lowcasestrstr(s->game, quick_filter_token[i])) continue; if(s->gametype && lowcasestrstr(s->gametype, quick_filter_token[i])) continue; if(s->name && lowcasestrstr(s->name, quick_filter_token[i])) continue; if(s->host && s->host->name && lowcasestrstr(s->host->name, quick_filter_token[i])) continue; { gboolean match = FALSE; char **info_ptr; for (info_ptr = s->info; info_ptr && *info_ptr; info_ptr += 2) { if(lowcasestrstr(info_ptr[1], quick_filter_token[i])) { match = TRUE; break; } } if(!match) return FALSE; } } return TRUE; } void filter_quick_set (const char* str) { if(str) { unsigned num; size_t max = sizeof(quick_filter_token)/sizeof(quick_filter_token[0]); strncpy(quick_filter_str, str, sizeof(quick_filter_str)); num = tokenize(quick_filter_str, quick_filter_token, max, " "); if(num < max) quick_filter_token[num] = NULL; } else { quick_filter_str[0] = '\0'; quick_filter_token[0] = NULL; } } const char* filter_quick_get(void) { if(!*quick_filter_token) return NULL; return quick_filter_str; } void filter_quick_unset (void) { quick_filter_str[0] = '\0'; quick_filter_token[0] = NULL; } xqf-1.0.5/src/filter.h0000644002404400000620000000570310100543547011461 00000000000000/* XQF - Quake server browser and launcher * Copyright (C) 1998-2000 Roman Pozlevich * * 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 */ #ifndef __FILTER_H__ #define __FILTER_H__ #include #include "xqf.h" #include "pixmaps.h" #define FILTERS_TOTAL 3 #define FILTERS_MASK 0x07 #define FILTER_SERVER_MASK 0x01 #define FILTER_PLAYER_MASK 0x02 #define FILTER_QUICK_MASK 0x04 enum filter_num { FILTER_SERVER = 0, FILTER_PLAYER = 1, FILTER_QUICK = 2 }; enum filter_status { FILTER_NOT_CHANGED = 0, FILTER_CHANGED, FILTER_DATA_CHANGED /* data changed, but no need to re-apply filter */ }; // need to modify server_filter_vars_new, server_filter_vars_free, // server_filter_vars_copy too struct server_filter_vars { int filter_retries; int filter_ping; int filter_not_full; int filter_not_empty; int filter_no_cheats; int filter_no_password; char *filter_name; char *game_contains; char *version_contains; char *game_type; char *map_contains; char *server_name_contains; #ifdef USE_GEOIP GArray *countries; #endif }; struct filter { char *name; char *short_name; char *short_cfg_name; int (*func) (struct server *s); void (*filter_init) (void); void (*filter_done) (void); void (*filter_on_ok) (void); // function to call when ok is pressed void (*filter_on_cancel) (void); // function to call when abort is pressed unsigned last_changed; enum filter_status changed; struct pixmap* pix; struct pixmap* cfg_pix; }; extern struct filter filters[]; extern unsigned char cur_filter; extern GArray* server_filters; unsigned int current_server_filter; extern unsigned int current_server_filter; extern void apply_filters (unsigned mask, struct server *s); extern GSList *build_filtered_list (unsigned mask, GSList *servers); extern int filter_retries; extern int filter_ping; extern int filter_not_full; extern int filter_not_empty; extern int filter_no_cheats; extern int filter_no_password; extern int filters_cfg_dialog (int page_num); extern void filters_init (void); extern void filters_done (void); extern void filter_quick_set (const char* str); extern const char* filter_quick_get (void); extern void filter_quick_unset (void); extern unsigned filter_time_inc(); #endif /* __FILTER_H__ */ xqf-1.0.5/src/dialogs.c0000644002404400000620000005273010275354561011624 00000000000000/* XQF - Quake server browser and launcher * Copyright (C) 1998-2000 Roman Pozlevich * * 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 */ #include "gnuconfig.h" #include #include #include /* va_start, va_end */ #include #include #include "i18n.h" #include "xqf.h" #include "xqf-ui.h" #include "utils.h" #include "xutils.h" #include "dialogs.h" #include "loadpixmap.h" static int destroy_on_escape (GtkWidget *widget, GdkEventKey *event) { if (event->keyval == GDK_Escape) { gtk_widget_destroy (widget); return TRUE; } return FALSE; } static int unregister_window_callback (GtkWidget *widget, GdkEventKey *event) { unregister_window(widget); return FALSE; } GtkWidget *dialog_create_modal_transient_window (const char *title, int close_on_esc, int allow_resize, GtkSignalFunc on_destroy) { GtkWidget *window; GtkWidget *parent; /*FIXME_GTK2: "GTK_WINDOW_DIALOG" is deprecated */ #ifdef USE_GTK2 window = gtk_window_new (GTK_WINDOW_TOPLEVEL); #else window = gtk_window_new (GTK_WINDOW_DIALOG); #endif gtk_window_set_position (GTK_WINDOW (window), GTK_WIN_POS_CENTER); gtk_signal_connect (GTK_OBJECT (window), "delete_event", GTK_SIGNAL_FUNC (window_delete_event_callback), NULL); if (on_destroy) { gtk_signal_connect (GTK_OBJECT (window), "destroy", GTK_SIGNAL_FUNC (on_destroy), NULL); } gtk_signal_connect (GTK_OBJECT (window), "destroy", GTK_SIGNAL_FUNC (gtk_main_quit), NULL); if (close_on_esc) { gtk_signal_connect (GTK_OBJECT (window), "key_press_event", GTK_SIGNAL_FUNC (destroy_on_escape), NULL); } if (title) gtk_window_set_title (GTK_WINDOW (window), title); gtk_widget_realize (window); gdk_window_set_decorations (window->window, (allow_resize)? GDK_DECOR_BORDER | GDK_DECOR_TITLE | GDK_DECOR_RESIZEH : GDK_DECOR_BORDER | GDK_DECOR_TITLE); gdk_window_set_functions (window->window, (allow_resize)? GDK_FUNC_MOVE | GDK_FUNC_CLOSE | GDK_FUNC_RESIZE : GDK_FUNC_MOVE | GDK_FUNC_CLOSE); gtk_window_set_modal (GTK_WINDOW (window), TRUE); parent = top_window (); if (parent) gtk_window_set_transient_for (GTK_WINDOW (window), GTK_WINDOW (parent)); register_window (window); return window; } void dialog_ok (const char *title, const char *fmt, ...) { GtkWidget *window; GtkWidget *main_vbox; GtkWidget *vbox; GtkWidget *hbox; GtkWidget *button; GtkWidget *label; char buf[2048]; va_list ap; if (!fmt) return; va_start (ap, fmt); g_vsnprintf (buf, 2048, fmt, ap); va_end (ap); window = dialog_create_modal_transient_window ( (title)? title : _("XQF: Warning!"), TRUE, FALSE, NULL); main_vbox = gtk_vbox_new (FALSE, 0); gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 8); gtk_container_add (GTK_CONTAINER (window), main_vbox); /* Message */ vbox = gtk_vbox_new (FALSE, 0); gtk_container_set_border_width (GTK_CONTAINER (vbox), 32); gtk_box_pack_start (GTK_BOX (main_vbox), vbox, TRUE, TRUE, 0); label = gtk_label_new (buf); gtk_box_pack_start (GTK_BOX (vbox), label, TRUE, TRUE, 0); gtk_widget_show (label); gtk_widget_show (vbox); /* Buttons */ hbox = gtk_hbox_new (TRUE, 4); gtk_container_set_border_width (GTK_CONTAINER (hbox), 4); gtk_box_pack_start (GTK_BOX (main_vbox), hbox, FALSE, TRUE, 0); button = gtk_button_new_with_label (_("OK")); gtk_widget_set_usize (button, 96, -1); gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, FALSE, 0); gtk_signal_connect_object (GTK_OBJECT (button), "clicked", GTK_SIGNAL_FUNC (gtk_widget_destroy), GTK_OBJECT (window)); GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); gtk_widget_grab_default (button); gtk_widget_show (button); gtk_widget_show (hbox); gtk_widget_show (main_vbox); gtk_widget_show (window); gtk_main (); unregister_window (window); } static void yes_button_clicked_callback (GtkWidget *widget, int *data) { *data = 1; } static void redial_button_clicked_callback (GtkWidget *widget, int *data) { *data = 2; } int dialog_yesno (const char *title, int defbutton, char *yes, char *no, char *fmt, ...) { GtkWidget *window; GtkWidget *main_vbox; GtkWidget *vbox; GtkWidget *hbox; GtkWidget *button; GtkWidget *label; int res = 0; char buf[2048]; va_list ap; if (!fmt) return res; va_start (ap, fmt); g_vsnprintf (buf, 2048, fmt, ap); va_end (ap); window = dialog_create_modal_transient_window ( (title)? title : _("XQF: Warning!"), TRUE, TRUE, NULL); main_vbox = gtk_vbox_new (FALSE, 0); gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 8); gtk_container_add (GTK_CONTAINER (window), main_vbox); /* Message */ vbox = gtk_vbox_new (FALSE, 0); gtk_container_set_border_width (GTK_CONTAINER (vbox), 32); gtk_box_pack_start (GTK_BOX (main_vbox), vbox, TRUE, TRUE, 0); label = gtk_label_new (buf); gtk_box_pack_start (GTK_BOX (vbox), label, TRUE, TRUE, 0); gtk_widget_show (label); gtk_widget_show (vbox); /* Buttons */ hbox = gtk_hbox_new (TRUE, 4); gtk_container_set_border_width (GTK_CONTAINER (hbox), 4); gtk_box_pack_start (GTK_BOX (main_vbox), hbox, FALSE, TRUE, 0); button = gtk_button_new_with_label ((yes)? yes : _("Yes")); gtk_widget_set_usize (button, 96, -1); gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, FALSE, 0); gtk_signal_connect (GTK_OBJECT (button), "clicked", GTK_SIGNAL_FUNC (yes_button_clicked_callback), &res); gtk_signal_connect_object (GTK_OBJECT (button), "clicked", GTK_SIGNAL_FUNC (gtk_widget_destroy), GTK_OBJECT (window)); GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); if (defbutton == 0) gtk_widget_grab_default (button); gtk_widget_show (button); button = gtk_button_new_with_label ((no)? no : _("No")); gtk_widget_set_usize (button, 96, -1); gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, FALSE, 0); gtk_signal_connect_object (GTK_OBJECT (button), "clicked", GTK_SIGNAL_FUNC (gtk_widget_destroy), GTK_OBJECT (window)); GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); if (defbutton == 1) gtk_widget_grab_default (button); gtk_widget_show (button); gtk_widget_show (hbox); gtk_widget_show (main_vbox); gtk_widget_show (window); gtk_main (); unregister_window (window); return res; } int dialog_yesnoredial (const char *title, int defbutton, char *yes, char *no, char *redial, char *fmt, ...) { GtkWidget *window; GtkWidget *main_vbox; GtkWidget *vbox; GtkWidget *hbox; GtkWidget *button; GtkWidget *label; int res = 0; char buf[2048]; va_list ap; if (!fmt) return res; va_start (ap, fmt); g_vsnprintf (buf, 2048, fmt, ap); va_end (ap); window = dialog_create_modal_transient_window ( (title)? title : _("XQF: Warning!"), TRUE, TRUE, NULL); main_vbox = gtk_vbox_new (FALSE, 0); gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 8); gtk_container_add (GTK_CONTAINER (window), main_vbox); /* Message */ vbox = gtk_vbox_new (FALSE, 0); gtk_container_set_border_width (GTK_CONTAINER (vbox), 32); gtk_box_pack_start (GTK_BOX (main_vbox), vbox, TRUE, TRUE, 0); label = gtk_label_new (buf); gtk_box_pack_start (GTK_BOX (vbox), label, TRUE, TRUE, 0); gtk_widget_show (label); gtk_widget_show (vbox); /* Buttons */ hbox = gtk_hbox_new (TRUE, 4); gtk_container_set_border_width (GTK_CONTAINER (hbox), 4); gtk_box_pack_start (GTK_BOX (main_vbox), hbox, FALSE, TRUE, 0); button = gtk_button_new_with_label ((yes)? yes : _("Yes")); gtk_widget_set_usize (button, 96, -1); gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, FALSE, 0); gtk_signal_connect (GTK_OBJECT (button), "clicked", GTK_SIGNAL_FUNC (yes_button_clicked_callback), &res); gtk_signal_connect_object (GTK_OBJECT (button), "clicked", GTK_SIGNAL_FUNC (gtk_widget_destroy), GTK_OBJECT (window)); GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); if (defbutton == 0) gtk_widget_grab_default (button); gtk_widget_show (button); button = gtk_button_new_with_label ((no)? no : _("No")); gtk_widget_set_usize (button, 96, -1); gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, FALSE, 0); gtk_signal_connect_object (GTK_OBJECT (button), "clicked", GTK_SIGNAL_FUNC (gtk_widget_destroy), GTK_OBJECT (window)); GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); if (defbutton == 1) gtk_widget_grab_default (button); gtk_widget_show (button); button = gtk_button_new_with_label ((redial)? redial : _("Redial")); gtk_widget_set_usize (button, 96, -1); gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, FALSE, 0); gtk_signal_connect (GTK_OBJECT (button), "clicked", GTK_SIGNAL_FUNC (redial_button_clicked_callback), &res); gtk_signal_connect_object (GTK_OBJECT (button), "clicked", GTK_SIGNAL_FUNC (gtk_widget_destroy), GTK_OBJECT (window)); GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); if (defbutton == 2) gtk_widget_grab_default (button); gtk_widget_show (button); gtk_widget_show (hbox); gtk_widget_show (main_vbox); gtk_widget_show (window); gtk_main (); unregister_window (window); return res; } static GtkWidget *enter_string_entry; static GtkWidget *enter_string_opt_button; static char *enter_string_res; static int *enter_string_optval; static void enter_string_activate_callback (GtkWidget *widget, gpointer data) { enter_string_res = strdup_strip (gtk_entry_get_text (GTK_ENTRY (widget))); if (enter_string_optval) { *enter_string_optval = GTK_TOGGLE_BUTTON (enter_string_opt_button)->active; } } static char *va_enter_string_dialog (int visible, char *optstr, int *optval, char *fmt, va_list ap) { GtkWidget *window; GtkWidget *main_vbox; GtkWidget *hbox; GtkWidget *button; GtkWidget *label; char buf[2048]; g_vsnprintf (buf, 2048, fmt, ap); enter_string_res = NULL; enter_string_optval = optval; window = dialog_create_modal_transient_window (buf, TRUE, FALSE, NULL); main_vbox = gtk_vbox_new (FALSE, 8); gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 16); gtk_container_add (GTK_CONTAINER (window), main_vbox); hbox = gtk_hbox_new (FALSE, 8); gtk_box_pack_start (GTK_BOX (main_vbox), hbox, FALSE, FALSE, 0); /* Message */ label = gtk_label_new (buf); gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); gtk_widget_show (label); /* Entry */ enter_string_entry = gtk_entry_new_with_max_length (128); gtk_entry_set_visibility (GTK_ENTRY (enter_string_entry), visible); gtk_widget_set_usize (enter_string_entry, 128, -1); gtk_box_pack_start (GTK_BOX (hbox), enter_string_entry, TRUE, TRUE, 0); gtk_signal_connect (GTK_OBJECT (enter_string_entry), "activate", GTK_SIGNAL_FUNC (enter_string_activate_callback), NULL); gtk_signal_connect_object (GTK_OBJECT (enter_string_entry), "activate", GTK_SIGNAL_FUNC (gtk_widget_destroy), GTK_OBJECT (window)); gtk_widget_grab_focus (enter_string_entry); gtk_widget_show (enter_string_entry); /* OK Button */ button = gtk_button_new_with_label (_("OK")); gtk_signal_connect_object (GTK_OBJECT (button), "clicked", GTK_SIGNAL_FUNC (enter_string_activate_callback), GTK_OBJECT (enter_string_entry)); gtk_signal_connect_object (GTK_OBJECT (button), "clicked", GTK_SIGNAL_FUNC (gtk_widget_destroy), GTK_OBJECT (window)); gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0); gtk_widget_show (button); /* Cancel Button */ button = gtk_button_new_with_label (_("Cancel")); gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0); gtk_signal_connect_object (GTK_OBJECT (button), "clicked", GTK_SIGNAL_FUNC (gtk_widget_destroy), GTK_OBJECT (window)); gtk_widget_show (button); gtk_widget_show (hbox); /* Option */ if (optstr) { hbox = gtk_hbox_new (FALSE, 8); gtk_box_pack_start (GTK_BOX (main_vbox), hbox, FALSE, FALSE, 0); enter_string_opt_button = gtk_check_button_new_with_label (optstr); if (optval) { gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON (enter_string_opt_button), *optval); } else { gtk_widget_set_sensitive (enter_string_opt_button, FALSE); } gtk_box_pack_start (GTK_BOX (hbox), enter_string_opt_button, FALSE, FALSE, 8); gtk_widget_show (enter_string_opt_button); gtk_widget_show (hbox); } gtk_widget_show (main_vbox); gtk_widget_show (window); gtk_main (); unregister_window (window); return enter_string_res; } char *enter_string_dialog (int visible, char *fmt, ...) { char *res; va_list ap; va_start (ap, fmt); res = va_enter_string_dialog (visible, NULL, NULL, fmt, ap); va_end (ap); return res; } char *enter_string_with_option_dialog (int visible, char *optstr, int *optval, char *fmt, ...) { char *res; va_list ap; va_start (ap, fmt); res = va_enter_string_dialog (visible, optstr, optval, fmt, ap); va_end (ap); return res; } static GtkWidget* create_AboutWindow (void); void about_dialog (GtkWidget *widget, gpointer data) { GtkWidget* aboutwindow = NULL; GtkWidget* w = NULL, *w2 = NULL; char *intro = _("XQF Game Server Browser"); char *version = g_strdup_printf(_("Version %s"),XQF_VERSION); /* translators can use the copyright symbol instead of (C) */ char *author = _("Copyright (C) 1998-2002 Roman Pozlevich"); char *urls = "http://www.linuxgames.com/xqf\n" "http://sourceforge.net/projects/xqf\n"; char *contrib1 = _("Maintainers:"); char *contrib2 = "Ludwig Nussel \n" "Alex Burger \n" "Jordi Mallach \n" "Bill Adams \n"; char *contrib3 = _("Contributors:"); char *contrib4 = "Jochen Baier \n" "Luca Camillo \n"; char *bugs1 = _("Bug reports and feature requests:"); char *bugs2 = "http://sourceforge.net/projects/xqf\n" "xqf-developer@lists.sourceforge.net\n"; char *text = NULL;// dialog_ok (_("About XQF"), "%s", text); aboutwindow = create_AboutWindow(); w2 = load_pixmap(aboutwindow, "splash.png"); w = gtk_object_get_data(GTK_OBJECT(aboutwindow),"AboutVBox"); gtk_box_pack_start (GTK_BOX (w), w2, FALSE, FALSE, 0); gtk_box_reorder_child(GTK_BOX(w), w2, 0); gtk_widget_show(w2); w = gtk_object_get_data(GTK_OBJECT(aboutwindow),"AboutLabel"); text = g_strjoin("\n", intro, version, author, urls, contrib1, contrib2, contrib3, contrib4, bugs1, bugs2, NULL); g_free(version); gtk_label_set_text(GTK_LABEL(w), text); g_free(text); gtk_window_set_transient_for (GTK_WINDOW (aboutwindow), GTK_WINDOW (top_window())); register_window(aboutwindow); gtk_widget_show(aboutwindow); } /* glade generated */ GtkWidget* create_AboutWindow (void) { GtkWidget *AboutWindow; GtkWidget *AboutVBox; GtkWidget *scrolledwindow1; GtkWidget *viewport1; GtkWidget *AboutLabel; GtkWidget *hbuttonbox1; GtkWidget *OKButton; AboutWindow = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_object_set_data (GTK_OBJECT (AboutWindow), "AboutWindow", AboutWindow); gtk_widget_set_usize (AboutWindow, 400, 440); gtk_window_set_title (GTK_WINDOW (AboutWindow), _("About XQF")); gtk_window_set_position (GTK_WINDOW (AboutWindow), GTK_WIN_POS_CENTER); gtk_window_set_modal (GTK_WINDOW (AboutWindow), TRUE); AboutVBox = gtk_vbox_new (FALSE, 0); gtk_widget_ref (AboutVBox); gtk_object_set_data_full (GTK_OBJECT (AboutWindow), "AboutVBox", AboutVBox, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (AboutVBox); gtk_container_add (GTK_CONTAINER (AboutWindow), AboutVBox); scrolledwindow1 = gtk_scrolled_window_new (NULL, NULL); gtk_widget_ref (scrolledwindow1); gtk_object_set_data_full (GTK_OBJECT (AboutWindow), "scrolledwindow1", scrolledwindow1, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (scrolledwindow1); gtk_box_pack_start (GTK_BOX (AboutVBox), scrolledwindow1, TRUE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (scrolledwindow1), 4); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow1), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); viewport1 = gtk_viewport_new (NULL, NULL); gtk_widget_ref (viewport1); gtk_object_set_data_full (GTK_OBJECT (AboutWindow), "viewport1", viewport1, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (viewport1); gtk_container_add (GTK_CONTAINER (scrolledwindow1), viewport1); AboutLabel = gtk_label_new (_("[placeholder, do not translate]")); gtk_widget_ref (AboutLabel); gtk_object_set_data_full (GTK_OBJECT (AboutWindow), "AboutLabel", AboutLabel, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (AboutLabel); gtk_container_add (GTK_CONTAINER (viewport1), AboutLabel); gtk_label_set_justify (GTK_LABEL (AboutLabel), GTK_JUSTIFY_LEFT); gtk_label_set_line_wrap (GTK_LABEL (AboutLabel), TRUE); gtk_misc_set_alignment (GTK_MISC (AboutLabel), 0, 0); hbuttonbox1 = gtk_hbutton_box_new (); gtk_widget_ref (hbuttonbox1); gtk_object_set_data_full (GTK_OBJECT (AboutWindow), "hbuttonbox1", hbuttonbox1, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (hbuttonbox1); gtk_box_pack_start (GTK_BOX (AboutVBox), hbuttonbox1, FALSE, TRUE, 4); OKButton = gtk_button_new_with_label (_("OK")); gtk_widget_ref (OKButton); gtk_object_set_data_full (GTK_OBJECT (AboutWindow), "OKButton", OKButton, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (OKButton); gtk_container_add (GTK_CONTAINER (hbuttonbox1), OKButton); GTK_WIDGET_SET_FLAGS (OKButton, GTK_CAN_DEFAULT); gtk_signal_connect (GTK_OBJECT (AboutWindow), "destroy_event", GTK_SIGNAL_FUNC (gtk_main_quit), NULL); gtk_signal_connect (GTK_OBJECT (AboutWindow), "key_press_event", GTK_SIGNAL_FUNC (destroy_on_escape), NULL); gtk_signal_connect (GTK_OBJECT (AboutWindow), "destroy", GTK_SIGNAL_FUNC (unregister_window_callback), NULL); gtk_signal_connect_object (GTK_OBJECT (OKButton), "clicked", GTK_SIGNAL_FUNC (gtk_widget_destroy), GTK_OBJECT (AboutWindow)); gtk_widget_grab_focus (OKButton); gtk_widget_grab_default (OKButton); return AboutWindow; } /** ok callback for file_dialog that sets the selected filename in the * textentry that was passed as user data to file_dialog() */ static void file_dialog_ok_set_textentry (GtkWidget *widget, gpointer textentry) { const char *filename = NULL; GtkWidget* filesel = topmost_parent(widget); filename = gtk_file_selection_get_filename (GTK_FILE_SELECTION (filesel)); if (!filename) return; gtk_entry_set_text (GTK_ENTRY (textentry), filename); } GtkWidget* file_dialog(const char *title, GtkSignalFunc ok_callback, gpointer data) { GtkFileSelection* file_selector; file_selector = GTK_FILE_SELECTION(gtk_file_selection_new (title)); if(!file_selector) return NULL; gtk_window_set_modal (GTK_WINDOW(file_selector),TRUE); /* gtk_signal_connect (GTK_OBJECT (file_selector), "destroy", (GtkSignalFunc) file_dialog_destroy_callback, &file_selector); */ gtk_signal_connect (GTK_OBJECT (file_selector->ok_button), "clicked", ok_callback, data ); gtk_signal_connect_object (GTK_OBJECT (file_selector->ok_button), "clicked", (GtkSignalFunc) gtk_widget_destroy, GTK_OBJECT (file_selector)); /* Connect the cancel_button to destroy the widget */ gtk_signal_connect_object (GTK_OBJECT (file_selector->cancel_button), "clicked", (GtkSignalFunc) gtk_widget_destroy, GTK_OBJECT (file_selector)); gtk_widget_show(GTK_WIDGET(file_selector)); return GTK_WIDGET(file_selector); } GtkWidget* file_dialog_textentry(const char *title, GtkWidget* entry) { GtkWidget* filesel = file_dialog(title, GTK_SIGNAL_FUNC(file_dialog_ok_set_textentry), entry); const char* text = gtk_entry_get_text(GTK_ENTRY (entry)); if(text && *text) { gtk_file_selection_set_filename(GTK_FILE_SELECTION(filesel), text); } return filesel; } xqf-1.0.5/src/dialogs.h0000644002404400000620000000430010275354561011617 00000000000000/* XQF - Quake server browser and launcher * Copyright (C) 1998-2000 Roman Pozlevich * * 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 */ #ifndef __DIALOGS_H__ #define __DIALOGS_H__ #include static inline GtkWidget* topmost_parent(GtkWidget* widget) { for(; widget && widget->parent; widget = widget->parent); return widget; } extern GtkWidget *dialog_create_modal_transient_window (const char *title, int close_on_esc, int allow_resize, GtkSignalFunc on_destroy); extern void dialog_ok (const char *title, const char *fmt, ...) G_GNUC_PRINTF(2, 3); extern int dialog_yesno (const char *title, int defbutton, char *yes, char *no, char *fmt, ...) G_GNUC_PRINTF(5, 6); extern int dialog_yesnoredial (const char *title, int defbutton, char *yes, char *no, char *redial, char *fmt, ...) G_GNUC_PRINTF(6, 7); extern char *enter_string_dialog (int visible, char *fmt, ...) G_GNUC_PRINTF(2, 3); extern char *enter_string_with_option_dialog ( int visible, char *optstr, int *optval, char *fmt, ...) G_GNUC_PRINTF(4, 5); void about_dialog (GtkWidget *widget, gpointer data); /** Create a new file selection widget */ GtkWidget* file_dialog(const char *title, GtkSignalFunc ok_callback, gpointer data); /** create new file_dialog and connect the ok button to the textentry */ GtkWidget* file_dialog_textentry(const char *title, GtkWidget* entry); #endif /* __DIALOGS_H__ */ xqf-1.0.5/src/history.c0000644002404400000620000000504110262022614011657 00000000000000/* XQF - Quake server browser and launcher * Copyright (C) 1998-2000 Roman Pozlevich * * 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 */ #include #include /* strcmp */ #include #include "xqf.h" #include "config.h" #include "history.h" struct history *history_new (char *id) { struct history *h; char path[128]; config_key_iterator* iterator; char *keyval; h = g_malloc0 (sizeof (struct history)); h->id = g_strdup (id); h->size = HISTORY_DEFAULT_MAX_ITEMS; g_snprintf (path, 128, "/" CONFIG_FILE "/History: %s", h->id); iterator = config_init_iterator (path); while (iterator) { iterator = config_iterator_next (iterator, NULL, &keyval); h->items = g_list_append (h->items, keyval); } return h; } char *history_add (struct history *h, char *str) { GList *list; if (!h || !str) return str; for (list = h->items; list; list = list->next) { if (!strcmp (str, (char *) list->data)) { g_free (list->data); h->items = g_list_remove_link (h->items, list); break; } } while (h->items && g_list_length (h->items) >= h->size) { list = g_list_last (h->items); g_free (list->data); h->items = g_list_remove_link (h->items, list); } h->items = g_list_prepend (h->items, g_strdup (str)); return str; } void history_free (struct history *h) { GList *list; char fmt[128]; char key[128]; int i; if(!h) return; g_snprintf (fmt, 128, "/" CONFIG_FILE "/History: %s/%%i", h->id); for (i = 0, list = h->items; list; i++, list = list->next) { g_snprintf (key, 128, fmt, i); config_set_string (key, (char *) list->data); } if (h) { if (h->items) { g_list_foreach (h->items, (GFunc) g_free, NULL); g_list_free (h->items); h->items = NULL; } if (h->id) { g_free (h->id); h->id = NULL; } g_free (h); } } xqf-1.0.5/src/history.h0000644002404400000620000000222307201342720011665 00000000000000/* XQF - Quake server browser and launcher * Copyright (C) 1998-2000 Roman Pozlevich * * 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 */ #ifndef __HISTORY_H__ #define __HISTORY_H__ #include #define HISTORY_DEFAULT_MAX_ITEMS 16 struct history { GList *items; char *id; int size; }; extern struct history *history_new (char *id); extern char *history_add (struct history *h, char *str); extern void history_free (struct history *h); #endif /* __HISTORY_H__ */ xqf-1.0.5/src/games.c0000644002404400000620000011257010445250746011274 00000000000000// DO NOT EDIT THIS FILE, AUTOMATICALLY GENERATED static char* stringlist000[] = { "id1", NULL }; static char* stringlist001[] = { "twilight-nq", "nq-sgl", "nq-glx", "nq-sdl", "nq-x11", NULL }; static char* stringlist002[] = { "id1", "qw", NULL }; static char* stringlist003[] = { "twilight-qw", "qw-client-sgl", "qw-client-glx", "qw-client-sdl", "qw-client-x11", NULL }; static char* stringlist004[] = { "baseq2", NULL }; static char* stringlist005[] = { "quake2", NULL }; static char* stringlist006[] = { "baseq3", "demoq3", NULL }; static char* stringlist007[] = { "q3", "quake3", NULL }; static char* stringlist008[] = { "q4base", NULL }; static char* stringlist009[] = { "quake4", NULL }; static char* stringlist010[] = { "+rconpassword", "+net_clientRemoteConsolePassword", NULL }; static char* stringlist011[] = { "wolfmp", "main", "demomain", NULL }; static char* stringlist012[] = { "wolf", NULL }; static char* stringlist013[] = { "etmain", NULL }; static char* stringlist014[] = { "et", NULL }; static char* stringlist015[] = { "base", NULL }; static char* stringlist016[] = { "doom3", NULL }; static char* stringlist017[] = { "+rconpassword", "+net_clientRemoteConsolePassword", NULL }; static char* stringlist018[] = { "BaseEF", NULL }; static char* stringlist019[] = { "sof", NULL }; static char* stringlist020[] = { "main", NULL }; static char* stringlist021[] = { "tribes2", NULL }; static char* stringlist022[] = { "ut", NULL }; static char* stringlist023[] = { "ut2003", "ut2003_demo", NULL }; static char* stringlist024[] = { "ut2004", "ut2004demo", NULL }; static char* stringlist025[] = { "rune", NULL }; static char* stringlist026[] = { "postal2mp", "postal2mpdemo", NULL }; static char* stringlist027[] = { "armyops", NULL }; static char* stringlist028[] = { "descent3", NULL }; static char* stringlist029[] = { "ssamtfe", NULL }; static char* stringlist030[] = { "ssamtse", NULL }; static char* stringlist031[] = { "main", NULL }; static char* stringlist032[] = { "mohaa", NULL }; static char* stringlist033[] = { "main", NULL }; static char* stringlist034[] = { "codmp", NULL }; static char* stringlist035[] = { "savage", NULL }; static char* stringlist036[] = { "base", NULL }; static char* stringlist037[] = { "jamp", NULL }; static char* stringlist038[] = { "netpanzer", NULL }; static char* stringlist039[] = { "data", NULL }; static char* stringlist040[] = { "nexuiz", NULL }; static char* stringlist041[] = { "basewsw", NULL }; static char* stringlist042[] = { "warsow", NULL }; static char* stringlist043[] = { "base", NULL }; static char* stringlist044[] = { "tremulous", NULL }; struct game games[] = { { type : Q1_SERVER, flags : GAME_CONNECT | GAME_RECORD | GAME_QUAKE1_PLAYER_COLORS | GAME_QUAKE1_SKIN, name : "Quake", default_port : 26000, id : "QS", qstat_str : "QS", qstat_option : "-qs", icon : "q1.xpm", parse_player : poqs_parse_player, parse_server : quake_parse_server, config_is_valid : quake_config_is_valid, write_config : write_q1_vars, exec_client : q1_exec_generic, custom_cfgs : quake_custom_cfgs, save_info : quake_save_info, init_maps : quake_init_maps, has_map : quake_has_map, cmd_or_dir_changed : q1_cmd_or_dir_changed, prefs_load : q1_prefs_load, update_prefs : q1_update_prefs, pd : &q1_private, main_mod : stringlist000, command : stringlist001, }, { type : QW_SERVER, flags : GAME_CONNECT | GAME_RECORD | GAME_SPECTATE | GAME_RCON | GAME_QUAKE1_PLAYER_COLORS | GAME_QUAKE1_SKIN, name : "QuakeWorld", default_port : 27500, default_master_port : 27000, id : "QWS", qstat_str : "QWS", qstat_option : "-qws", qstat_master_option : "-qwm", icon : "q.xpm", parse_player : qw_parse_player, parse_server : quake_parse_server, analyze_serverinfo : qw_analyze_serverinfo, config_is_valid : quake_config_is_valid, write_config : write_qw_vars, exec_client : qw_exec, custom_cfgs : quake_custom_cfgs, save_info : quake_save_info, init_maps : quake_init_maps, has_map : quake_has_map, cmd_or_dir_changed : qw_cmd_or_dir_changed, prefs_load : qw_prefs_load, update_prefs : qw_update_prefs, pd : &qw_private, main_mod : stringlist002, command : stringlist003, }, { type : Q2_SERVER, flags : GAME_CONNECT | GAME_RECORD | GAME_SPECTATE | GAME_PASSWORD | GAME_RCON, name : "Quake2", default_port : 27910, default_master_port : 27900, id : "Q2S", qstat_str : "Q2S", qstat_option : "-q2s", qstat_master_option : "-q2m", icon : "q2.xpm", parse_player : q2_parse_player, parse_server : quake_parse_server, analyze_serverinfo : q2_analyze_serverinfo, config_is_valid : quake_config_is_valid, write_config : write_q2_vars, exec_client : q2_exec, custom_cfgs : quake_custom_cfgs, save_info : quake_save_info, init_maps : quake_init_maps, has_map : quake_has_map, arch_identifier : "version", identify_cpu : identify_cpu, identify_os : identify_os, cmd_or_dir_changed : q2_cmd_or_dir_changed, prefs_load : q2_prefs_load, update_prefs : q2_update_prefs, pd : &q2_private, main_mod : stringlist004, command : stringlist005, }, { type : Q3_SERVER, flags : GAME_CONNECT | GAME_PASSWORD | GAME_RCON | GAME_QUAKE3_MASTERPROTOCOL | GAME_Q3COLORS, name : "Quake3: Arena", default_port : 27960, default_master_port : 27950, id : "Q3S", qstat_str : "Q3S", qstat_option : "-q3s", qstat_master_option : "-q3m", icon : "q3.xpm", parse_player : q3_parse_player, parse_server : quake_parse_server, analyze_serverinfo : q3_analyze_serverinfo, config_is_valid : quake3_config_is_valid, exec_client : q3_exec, custom_cfgs : quake_custom_cfgs, save_info : quake_save_info, init_maps : q3_init_maps, has_map : quake_has_map, get_mapshot : q3_get_mapshot, arch_identifier : "version", identify_cpu : identify_cpu, identify_os : identify_os, prefs_load : q3_prefs_load, update_prefs : q3_update_prefs, default_home : "~/.q3a", pd : &q3_private, main_mod : stringlist006, command : stringlist007, }, { type : Q4_SERVER, flags : GAME_CONNECT | GAME_PASSWORD | GAME_RCON | GAME_QUAKE3_MASTERPROTOCOL | GAME_Q3COLORS, name : "Quake 4", default_port : 28004, default_master_port : 27650, id : "Q4S", qstat_str : "Q4S", qstat_option : "-q4s", qstat_master_option : "-q4m", icon : "q4.xpm", parse_player : q3_parse_player, parse_server : quake_parse_server, analyze_serverinfo : doom3_analyze_serverinfo, config_is_valid : config_is_valid_generic, exec_client : q3_exec, custom_cfgs : quake_custom_cfgs, save_info : quake_save_info, init_maps : quake4_init_maps, has_map : quake4_has_map, get_mapshot : quake4_get_mapshot, arch_identifier : "si_version", identify_cpu : identify_cpu, identify_os : identify_os, cmd_or_dir_changed : doom3_cmd_or_dir_changed, prefs_load : q3_prefs_load_common, update_prefs : quake4_update_prefs, default_home : "~/.quake4", pd : &quake4_private, main_mod : stringlist008, command : stringlist009, attributes : stringlist010, }, { type : WO_SERVER, flags : GAME_CONNECT | GAME_PASSWORD | GAME_RCON | GAME_QUAKE3_MASTERPROTOCOL | GAME_Q3COLORS, name : "Wolfenstein", default_port : 27960, default_master_port : 27950, id : "WOS", qstat_str : "RWS", qstat_option : "-rws", qstat_master_option : "-rwm", icon : "wo.xpm", parse_player : q3_parse_player, parse_server : quake_parse_server, analyze_serverinfo : q3_analyze_serverinfo, config_is_valid : config_is_valid_generic, exec_client : q3_exec, custom_cfgs : quake_custom_cfgs, save_info : quake_save_info, init_maps : q3_init_maps, has_map : quake_has_map, get_mapshot : q3_get_mapshot, arch_identifier : "version", identify_cpu : identify_cpu, identify_os : identify_os, prefs_load : q3_prefs_load_common, update_prefs : q3_update_prefs_common, default_home : "~/.wolf", pd : &wolf_private, main_mod : stringlist011, command : stringlist012, }, { type : WOET_SERVER, flags : GAME_CONNECT | GAME_PASSWORD | GAME_RCON | GAME_QUAKE3_MASTERPROTOCOL | GAME_Q3COLORS, name : "Enemy Territory", default_port : 27960, default_master_port : 27950, id : "WOETS", qstat_str : "WOETS", qstat_option : "-woets", qstat_master_option : "-woetm", icon : "et.xpm", parse_player : q3_parse_player, parse_server : quake_parse_server, analyze_serverinfo : q3_analyze_serverinfo, config_is_valid : config_is_valid_generic, exec_client : q3_exec, custom_cfgs : quake_custom_cfgs, save_info : quake_save_info, init_maps : q3_init_maps, has_map : quake_has_map, get_mapshot : q3_get_mapshot, arch_identifier : "version", identify_cpu : identify_cpu, identify_os : identify_os, prefs_load : q3_prefs_load_common, update_prefs : q3_update_prefs_common, default_home : "~/.etwolf", pd : &wolfet_private, main_mod : stringlist013, command : stringlist014, }, { type : DOOM3_SERVER, flags : GAME_CONNECT | GAME_PASSWORD | GAME_RCON | GAME_QUAKE3_MASTERPROTOCOL | GAME_Q3COLORS, name : "Doom 3", default_port : 27666, default_master_port : 27650, id : "DM3S", qstat_str : "DM3S", qstat_option : "-dm3s", qstat_master_option : "-dm3m", icon : "doom3.xpm", parse_player : q3_parse_player, parse_server : quake_parse_server, analyze_serverinfo : doom3_analyze_serverinfo, config_is_valid : config_is_valid_generic, exec_client : q3_exec, custom_cfgs : quake_custom_cfgs, save_info : quake_save_info, init_maps : doom3_init_maps, has_map : doom3_has_map, get_mapshot : doom3_get_mapshot, arch_identifier : "si_version", identify_cpu : identify_cpu, identify_os : identify_os, cmd_or_dir_changed : doom3_cmd_or_dir_changed, prefs_load : q3_prefs_load_common, update_prefs : doom3_update_prefs, default_home : "~/.doom3", pd : &doom3_private, main_mod : stringlist015, command : stringlist016, attributes : stringlist017, }, { type : EF_SERVER, flags : GAME_CONNECT | GAME_PASSWORD | GAME_RCON | GAME_QUAKE3_MASTERPROTOCOL | GAME_Q3COLORS, name : "Voyager Elite Force", default_port : 27960, default_master_port : 27950, id : "EFS", qstat_str : "Q3S", qstat_option : "-q3s", qstat_master_option : "-efm", icon : "ef.xpm", parse_player : q3_parse_player, parse_server : quake_parse_server, analyze_serverinfo : q3_analyze_serverinfo, config_is_valid : config_is_valid_generic, exec_client : q3_exec, custom_cfgs : quake_custom_cfgs, save_info : quake_save_info, arch_identifier : "version", identify_cpu : identify_cpu, identify_os : identify_os, prefs_load : q3_prefs_load_common, update_prefs : q3_update_prefs_common, main_mod : stringlist018, }, { type : H2_SERVER, flags : GAME_CONNECT | GAME_QUAKE1_PLAYER_COLORS, name : "Hexen2", default_port : 26900, id : "H2S", qstat_str : "H2S", qstat_option : "-h2s", icon : "hex.xpm", parse_player : poqs_parse_player, parse_server : quake_parse_server, config_is_valid : config_is_valid_generic, exec_client : q1_exec_generic, save_info : quake_save_info, }, { type : HW_SERVER, flags : GAME_CONNECT | GAME_QUAKE1_PLAYER_COLORS | GAME_RCON, name : "HexenWorld", default_port : 26950, id : "HWS", qstat_str : "HWS", qstat_option : "-hws", icon : "hw.xpm", parse_player : qw_parse_player, parse_server : quake_parse_server, analyze_serverinfo : qw_analyze_serverinfo, config_is_valid : config_is_valid_generic, exec_client : q1_exec_generic, save_info : quake_save_info, }, { type : SN_SERVER, flags : GAME_CONNECT | GAME_RCON, name : "Sin", default_port : 22450, id : "SNS", qstat_str : "SNS", qstat_option : "-sns", icon : "sn.xpm", parse_player : q2_parse_player, parse_server : quake_parse_server, analyze_serverinfo : q2_analyze_serverinfo, config_is_valid : config_is_valid_generic, exec_client : q2_exec_generic, save_info : quake_save_info, }, { type : HL_SERVER_OLD, flags : GAME_CONNECT | GAME_PASSWORD | GAME_RCON | GAME_MASTER_STEAM, name : "Half-Life (old)", default_port : 27015, default_master_port : 27010, id : "HLS", qstat_str : "HLS", qstat_option : "-hls", qstat_master_option : "-hlm", icon : "hl.xpm", parse_player : hl_parse_player, parse_server : quake_parse_server, analyze_serverinfo : hl_analyze_serverinfo, config_is_valid : config_is_valid_generic, exec_client : hl_exec, save_info : quake_save_info, init_maps : quake_init_maps, has_map : quake_has_map, arch_identifier : "sv_os", identify_os : identify_os, pd : &hl_private, }, { type : HL_SERVER, flags : GAME_CONNECT | GAME_PASSWORD | GAME_RCON | GAME_MASTER_STEAM, name : "Half-Life", default_port : 27015, default_master_port : 27010, id : "HLA2S", qstat_str : "HLA2S", qstat_option : "-hla2s", qstat_master_option : "-hla2sm", icon : "hl.xpm", parse_player : hl_parse_player, parse_server : quake_parse_server, analyze_serverinfo : hl_analyze_serverinfo, config_is_valid : config_is_valid_generic, exec_client : hl_exec, save_info : quake_save_info, init_maps : quake_init_maps, has_map : quake_has_map, arch_identifier : "sv_os", identify_os : identify_os, pd : &hl_private, }, { type : HL2_SERVER, flags : GAME_CONNECT | GAME_PASSWORD | GAME_MASTER_STEAM, name : "Half-Life 2", default_port : 27015, default_master_port : 27011, id : "A2S", qstat_str : "A2S", qstat_option : "-a2s", qstat_master_option : "-stma2s", icon : "hl2.xpm", parse_player : hl_parse_player, parse_server : quake_parse_server, analyze_serverinfo : hl_analyze_serverinfo, config_is_valid : config_is_valid_generic, exec_client : hl_exec, save_info : quake_save_info, arch_identifier : "sv_os", identify_os : identify_os, }, { type : KP_SERVER, flags : GAME_CONNECT | GAME_RCON, name : "Kingpin", default_port : 31510, id : "Q2S:KP", qstat_str : "Q2S", qstat_option : "-q2s", icon : "kp.xpm", parse_player : q2_parse_player, parse_server : quake_parse_server, analyze_serverinfo : q2_analyze_serverinfo, config_is_valid : config_is_valid_generic, exec_client : q2_exec_generic, save_info : quake_save_info, arch_identifier : "version", identify_cpu : identify_cpu, identify_os : identify_os, }, { type : SFS_SERVER, flags : GAME_CONNECT | GAME_RCON, name : "Soldier of Fortune", default_port : 28910, id : "SFS", qstat_str : "SFS", qstat_option : "-sfs", icon : "sfs.xpm", parse_player : q2_parse_player, parse_server : quake_parse_server, analyze_serverinfo : q2_analyze_serverinfo, config_is_valid : config_is_valid_generic, exec_client : q2_exec_generic, save_info : quake_save_info, command : stringlist019, }, { type : SOF2S_SERVER, flags : GAME_CONNECT | GAME_PASSWORD | GAME_RCON | GAME_QUAKE3_MASTERPROTOCOL | GAME_Q3COLORS, name : "Soldier of Fortune 2", default_port : 20100, default_master_port : 20110, id : "SOF2S", qstat_str : "SOF2S", qstat_option : "-sof2s", qstat_master_option : "-sof2m", icon : "sof2s.xpm", parse_player : q3_parse_player, parse_server : quake_parse_server, analyze_serverinfo : q3_analyze_serverinfo, config_is_valid : config_is_valid_generic, exec_client : q3_exec, custom_cfgs : quake_custom_cfgs, save_info : quake_save_info, arch_identifier : "version", identify_cpu : identify_cpu, identify_os : identify_os, prefs_load : q3_prefs_load_common, update_prefs : q3_update_prefs_common, main_mod : stringlist020, }, { type : T2_SERVER, flags : GAME_CONNECT | GAME_RCON, name : "Tribes 2", default_port : 28000, default_master_port : 28000, id : "T2S", qstat_str : "T2S", qstat_option : "-t2s", qstat_master_option : "-t2m", icon : "t2.xpm", parse_player : t2_parse_player, parse_server : quake_parse_server, analyze_serverinfo : t2_analyze_serverinfo, config_is_valid : config_is_valid_generic, exec_client : t2_exec, save_info : quake_save_info, arch_identifier : "linux", identify_os : t2_identify_os, prefs_load : tribes2_prefs_load, update_prefs : tribes2_update_prefs, command : stringlist021, }, { type : HR_SERVER, flags : GAME_CONNECT | GAME_RCON, name : "Heretic2", default_port : 28910, id : "Q2S:HR", qstat_str : "Q2S", qstat_option : "-q2s", icon : "hr2.xpm", parse_player : q2_parse_player, parse_server : quake_parse_server, analyze_serverinfo : q2_analyze_serverinfo, config_is_valid : config_is_valid_generic, exec_client : q2_exec_generic, save_info : quake_save_info, }, { type : UN_SERVER, flags : GAME_CONNECT | GAME_PASSWORD, name : "Unreal / UT", default_port : 7777, id : "UNS", qstat_str : "UNS", qstat_option : "-uns", icon : "un.xpm", parse_player : un_parse_player, parse_server : quake_parse_server, analyze_serverinfo : un_analyze_serverinfo, config_is_valid : config_is_valid_generic, exec_client : ut_exec, save_info : quake_save_info, init_maps : unreal_init_maps, has_map : unreal_has_map, pd : &ut_private, command : stringlist022, }, { type : UT2_SERVER, flags : GAME_CONNECT | GAME_SPECTATE | GAME_PASSWORD | GAME_LAUNCH_HOSTPORT, name : "UT 2003", default_port : 7777, id : "UT2S", qstat_str : "UT2S", qstat_option : "-ut2s", icon : "ut2.xpm", parse_player : un_parse_player, parse_server : quake_parse_server, analyze_serverinfo : un_analyze_serverinfo, config_is_valid : config_is_valid_generic, exec_client : ut_exec, save_info : quake_save_info, init_maps : unreal_init_maps, has_map : unreal_has_map, default_home : "~/.ut2003", pd : &ut2_private, command : stringlist023, }, { type : UT2004_SERVER, flags : GAME_CONNECT | GAME_SPECTATE | GAME_PASSWORD | GAME_LAUNCH_HOSTPORT | GAME_MASTER_CDKEY, name : "UT 2004", default_port : 7777, default_master_port : 28902, id : "UT2004S", qstat_str : "UT2004S", qstat_option : "-ut2004s", qstat_master_option : "-ut2004m", icon : "ut2004.xpm", parse_player : un_parse_player, parse_server : quake_parse_server, analyze_serverinfo : un_analyze_serverinfo, config_is_valid : config_is_valid_generic, exec_client : ut_exec, save_info : quake_save_info, init_maps : unreal_init_maps, has_map : unreal_has_map, cmd_or_dir_changed : ut2004_cmd_or_dir_changed, update_prefs : ut2004_update_prefs, default_home : "~/.ut2004", pd : &ut2004_private, command : stringlist024, }, { type : RUNE_SERVER, flags : GAME_CONNECT | GAME_PASSWORD, name : "Rune", default_port : 7777, id : "RUNESRV", qstat_str : "UNS", qstat_option : "-uns", icon : "rune.xpm", parse_player : un_parse_player, parse_server : quake_parse_server, analyze_serverinfo : un_analyze_serverinfo, config_is_valid : config_is_valid_generic, exec_client : ut_exec, save_info : quake_save_info, init_maps : unreal_init_maps, has_map : unreal_has_map, pd : &rune_private, command : stringlist025, }, { type : POSTAL2_SERVER, flags : GAME_CONNECT | GAME_PASSWORD, name : "Postal 2", default_port : 7777, id : "POSTAL2", qstat_str : "UNS", qstat_option : "-uns", icon : "postal2.xpm", parse_player : un_parse_player, parse_server : quake_parse_server, analyze_serverinfo : un_analyze_serverinfo, config_is_valid : config_is_valid_generic, exec_client : ut_exec, save_info : quake_save_info, init_maps : unreal_init_maps, has_map : unreal_has_map, pd : &postal2_private, command : stringlist026, }, { type : AAO_SERVER, flags : GAME_CONNECT | GAME_SPECTATE | GAME_PASSWORD | GAME_LAUNCH_HOSTPORT, name : "America's Army", default_port : 1716, id : "AMS", qstat_str : "AMS", qstat_option : "-ams", icon : "aao.xpm", parse_player : un_parse_player, parse_server : quake_parse_server, analyze_serverinfo : un_analyze_serverinfo, config_is_valid : config_is_valid_generic, exec_client : ut_exec, save_info : quake_save_info, init_maps : unreal_init_maps, has_map : unreal_has_map, pd : &aao_private, command : stringlist027, }, { type : DESCENT3_SERVER, flags : GAME_CONNECT, name : "Descent3", default_port : 20142, id : "D3G", qstat_str : "D3G", qstat_option : "-d3g", icon : "descent3.xpm", parse_player : descent3_parse_player, parse_server : quake_parse_server, analyze_serverinfo : descent3_analyze_serverinfo, config_is_valid : config_is_valid_generic, exec_client : descent3_exec, save_info : quake_save_info, command : stringlist028, }, { type : SSAM_SERVER, flags : GAME_CONNECT, name : "Serious Sam", default_port : 25600, id : "SMS", qstat_str : "SMS", qstat_option : "-sms", icon : "ssam.xpm", parse_player : un_parse_player, parse_server : quake_parse_server, analyze_serverinfo : un_analyze_serverinfo, config_is_valid : config_is_valid_generic, exec_client : ssam_exec, save_info : quake_save_info, command : stringlist029, }, { type : SSAMSE_SERVER, flags : GAME_CONNECT, name : "Serious Sam TSE", default_port : 25600, id : "SMSSE", qstat_str : "SMS", qstat_option : "-sms", icon : "ssam.xpm", parse_player : un_parse_player, parse_server : quake_parse_server, analyze_serverinfo : un_analyze_serverinfo, config_is_valid : config_is_valid_generic, exec_client : ssam_exec, save_info : quake_save_info, command : stringlist030, }, { type : MOHAA_SERVER, flags : GAME_CONNECT | GAME_PASSWORD | GAME_RCON | GAME_QUAKE3_MASTERPROTOCOL | GAME_Q3COLORS, name : "Medal of Honor: Allied Assault", default_port : 12204, default_master_port : 27950, id : "MHS", qstat_str : "MHS", qstat_option : "-mhs", qstat_master_option : "-q3m", icon : "mohaa.xpm", parse_player : q3_parse_player, parse_server : quake_parse_server, analyze_serverinfo : q3_analyze_serverinfo, config_is_valid : config_is_valid_generic, exec_client : q3_exec, custom_cfgs : quake_custom_cfgs, save_info : quake_save_info, init_maps : q3_init_maps, has_map : quake_has_map, get_mapshot : q3_get_mapshot, arch_identifier : "version", identify_cpu : identify_cpu, identify_os : identify_os, default_home : "~/.mohaa", pd : &mohaa_private, main_mod : stringlist031, command : stringlist032, }, { type : COD_SERVER, flags : GAME_CONNECT | GAME_PASSWORD | GAME_RCON | GAME_QUAKE3_MASTERPROTOCOL | GAME_Q3COLORS, name : "Call of Duty", default_port : 28960, default_master_port : 20510, id : "CODS", qstat_str : "CODS", qstat_option : "-cods", qstat_master_option : "-codm", icon : "cod.xpm", parse_player : q3_parse_player, parse_server : quake_parse_server, analyze_serverinfo : q3_analyze_serverinfo, config_is_valid : config_is_valid_generic, exec_client : q3_exec, custom_cfgs : quake_custom_cfgs, save_info : quake_save_info, init_maps : q3_init_maps, has_map : quake_has_map, get_mapshot : q3_get_mapshot, identify_cpu : identify_cpu, identify_os : identify_os, prefs_load : q3_prefs_load_common, update_prefs : q3_update_prefs_common, pd : &cod_private, main_mod : stringlist033, command : stringlist034, }, { type : SAS_SERVER, flags : GAME_CONNECT | GAME_PASSWORD | GAME_ADMIN, name : "Savage", default_port : 11235, id : "SAS", qstat_str : "SAS", qstat_option : "-sas", icon : "savage.xpm", parse_player : savage_parse_player, parse_server : quake_parse_server, analyze_serverinfo : savage_analyze_serverinfo, config_is_valid : config_is_valid_generic, exec_client : savage_exec, save_info : quake_save_info, command : stringlist035, }, { type : BF1942_SERVER, flags : GAME_CONNECT, name : "Battlefield 1942", default_port : 14567, id : "BF1942", qstat_str : "EYE", qstat_option : "-eye", icon : "bf1942.xpm", parse_player : un_parse_player, parse_server : quake_parse_server, analyze_serverinfo : bf1942_analyze_serverinfo, config_is_valid : config_is_valid_generic, exec_client : bf1942_exec, save_info : quake_save_info, }, { type : JK3_SERVER, flags : GAME_CONNECT | GAME_PASSWORD | GAME_RCON | GAME_QUAKE3_MASTERPROTOCOL | GAME_Q3COLORS, name : "Jedi Academy", default_port : 29070, default_master_port : 29060, id : "JK3S", qstat_str : "JK3S", qstat_option : "-jk3s", qstat_master_option : "-jk3m", icon : "jk3.xpm", parse_player : q3_parse_player, parse_server : quake_parse_server, analyze_serverinfo : q3_analyze_serverinfo, config_is_valid : config_is_valid_generic, exec_client : q3_exec, custom_cfgs : quake_custom_cfgs, save_info : quake_save_info, init_maps : q3_init_maps, has_map : quake_has_map, get_mapshot : q3_get_mapshot, identify_cpu : identify_cpu, identify_os : identify_os, prefs_load : q3_prefs_load_common, update_prefs : q3_update_prefs_common, pd : &jk3_private, main_mod : stringlist036, command : stringlist037, }, { type : NETP_SERVER, flags : GAME_CONNECT, name : "NetPanzer", default_port : 3030, default_master_port : 28900, id : "NETP", qstat_str : "GPS", qstat_option : "-netp", qstat_master_option : "-netpm,netpanzer", icon : "netp.xpm", parse_player : un_parse_player, parse_server : quake_parse_server, analyze_serverinfo : un_analyze_serverinfo, config_is_valid : config_is_valid_generic, exec_client : netpanzer_exec, save_info : quake_save_info, command : stringlist038, }, { type : NEXUIZ_SERVER, flags : GAME_CONNECT | GAME_PASSWORD | GAME_RCON | GAME_QUAKE3_MASTERPROTOCOL | GAME_Q3COLORS, name : "Nexuiz", default_port : 27960, default_master_port : 27950, id : "NEXUIZS", qstat_str : "NEXUIZS", qstat_option : "-nexuizs", qstat_master_option : "-nexuizm", icon : "nexuiz.xpm", parse_player : q3_parse_player, parse_server : quake_parse_server, analyze_serverinfo : q3_analyze_serverinfo, config_is_valid : config_is_valid_generic, exec_client : q3_exec, custom_cfgs : quake_custom_cfgs, save_info : quake_save_info, arch_identifier : "version", identify_cpu : identify_cpu, identify_os : identify_os, prefs_load : q3_prefs_load_common, update_prefs : q3_update_prefs_common, default_home : "~/.nexuiz", main_mod : stringlist039, command : stringlist040, }, { type : WARSOW_SERVER, flags : GAME_CONNECT | GAME_PASSWORD | GAME_RCON | GAME_QUAKE3_MASTERPROTOCOL | GAME_Q3COLORS, name : "Warsow", default_port : 44400, default_master_port : 27950, id : "WARSOWS", qstat_str : "WARSOWS", qstat_option : "-warsows", qstat_master_option : "-warsowm", icon : "warsow.xpm", parse_player : q3_parse_player, parse_server : quake_parse_server, analyze_serverinfo : q3_analyze_serverinfo, config_is_valid : config_is_valid_generic, exec_client : q3_exec, custom_cfgs : quake_custom_cfgs, save_info : quake_save_info, init_maps : q3_init_maps, has_map : quake_has_map, get_mapshot : q3_get_mapshot, arch_identifier : "version", identify_cpu : identify_cpu, identify_os : identify_os, prefs_load : q3_prefs_load_common, update_prefs : q3_update_prefs_common, default_home : "~/.warsow", pd : &warsow_private, main_mod : stringlist041, command : stringlist042, }, { type : TREMULOUS_SERVER, flags : GAME_CONNECT | GAME_PASSWORD | GAME_RCON | GAME_QUAKE3_MASTERPROTOCOL | GAME_Q3COLORS, name : "Tremulous", default_port : 30720, default_master_port : 30710, id : "TREMULOUS", qstat_str : "TREMULOUS", qstat_option : "-tremulous", qstat_master_option : "-tremulousm", icon : "tremulous.xpm", parse_player : q3_parse_player, parse_server : quake_parse_server, analyze_serverinfo : q3_analyze_serverinfo, config_is_valid : config_is_valid_generic, exec_client : q3_exec, custom_cfgs : quake_custom_cfgs, save_info : quake_save_info, init_maps : q3_init_maps, has_map : quake_has_map, get_mapshot : q3_get_mapshot, arch_identifier : "version", identify_cpu : identify_cpu, identify_os : identify_os, cmd_or_dir_changed : tremulous_cmd_or_dir_changed, prefs_load : q3_prefs_load_common, update_prefs : tremulous_update_prefs, default_home : "~/.tremulous", pd : &tremulous_private, main_mod : stringlist043, command : stringlist044, }, { type : GPS_SERVER, flags : GAME_CONNECT, name : "Generic Gamespy", default_port : 27888, id : "GPS", qstat_str : "GPS", qstat_option : "-gps", icon : "gamespy3d.xpm", parse_player : un_parse_player, parse_server : quake_parse_server, analyze_serverinfo : un_analyze_serverinfo, config_is_valid : config_is_valid_generic, exec_client : gamespy_exec, save_info : quake_save_info, }, { type : UNKNOWN_SERVER, name : "unknown", parse_server : quake_parse_server, config_is_valid : config_is_valid_generic, exec_client : exec_generic, save_info : quake_save_info, }, }; xqf-1.0.5/src/i18n.h0000644002404400000620000000025607461346143010762 00000000000000/* i18n stuff */ #undef _ #ifdef ENABLE_NLS # include # define _(string) gettext(string) #else # define _(string) (string) #endif #define N_(string) (string) xqf-1.0.5/src/config.c0000644002404400000620000004262710301657046011445 00000000000000/* XQF - Quake server browser and launcher * Copyright (C) 1998-2000 Roman Pozlevich * * 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 */ /* * Simple 'ini'-file management. * Function calls should be compatible with GNOME ones. */ #include #include /* FILE */ #include /* strchr, strcmp, strlen */ #include /* strtol, strtod */ #include /* unlink */ #include #include "utils.h" #include "debug.h" #include "config.h" static GSList* directories = NULL; static GList *files = NULL; static GList *prefix_stack = NULL; struct config_file { char *filename; GList *sections; unsigned dirty : 1; unsigned read_only : 1; }; struct config_section { char *name; GList *keys; }; struct config_key { char *name; char *value; }; #ifdef DEBUG static void dump_base (void) { GList *fptr, *sptr, *kptr; struct config_file *file; struct config_section *section; struct config_key *key; for (fptr = files; fptr; fptr = fptr->next) { file = (struct config_file *) fptr->data; fprintf (stderr, "---- %s\n", file->filename); for (sptr = file->sections; sptr; sptr = sptr->next) { section = (struct config_section *) sptr->data; fprintf (stderr, "[%s]\n", section->name); for (kptr = section->keys; kptr; kptr = kptr->next) { key = (struct config_key *) kptr->data; fprintf (stderr, "%s=%s\n", key->name, key->value); } } } fprintf (stderr, "----\n"); } #endif /** * lookup keyname in secname in filename (secname and keyname can be NULL). * When create is set, appropriate entries will be created if they don't * already exist. When file1, section1 and key1 are not NULL (all three are * independent), pointers to the found/created structs are stored there. **/ static void find_key (const char *filename, const char *secname, const char *keyname, int create, struct config_file **file1, struct config_section **section1, struct config_key **key1) { struct config_file *file = NULL; struct config_section *section = NULL; struct config_key *key = NULL; GList *list; if (file1) *file1 = NULL; if (section1) *section1 = NULL; if (key1) *key1 = NULL; // look if file is already known for (list = files; list; list = list->next) { file = (struct config_file *) list->data; if (strcmp (filename, file->filename) == 0) break; } // otherwise create one if (!list) { if (!create) return; file = g_malloc0 (sizeof (struct config_file)); file->filename = g_strdup (filename); files = g_list_append (files, file); } if (file1) *file1 = file; if (secname) { // see if section is alreay known in file for (list = file->sections; list; list = list->next) { section = (struct config_section *) list->data; if (g_strcasecmp (secname, section->name) == 0) break; } // otherwise create one if (!list) { if (!create) return; section = g_malloc0 (sizeof (struct config_section)); section->name = g_strdup (secname); file->sections = g_list_append (file->sections, section); } if (section1) *section1 = section; } if (secname && keyname) { // see if key is already in section for (list = section->keys; list; list = list->next) { key = (struct config_key *) list->data; if (g_strcasecmp (keyname, key->name) == 0) break; } // otherwise create one if (!list) { if (!create) return; key = g_malloc0 (sizeof (struct config_key)); key->name = g_strdup (keyname); section->keys = g_list_append (section->keys, key); } if (key1) *key1 = key; } } /** * lookup keyname in section, if not found create a new config_key. * returns pointer to found or created key */ static struct config_key *key_in_section (struct config_section *section, char *keyname) { struct config_key *key; GList *list; for (list = section->keys; list; list = list->next) { key = (struct config_key *) list->data; if (g_strcasecmp (keyname, key->name) == 0) break; } if (!list) { key = g_malloc0 (sizeof (struct config_key)); key->name = g_strdup (keyname); section->keys = g_list_append (section->keys, key); } return key; } #define BUF_SIZE (1024*8) struct state_s { const char* filename; char *secname; struct config_section *section; void* data; }; static gboolean parse_line_file(char* buf, struct state_s* state) { struct config_key *key = NULL; char *p; unsigned len; len = strlen(buf); if (len <= 1) return TRUE; if (buf[len - 1] == '\n') { buf[len - 1] = '\0'; len--; } if (buf[len - 1] == '\r') { buf[len - 1] = '\0'; len--; } if (*buf == '[') { p = strchr (buf + 1, ']'); if (p) { *p = '\0'; if (state->secname) g_free (state->secname); state->secname = g_strdup (buf + 1); state->section = NULL; } } else { p = strchr (buf, '='); if (p) { *p++ = '\0'; if (!state->section && !state->secname) return TRUE; if (!state->section) find_key (state->filename, state->secname, buf, TRUE, NULL, &state->section, &key); else key = key_in_section (state->section, buf); if (key->value) g_free (key->value); key->value = g_strdup (p); } } return TRUE; } #define BEGIN_XQF_INFO "### BEGIN XQF INFO" #define END_XQF_INFO "### END XQF INFO" static gboolean parse_line_script(char* buf, struct state_s* state) { switch(GPOINTER_TO_INT(state->data)) { case 0: if(!strncmp(buf, BEGIN_XQF_INFO, strlen(BEGIN_XQF_INFO))) state->data = GINT_TO_POINTER(1); return TRUE; case 1: if(!strncmp(buf, "# ", 2)) return parse_line_file(buf+2, state); else if(!strncmp(buf, END_XQF_INFO, strlen(END_XQF_INFO))) return FALSE; } return FALSE; } #undef BEGIN_XQF_INFO #undef END_XQF_INFO static void load_file (const char *filename) { FILE *f = NULL; char buf[BUF_SIZE]; char *fn; struct state_s state = {0}; GSList* l; gboolean (*parse_line)(char* buf, struct state_s* state); struct config_file* file = NULL; debug (4, "%s", filename); for(l = directories; l && !f; l = g_slist_next(l)) { fn = file_in_dir (l->data, filename); f = fopen (fn, "r"); if(f) debug(4, "loaded %s", fn); g_free (fn); } /* Create empty file record and thus cache lookups of non-existent files. * Don't mark it 'dirty' -- nothing was changed really. */ find_key (filename, NULL, NULL, TRUE, &file, NULL, NULL); if (!f) return; state.filename = filename; // XXX if(!strncmp(filename, "scripts/", strlen("scripts/"))) { parse_line = parse_line_script; file->read_only = 1; } else parse_line = parse_line_file; while (fgets (buf, BUF_SIZE, f)) parse_line(buf, &state); g_free(state.secname); fclose (f); } static void unlink_file (const char *filename) { char *fn; fn = file_in_dir (directories->data, filename); #ifdef DEBUG fprintf (stderr, "config.c: unlink_file (%s)\n", fn); #endif unlink (fn); g_free (fn); } static char *path_concat (const char *str1, const char *str2) { if (str1[strlen (str1) - 1] != '/') return g_strconcat (str1, "/", str2, NULL); else return g_strconcat (str1, str2, NULL); } static struct config_key *parse_path (const char *path, int create, char **defval, struct config_file **file1, struct config_section **section1) { const char *filename; char *secname = NULL; char *keyname = NULL; char *def; char *buf = NULL; char *ptr = NULL; struct config_file *file; struct config_key *key = NULL; if (defval) { *defval = NULL; def = strchr (path, '='); if (def) *defval = def + 1; } if (*path != '/') { if (prefix_stack) buf = path_concat ((const char *) prefix_stack->data, path); else return NULL; if (*buf != '/') { g_free (buf); return NULL; } } else { buf = g_strdup (path); } def = strchr (buf, '='); if (def) *def = '\0'; filename = ptr = &buf[1]; // XXX if(!strncmp(buf, "/scripts", strlen("/scripts"))) { ptr = strchr (ptr, '/'); if(ptr) ++ptr; } secname = strchr (ptr, '/'); if (secname) { *secname++ = '\0'; keyname = strchr (secname, '/'); if (keyname) *keyname++ = '\0'; } /* Ensure that the file is loaded */ find_key (filename, NULL, NULL, FALSE, &file, NULL, NULL); if (!file) load_file (filename); /* Actually look up the key */ find_key (filename, secname, keyname, create, file1, section1, &key); if (buf) g_free (buf); return key; } static char *string_escape (const char *s) { const char *c; char *p; char *res; int n = 0; if (!s) return NULL; for (c = s; *c; c++) { if (*c == '\n' || *c == '\r' || *c == '\\') { n++; } n++; } p = res = g_malloc (n + 1); do { switch (*s) { case '\n': *p++ = '\\'; *p++ = 'n'; break; case '\r': *p++ = '\\'; *p++ = 'r'; break; case '\\': *p++ = '\\'; *p++ = '\\'; break; default: *p++ = *s; break; } } while (*s++); return res; } static char *string_unescape (const char *s) { const char *c; char *p; char *res; int n = 0; if (!s) return NULL; for (c = s; *c; c++) { if (*c == '\\' && (c[1] == 'n' || c[1] == 'r' || c[1] == '\\')) c++; n++; } p = res = g_malloc (n + 1); do { if (*s != '\\') { *p++ = *s; } else { s++; switch (*s) { case 'n': *p++ = '\n'; break; case 'r': *p++ = '\r'; break; case '\\': *p++ = '\\'; break; default: *p++ = '\\'; *p++ = *s; break; } } } while (*s++); return res; } static char *config_get_raw_with_default (const char *path, int *def) { struct config_file *file; struct config_key *key; char *val; key = parse_path (path, FALSE, &val, &file, NULL); if (key) { if (def) *def = FALSE; val = key->value; } else { if (def) *def = TRUE; } return val; } int config_get_int_with_default (const char *path, int *def) { char *val; val = config_get_raw_with_default (path, def); return (val)? strtol (val, NULL, 10) : 0; } double config_get_float_with_default (const char *path, int *def) { char *val; val = config_get_raw_with_default (path, def); return (val)? strtod (val, NULL) : 0.0; } int config_get_bool_with_default (const char *path, int *def) { char *val; val = config_get_raw_with_default (path, def); /* Gnome returns FALSE as default value */ if (val && !g_strcasecmp (val, "true")) return TRUE; else return FALSE; } char *config_get_string_with_default (const char *path, int *def) { char *val; val = config_get_raw_with_default (path, def); return (val)? string_unescape (val) : NULL; } static void config_set_raw (const char *path, char *raw_value) { struct config_key *key; struct config_file *file; key = parse_path (path, TRUE, NULL, &file, NULL); if (key) { if (key->value) g_free (key->value); key->value = raw_value; if (file) file->dirty = TRUE; } } void config_set_int (const char *path, int i) { config_set_raw (path, g_strdup_printf ("%d", i)); } void config_set_float (const char *path, double f) { config_set_raw (path, g_strdup_printf ("%g", f)); } void config_set_bool (const char *path, gboolean b) { config_set_raw (path, g_strdup ((b)? "true" : "false")); } void config_set_string (const char *path, const char *str) { config_set_raw (path, string_escape (str)); } config_key_iterator* config_init_iterator (const char *path) { struct config_section *section; parse_path (path, FALSE, NULL, NULL, §ion); return (section)? (config_key_iterator*)section->keys : NULL; } config_key_iterator* config_iterator_next (config_key_iterator* iterator, char **key, char **val) { struct config_key *cfg_key; if (!iterator) return NULL; cfg_key = ((GList *) iterator)->data; if (key) *key = g_strdup (cfg_key->name); if (val) *val = g_strdup (cfg_key->value); return (config_key_iterator*)((GList *) iterator)->next; } config_section_iterator* config_init_section_iterator (const char *path) { struct config_file *file; parse_path (path, FALSE, NULL, &file, NULL); return (file)? (config_section_iterator*)file->sections : NULL; } config_section_iterator* config_section_iterator_next (config_section_iterator* iterator, char **section) { struct config_section *cfg_sect; if (!iterator) return NULL; cfg_sect = ((GList *) iterator)->data; if (section) *section = g_strdup (cfg_sect->name); return (config_section_iterator*)((GList *) iterator)->next; } static void dump_file (struct config_file *file) { GList *sptr, *kptr; struct config_section *section; struct config_key *key; FILE *f; char *fn; if(!file->dirty) return; if(file->read_only) return; if (!file->sections) { unlink_file (file->filename); return; } fn = file_in_dir (directories->data, file->filename); f = fopen (fn, "w"); g_free (fn); if (f) { for (sptr = file->sections; sptr; sptr = sptr->next) { section = (struct config_section *) sptr->data; fprintf (f, "[%s]\n", section->name); for (kptr = section->keys; kptr; kptr = kptr->next) { key = (struct config_key *) kptr->data; fprintf (f, "%s=%s\n", key->name, key->value); } fprintf (f, "\n"); } fclose (f); } } void config_sync (void) { GList *list; struct config_file *file; for (list = files; list; list = list->next) { file = (struct config_file *) list->data; dump_file (file); } /* config_drop_all (); */ } static void drop_file (struct config_file *file) { GList *sptr, *kptr; struct config_section *section; struct config_key *key; #ifdef DEBUG fprintf (stderr, "config.c: drop_file (%s)\n", file->filename); #endif for (sptr = file->sections; sptr; sptr = sptr->next) { section = (struct config_section *) sptr->data; for (kptr = section->keys; kptr; kptr = kptr->next) { key = (struct config_key *) kptr->data; g_free (key->name); g_free (key->value); g_free(key); key=NULL; } g_list_free (section->keys); g_free (section->name); g_free(section); section=NULL; } g_list_free (file->sections); g_free (file->filename); files = g_list_remove (files, file); g_free(file); } static void drop_section (struct config_file *file, struct config_section *section) { GList *kptr; struct config_key *key; for (kptr = section->keys; kptr; kptr = kptr->next) { key = (struct config_key *) kptr->data; g_free (key->name); g_free (key->value); g_free (key); } g_list_free (section->keys); g_free (section->name); file->sections = g_list_remove (file->sections, section); g_free(section); file->dirty = TRUE; } static void drop_key (struct config_file *file, struct config_section *section, struct config_key *key) { g_free (key->name); g_free (key->value); section->keys = g_list_remove (section->keys, key); g_free(key); file->dirty = TRUE; if (section->keys == NULL) drop_section (file, section); } void config_drop_all (void) { while (files) { drop_file ((struct config_file *) files->data); } } void config_drop_file (const char *path) { struct config_file *file = NULL; parse_path (path, FALSE, NULL, &file, NULL); if (file) drop_file (file); } void config_clean_key (const char *path) { struct config_file *file; struct config_section *section; struct config_key *key; key = parse_path (path, FALSE, NULL, &file, §ion); if (key) drop_key (file, section, key); } void config_clean_section (const char *path) { struct config_file *file; struct config_section *section = NULL; parse_path (path, FALSE, NULL, &file, §ion); if (section) drop_section (file, section); } void config_clean_file (const char *path) { struct config_file *file = NULL; char *filename; parse_path (path, FALSE, NULL, &file, NULL); if (file) { filename = g_strdup (file->filename); drop_file (file); /* Re-create file record and mark it as 'dirty' */ find_key (filename, NULL, NULL, TRUE, &file, NULL, NULL); file->dirty = TRUE; g_free (filename); } } void config_push_prefix (const char *prefix) { if (prefix && *prefix) prefix_stack = g_list_prepend (prefix_stack, g_strdup (prefix)); } void config_pop_prefix (void) { void *data; if (prefix_stack) { data = prefix_stack->data; prefix_stack = g_list_remove (prefix_stack, data); g_free (data); } } void config_add_dir (const char *dir) { directories = g_slist_prepend(directories,g_strdup (dir)); } xqf-1.0.5/src/config.h0000644002404400000620000000643010262022614011433 00000000000000/* XQF - Quake server browser and launcher * Copyright (C) 1998-2000 Roman Pozlevich * * 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 */ #ifndef __CONFIG_H__ #define __CONFIG_H__ #include extern int config_get_int_with_default (const char *path, int *def); extern double config_get_float_with_default (const char *path, int *def); extern int config_get_bool_with_default (const char *path, int *def); extern char* config_get_string_with_default (const char *path, int *def); #define config_get_int(Path) config_get_int_with_default ((Path), NULL) #define config_get_float(Path) config_get_float_with_default ((Path), NULL) #define config_get_bool(Path) config_get_bool_with_default ((Path), NULL) #define config_get_string(Path) config_get_string_with_default ((Path), NULL) extern void config_set_int (const char *path, int i); extern void config_set_float (const char *path, double f); extern void config_set_bool (const char *path, int b); extern void config_set_string (const char *path, const char *s); typedef struct config_key_iterator config_key_iterator; /** \brief iterate through keys of a sections * * @param path path to a section * @returns an iterator */ extern config_key_iterator* config_init_iterator (const char *path); /** \brief get current key and value in sequence * * @param iterator the iterator * @param key where to place key or NULL. Must be freed manually * @param val where to place the value or NULL. Must be freed manually * @return iterator of next element or NULL if done */ extern config_key_iterator* config_iterator_next (config_key_iterator *iterator, char **key, char **val); typedef struct config_section_iterator config_section_iterator; /** \brief iterate through sections of a file * * @param path path to a file * @returns an iterator */ extern config_section_iterator* config_init_section_iterator (const char *path); /** \brief get section in sequence * * @param iterator the iterator * @param section where to place the section name or NULL. Must be freed manually * @return iterator of next element or NULL if done */ extern config_section_iterator* config_section_iterator_next (config_section_iterator *iterator, char **section); extern void config_clean_key (const char *path); extern void config_clean_section (const char *path); extern void config_clean_file (const char *path); extern void config_sync (void); extern void config_drop_all (void); extern void config_drop_file (const char *path); extern void config_push_prefix (const char *prefix); extern void config_pop_prefix (void); extern void config_add_dir (const char *dir); #endif /* __CONFIG_H__ */ xqf-1.0.5/src/zipped.c0000644002404400000620000000574107637614070011477 00000000000000/* XQF - Quake server browser and launcher * Copyright (C) 1998-2000 Roman Pozlevich * * 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 */ #include #include /* FILE, popen, pclose, ... */ #include /* unlink, stat */ #include /* stat */ #include #include "zipped.h" struct compr { char *suffix; char *compress; char *expand; }; #ifdef COMPRESSOR_BZIP2 # define COMPRESSOR_DEFAULT 1 #else # ifdef COMPRESSOR_GZIP # define COMPRESSOR_DEFAULT 2 # else # define COMPRESSOR_DEFAULT 0 /* None */ # endif #endif static struct compr compressor[] = { { "", NULL, NULL }, { ".bz2", "bzip2 -1", "bzip2 -d -c" }, { ".gz", "gzip -1", "gzip -d -c" }, { NULL, NULL, NULL } }; void zstream_open_r (struct zstream *z, const char *name) { struct stat stbuf; char *fn; char *cmd; int i; if (!z) return; for (i = 0; compressor[i].suffix; i++) { fn = g_strconcat (name, compressor[i].suffix, NULL); if (stat (fn, &stbuf) == 0) { if (compressor[i].expand) { cmd = g_strconcat (compressor[i].expand, " ", fn, NULL); #ifdef DEBUG fprintf (stderr, "popen(\"%s\", \"r\")\n", cmd); #endif z->f = popen (cmd, "r"); z->is_pipe = TRUE; g_free (cmd); } else { z->f = fopen (name, "r"); z->is_pipe = FALSE; } g_free (fn); return; } g_free (fn); } z->f = NULL; } void zstream_open_w (struct zstream *z, const char *name) { char *cmd; if (!z) return; zstream_unlink (name); z->f = NULL; if (compressor[COMPRESSOR_DEFAULT].compress) { cmd = g_strconcat (compressor[COMPRESSOR_DEFAULT].compress, " >", name, compressor[COMPRESSOR_DEFAULT].suffix, NULL); #ifdef DEBUG fprintf (stderr, "popen(\"%s\", \"w\")\n", cmd); #endif z->f = popen (cmd, "w"); z->is_pipe = TRUE; g_free (cmd); } else { z->f = fopen (name, "w"); z->is_pipe = FALSE; } } void zstream_close (struct zstream *z) { if (z && z->f) { if (z->is_pipe) pclose (z->f); else fclose (z->f); z->f = NULL; } } void zstream_unlink (const char *name) { char *fn; int i; for (i = 0; compressor[i].suffix; i++) { fn = g_strconcat (name, compressor[i].suffix, NULL); unlink (fn); g_free (fn); } } xqf-1.0.5/src/zipped.h0000644002404400000620000000231307201342721011460 00000000000000/* XQF - Quake server browser and launcher * Copyright (C) 1998-2000 Roman Pozlevich * * 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 */ #ifndef __ZIPPED_H__ #define __ZIPPED_H__ #include #include /* FILE */ struct zstream { FILE *f; int is_pipe; }; extern void zstream_open_r (struct zstream *z, const char *name); extern void zstream_open_w (struct zstream *z, const char *name); extern void zstream_close (struct zstream *z); extern void zstream_unlink (const char *name); #endif /* __ZIPPED_H__ */ xqf-1.0.5/src/game.c0000644002404400000620000024734410445250746011121 00000000000000/* XQF - Quake server browser and launcher * Copyright (C) 1998-2000 Roman Pozlevich * * 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 */ #include "gnuconfig.h" #include #include /* FILE, fprintf, fopen, fclose */ #include /* strlen, strcpy, strcmp, strtok */ #include /* strtol */ #include /* stat */ #include /* stat, chmod */ #include /* inet_ntoa */ #include /* inet_ntoa */ #include /* inet_ntoa */ #include #include #include #include #include "i18n.h" #include "xqf.h" #include "pref.h" #include "launch.h" #include "dialogs.h" #include "utils.h" #include "pixmaps.h" #include "game.h" #include "stat.h" #include "server.h" #include "statistics.h" #include "server.h" #include "config.h" #include "debug.h" #include "q3maps.h" #include "utmaps.h" /* in pref.c */ extern void q1_cmd_or_dir_changed(struct game* g); extern void qw_cmd_or_dir_changed(struct game* g); extern void q2_cmd_or_dir_changed(struct game* g); extern void ut2004_cmd_or_dir_changed(struct game* g); extern void doom3_cmd_or_dir_changed(struct game* g); extern void tremulous_cmd_or_dir_changed(struct game* g); static struct player *poqs_parse_player(char *tokens[], int num, struct server *s); static struct player *qw_parse_player(char *tokens[], int num, struct server *s); static struct player *q2_parse_player(char *tokens[], int num, struct server *s); static struct player *q3_parse_player(char *tokens[], int num, struct server *s); static struct player *t2_parse_player(char *tokens[], int num, struct server *s); static struct player *hl_parse_player(char *tokens[], int num, struct server *s); static struct player *un_parse_player(char *tokens[], int num, struct server *s); static struct player *descent3_parse_player(char *tokens[], int num, struct server *s); static struct player *savage_parse_player (char *token[], int n, struct server *s); static void quake_parse_server (char *tokens[], int num, struct server *s); static void qw_analyze_serverinfo (struct server *s); static void q2_analyze_serverinfo (struct server *s); static void hl_analyze_serverinfo (struct server *s); static void t2_analyze_serverinfo (struct server *s); static void q3_analyze_serverinfo (struct server *s); static void doom3_analyze_serverinfo (struct server *s); static void un_analyze_serverinfo (struct server *s); static void bf1942_analyze_serverinfo (struct server *s); static void descent3_analyze_serverinfo (struct server *s); static void savage_analyze_serverinfo (struct server *s); static int quake_config_is_valid (struct server *s); static int quake3_config_is_valid (struct server *s); static int config_is_valid_generic (struct server *s); static int write_q1_vars (const struct condef *con); static int write_qw_vars (const struct condef *con); static int write_q2_vars (const struct condef *con); static int q1_exec_generic (const struct condef *con, int forkit); static int qw_exec (const struct condef *con, int forkit); static int q2_exec (const struct condef *con, int forkit); static int q2_exec_generic (const struct condef *con, int forkit); static int q3_exec (const struct condef *con, int forkit); // needs quake_private static int hl_exec(const struct condef *con, int forkit); static int ut_exec (const struct condef *con, int forkit); static int t2_exec (const struct condef *con, int forkit); static int gamespy_exec (const struct condef *con, int forkit); static int bf1942_exec (const struct condef *con, int forkit); static int exec_generic (const struct condef *con, int forkit); static int ssam_exec (const struct condef *con, int forkit); static int savage_exec (const struct condef *con, int forkit); static int netpanzer_exec (const struct condef *con, int forkit); static int descent3_exec (const struct condef *con, int forkit); /* static GList *q1_custom_cfgs (struct game* this, char *dir, char *game); static GList *qw_custom_cfgs (struct game* this, char *dir, char *game); static GList *q2_custom_cfgs (struct game* this, char *dir, char *game); static GList *q3_custom_cfgs (struct game* this, char *dir, char *game); */ static GList *quake_custom_cfgs (struct game* this, const char *path, const char *mod); static void quake_save_info (FILE *f, struct server *s); char **get_custom_arguments(enum server_type type, const char *gamestring); static void quake_init_maps(enum server_type); static gboolean quake_has_map(struct server* s); static void q3_init_maps(enum server_type); static size_t q3_get_mapshot(struct server* s, guchar** buf); static void doom3_init_maps(enum server_type); static size_t doom3_get_mapshot(struct server* s, guchar** buf); static gboolean doom3_has_map(struct server* s); static void quake4_init_maps(enum server_type); static size_t quake4_get_mapshot(struct server* s, guchar** buf); static gboolean quake4_has_map(struct server* s); static void unreal_init_maps(enum server_type); static gboolean unreal_has_map(struct server* s); struct quake_private { GHashTable* maphash; }; struct unreal_private { GHashTable* maphash; const char* suffix; }; static struct unreal_private ut_private = { NULL, ".unr" }; static struct unreal_private ut2_private = { NULL, ".ut2" }; static struct unreal_private ut2004_private = { NULL, ".ut2" }; static struct unreal_private rune_private = { NULL, ".run" }; static struct unreal_private postal2_private = { NULL, ".fuk" }; static struct unreal_private aao_private = { NULL, ".aao" }; static struct quake_private q1_private, qw_private, q2_private, hl_private; static struct quake_private q3_private; static struct quake_private wolf_private; static struct quake_private wolfet_private; static struct quake_private mohaa_private; static struct quake_private cod_private; static struct quake_private jk3_private; static struct quake_private doom3_private; static struct quake_private quake4_private; static struct quake_private warsow_private; static struct quake_private tremulous_private; #include "games.c" struct gsname2type_s { char* name; enum server_type type; }; // gamespy names, used to determine the server type static struct gsname2type_s gsname2type[] = { { "ut", UN_SERVER }, { "ut2", UT2_SERVER }, { "ut2d", UT2_SERVER }, { "rune", RUNE_SERVER }, { "serioussam", SSAM_SERVER }, { "serioussamse", SSAMSE_SERVER }, { "postal2", POSTAL2_SERVER }, { "postal2d", POSTAL2_SERVER }, { "armygame", AAO_SERVER }, { "bfield1942", BF1942_SERVER }, { NULL, UNKNOWN_SERVER } }; void init_games() { unsigned i, j; debug(3,"initializing games"); for (i = 0; i < GAMES_TOTAL; i++) { g_datalist_init(&games[i].games_data); } for (i = 0; i < GAMES_TOTAL; i++) { for (j = 0; games[i].attributes && games[i].attributes[j]; j += 2) { game_set_attribute_const(i,games[i].attributes[j], games[i].attributes[j+1]); } } game_set_attribute(SFS_SERVER,"game_notes",strdup(_ ("Note: Soldier of Fortune will not connect to a server correctly\n"\ "without creating a startup script for the game. Please see the\n"\ "XQF documentation for more information."))); game_set_attribute(UN_SERVER,"game_notes",strdup(_ ("Note: Unreal Tournament will not launch correctly without\n"\ "modifications to the game's startup script. Please see the\n"\ "XQF documentation for more information."))); game_set_attribute(HL_SERVER_OLD,"game_notes",strdup(_ ("Sample Command Line: wine hl.exe -- hl.exe -console"))); game_set_attribute(SAS_SERVER,"game_notes",strdup(_ ("Note: Savage will not launch correctly without\n"\ "modifications to the game's startup script. Please see the\n"\ "XQF documentation for more information."))); } void games_done() { int i; for (i = 0; i < GAMES_TOTAL; i++) { g_free(games[i].real_home); } } // retreive game specific value that belongs to key, do not free return value! const char* game_get_attribute(enum server_type type, const char* attr) { return g_datalist_get_data(&games[type].games_data,attr); } // set game specific key/value pair, value is _not_ copied and must not be // freed manually const char* game_set_attribute(enum server_type type, const char* attr, char* value) { g_datalist_set_data_full(&games[type].games_data,attr,value,g_free); return value; } // set game specific key/value pair, value is _not_ copied and must not be // freed manually const char* game_set_attribute_const(enum server_type type, const char* attr, const char* value) { g_datalist_set_data_full(&games[type].games_data,attr,(void*)value,NULL); return value; } enum server_type id2type (const char *id) { int i; g_return_val_if_fail(id != NULL, UNKNOWN_SERVER); for (i = 0; i < GAMES_TOTAL; i++) { g_return_val_if_fail(games[i].id != NULL, UNKNOWN_SERVER); if (g_strcasecmp (id, games[i].id) == 0) return games[i].type; } for (i = 0; i < GAMES_TOTAL; i++) { if (g_strcasecmp (id, games[i].qstat_str) == 0) return games[i].type; } // workaround for qstat beta if (g_strcasecmp (id, "RWS" ) == 0) { return WO_SERVER; } if (g_strcasecmp (id, "QW") == 0) return QW_SERVER; if (g_strcasecmp (id, "Q2") == 0) return Q2_SERVER; return UNKNOWN_SERVER; } /* * This function should be used only for configuration saving to make * possible qstat2.2<->qstat2.3 migration w/o loss of some game-specific * preferences. */ const char *type2id (enum server_type type) { switch (type) { default: return games[type].id; } } GtkWidget *game_pixmap_with_label (enum server_type type) { GtkWidget *hbox; GtkWidget *label; GtkWidget *pixmap; hbox = gtk_hbox_new (FALSE, 4); if (games[type].pix) { pixmap = gtk_pixmap_new (games[type].pix->pix, games[type].pix->mask); gtk_box_pack_start (GTK_BOX (hbox), pixmap, FALSE, FALSE, 0); gtk_widget_show (pixmap); } label = gtk_label_new (_(games[type].name)); gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); gtk_widget_show (label); gtk_widget_show (hbox); return hbox; } static void q3_unescape (char *dst, const char *src) { while (*src) { if (src[0] != '^' || src[1] == '\0' || src[1] < '0' || src[1] > '9') *dst++ = *src++; else src += 2; } *dst = '\0'; } static const char delim[] = " \t\n\r"; static struct player *poqs_parse_player (char *token[], int n, struct server *s) { struct player *player = NULL; long tmp; if (n < 7) return NULL; player = g_malloc0 (sizeof (struct player) + strlen (token[1]) + 1); player->time = strtol (token[4], NULL, 10); player->frags = strtosh (token[3]); player->ping = -1; tmp = strtol (token[5], NULL, 10); player->shirt = fix_qw_player_color (tmp); tmp = strtol (token[6], NULL, 10); player->pants = fix_qw_player_color (tmp); player->name = (char *) player + sizeof (struct player); strcpy (player->name, token[1]); return player; } static struct player *qw_parse_player (char *token[], int n, struct server *s) { struct player *player = NULL; char *ptr; long tmp; int name_strlen; int skin_strlen; if (n < 8) return NULL; name_strlen = strlen (token[1]) + 1; skin_strlen = strlen (token[7]) + 1; player = g_malloc0 (sizeof (struct player) + name_strlen + skin_strlen); player->time = strtol (token[3], NULL, 10); player->frags = strtosh (token[2]); player->ping = strtosh (token[6]); tmp = strtol (token[4], NULL, 10); player->shirt = fix_qw_player_color (tmp); tmp = strtol (token[5], NULL, 10); player->pants = fix_qw_player_color (tmp); ptr = (char *) player + sizeof (struct player); player->name = strcpy (ptr, token[1]); player->skin = strcpy (ptr + name_strlen, token[7]); return player; } // Parse Tribes2 player info, abuse player->model to show when a Player is only // a Teamname or a Bot // player name, frags, team number, team name, player type, tribe tag static struct player *t2_parse_player (char *token[], int n, struct server *s) { struct player *player = NULL; char* name=token[0]; char* frags=token[1]; // char* team_number=token[2]; char* team_name=token[3]; char* player_type=token[4]; // char* tribe_tag=token[5]; if (n < 6) return NULL; // show TEAM in model column if (!strcmp(team_name,"TEAM")) player_type=team_name; player = g_malloc0 (sizeof (struct player) + strlen(name)+1 + strlen(player_type)+1 ); player->time = -1; player->frags = strtosh (frags); player->ping = -1; player->name = (char *) player + sizeof (struct player); strcpy (player->name, name); player->model = (char *) player + sizeof (struct player) + strlen(name)+1; strcpy (player->model, player_type); if( player_type[0] == 'B' ) ++s->curbots; return player; } static struct player *q2_parse_player (char *token[], int n, struct server *s) { struct player *player = NULL; if (n < 3) return NULL; player = g_malloc0 (sizeof (struct player) + strlen (token[0]) + 1); player->time = -1; player->frags = strtosh (token[1]); player->ping = strtosh (token[2]); player->name = (char *) player + sizeof (struct player); strcpy (player->name, token[0]); return player; } // Descent 3: player name, frags, deaths, ping time, team static struct player *descent3_parse_player (char *token[], int n, struct server *s) { struct player *player = NULL; if (n < 5) return NULL; player = g_malloc0 (sizeof (struct player) + strlen (token[0]) + 1); player->time = -1; player->frags = strtosh (token[1]); player->ping = strtosh (token[3]); player->name = (char *) player + sizeof (struct player); strcpy (player->name, token[0]); if(token[0][0] == '-' && token[0][strlen(token[0])-1] == '-') ++s->curbots; return player; } static struct player *q3_parse_player (char *token[], int n, struct server *s) { struct player *player = NULL; const char* clan = NULL; unsigned clanlen = 0; if (n < 3) return NULL; if(n > 3 && strcmp(token[3], "0")) { clan = token[3]; clanlen = strlen(clan)+1; } if(s->type == WARSOW_SERVER && clan) { static const char* colors[] = { "spectator", "", "red", "blue", "green", "yellow" }; unsigned i = atoi(clan); if(i > 5) i = 1; clan = colors[i]; clanlen = 0; } player = g_malloc0 (sizeof (struct player) + strlen (token[0]) + 1 + clanlen); player->time = -1; player->frags = strtosh (token[1]); player->ping = strtosh (token[2]); /* FIXME if ( dedicated == 0 ) s->curbots-- */ if ( player->ping == 0 ) ++s->curbots; player->name = (char *) player + sizeof (struct player); q3_unescape (player->name, token[0]); // show clan name in model column if(clan) { if(s->type == WARSOW_SERVER) { player->model = (char*)clan; } else { player->model = (char *) player + sizeof (struct player) + strlen(player->name) + 1; q3_unescape(player->model, clan); } } return player; } static struct player *hl_parse_player (char *token[], int n, struct server *s) { struct player *player = NULL; if (n < 3) return NULL; player = g_malloc0 (sizeof (struct player) + strlen (token[0]) + 1); player->frags = strtosh (token[1]); player->time = strtosh (token[2]); player->ping = -1; player->name = (char *) player + sizeof (struct player); strcpy (player->name, token[0]); return player; } static struct player *un_parse_player (char *token[], int n, struct server *s) { struct player *player = NULL; char *ptr; int name_strlen; int skin_strlen; int mesh_strlen; long tmp; /* player name, frags, ping time, team number, skin, mesh, face */ if (n < 6) return NULL; name_strlen = strlen (token[0]) + 1; skin_strlen = strlen (token[4]) + 1; mesh_strlen = strlen (token[5]) + 1; player = g_malloc0 (sizeof (struct player) + name_strlen + skin_strlen + mesh_strlen); ptr = (char *) player + sizeof (struct player); player->name = strcpy (ptr, token[0]); ptr += name_strlen; player->frags = strtosh (token[1]); player->ping = strtosh (token[2]); player->time = -1; /* store team number to 'pants' */ tmp = strtol (token[3], NULL, 10); player->pants = (tmp >= 0 && tmp <= 255)? tmp : 0; player->skin = strcpy (ptr, token[4]); ptr += skin_strlen; player->model = strcpy (ptr, token[5]); return player; } static struct player *savage_parse_player (char *token[], int n, struct server *s) { return q2_parse_player(token, n, s); } static void quake_parse_server (char *token[], int n, struct server *server) { /* This does both Quake (?) and Unreal servers */ int poqs; int offs; /* debug (6, "quake_parse_server: Parse %s", server->name); */ poqs = (server->type == Q1_SERVER || server->type == H2_SERVER); if (poqs && n < 10) return; else if(n < 8) return; if (*(token[2])) { /* if name is not empty */ if ((games[server->type].flags & GAME_Q3COLORS) == 0) { server->name = g_strdup (token[2]); } else { server->name = g_malloc (strlen (token[2]) + 1); q3_unescape (server->name, token[2]); } } offs = (poqs)? 5 : 3; if (*(token[offs])) /* if map is not empty */ server->map = g_strdup (token[offs]); if(server->map) g_strdown(server->map); server->maxplayers = strtoush (token[offs + 1]); server->curplayers = strtoush (token[offs + 2]); server->ping = strtosh (token[offs + 3]); server->retries = strtosh (token[offs + 4]); } static void qw_analyze_serverinfo (struct server *server) { char **info_ptr; long n; /* Clear out the flags */ server->flags = 0; /* debug( 6, "qw_analyze_serverinfo: Analyze %s", server->name ); */ if ((games[server->type].flags & GAME_SPECTATE) != 0) server->flags |= SERVER_SPECTATE; for (info_ptr = server->info; info_ptr && *info_ptr; info_ptr += 2) { if (strcmp (*info_ptr, "*gamedir") == 0) { server->game = info_ptr[1]; } else if (strcmp (*info_ptr, "*cheats") == 0) { server->flags |= SERVER_CHEATS; } else if (strcmp (*info_ptr, "maxspectators") == 0) { n = strtol (info_ptr[1], NULL, 10); if (n <= 0) server->flags &= ~SERVER_SPECTATE; } else if (strcmp (*info_ptr, "needpass") == 0) { n = strtol (info_ptr[1], NULL, 10); if ((n & 1) != 0) server->flags |= SERVER_PASSWORD; if ((n & 2) != 0) server->flags |= SERVER_SP_PASSWORD; } } } static void un_analyze_serverinfo (struct server *s) { char **info_ptr; unsigned short hostport=0; enum server_type oldtype = s->type; /* Clear out the flags */ s->flags = 0; if ((games[s->type].flags & GAME_SPECTATE) != 0) s->flags |= SERVER_SPECTATE; for (info_ptr = s->info; info_ptr && *info_ptr; info_ptr += 2) { if (strcmp (*info_ptr, "gametype") == 0) { s->game = info_ptr[1]; } else if (strcmp (*info_ptr, "gamestyle") == 0) { s->gametype = info_ptr[1]; } else if (strcmp (*info_ptr, "hostport") == 0) { hostport = atoi(info_ptr[1]); } else if (strcmp (*info_ptr, "Mutator") == 0 && strstr(info_ptr[1], "AntiTCC")) { s->flags |= SERVER_PUNKBUSTER; } else if ((s->type == UT2004_SERVER || s->type == UT2_SERVER) && strcmp (*info_ptr, "ServerVersion") == 0 && strlen(info_ptr[1]) == 4) { if(info_ptr[1][0] == '3') s->type = UT2004_SERVER; else if(info_ptr[1][0] == '2') s->type = UT2_SERVER; } else if (strcmp (*info_ptr, "gamename") == 0) { unsigned i; for( i = 0 ; gsname2type[i].name ; ++i ) { if(!strcmp(info_ptr[1],gsname2type[i].name)) { s->type = gsname2type[i].type; break; } } } //password required? // If not password=False or password=0, set SERVER_PASSWORD else if ((g_strcasecmp (*info_ptr, "password") == 0 || g_strcasecmp (*info_ptr, "gamepassword") == 0 ) && ( g_strcasecmp(info_ptr[1],"false") && strcmp(info_ptr[1],"0") ) ) { s->flags |= SERVER_PASSWORD; if (games[s->type].flags & GAME_SPECTATE) s->flags |= SERVER_SP_PASSWORD; } } // adjust port for unreal and rune if(s->type != oldtype) { switch(s->type) { case UN_SERVER: case UT2_SERVER: case RUNE_SERVER: case POSTAL2_SERVER: // case AAO_SERVER: // doesn't work on lan server_change_port(s,hostport); break; default: break; } } } static void bf1942_analyze_serverinfo (struct server *s) { char **info_ptr; /* Clear out the flags */ s->flags = 0; for (info_ptr = s->info; info_ptr && *info_ptr; info_ptr += 2) { if (strcmp (*info_ptr, "gametype") == 0) { s->gametype = info_ptr[1]; } else if (strcmp (*info_ptr, "Game Id") == 0) { s->game = info_ptr[1]; } //password required? // If not password=False or password=0, set SERVER_PASSWORD else if (strcmp (*info_ptr, "_password") == 0 && strcmp(info_ptr[1], "0")) { s->flags |= SERVER_PASSWORD; if (games[s->type].flags & GAME_SPECTATE) s->flags |= SERVER_SP_PASSWORD; } } } static void savage_analyze_serverinfo (struct server *s) { char **info_ptr; /* Clear out the flags */ s->flags = 0; for (info_ptr = s->info; info_ptr && *info_ptr; info_ptr += 2) { if (strcmp (*info_ptr, "gametype") == 0) { s->game = info_ptr[1]; } } } static void descent3_analyze_serverinfo (struct server *s) { char **info_ptr; /* Clear out the flags */ s->flags = 0; for (info_ptr = s->info; info_ptr && *info_ptr; info_ptr += 2) { if (strcmp (*info_ptr, "gametype") == 0) { s->game = info_ptr[1]; } /* //password required? else if (strcmp (*info_ptr, "password") == 0 && strcmp(info_ptr[1],"False")) { s->flags |= SERVER_PASSWORD; } */ } } static void q2_analyze_serverinfo (struct server *s) { char **info_ptr; long n; /* Clear out the flags */ s->flags = 0; if ((games[s->type].flags & GAME_SPECTATE) != 0) s->flags |= SERVER_SPECTATE; for (info_ptr = s->info; info_ptr && *info_ptr; info_ptr += 2) { if (strcmp (*info_ptr, "gamedir") == 0) { s->game = info_ptr[1]; } //determine mod else if (strcmp (*info_ptr, "gamename") == 0) { switch (s->type) { case Q2_SERVER: /* We only set the mod if name is not baseq2 */ if (strcmp(info_ptr[1],"baseq2")) s->gametype = info_ptr[1]; break; default: s->gametype = info_ptr[1]; break; } } else if (strcmp (*info_ptr, "cheats") == 0 && info_ptr[1][0] != '0') { s->flags |= SERVER_CHEATS; } else if (s->type == Q2_SERVER && strcmp (*info_ptr, "protocol") == 0) { n = strtol (info_ptr[1], NULL, 10); if (n < 34) s->flags &= ~SERVER_SPECTATE; } else if (strcmp (*info_ptr, "maxspectators") == 0) { n = strtol (info_ptr[1], NULL, 10); if (n <= 0) s->flags &= ~SERVER_SPECTATE; } else if (strcmp (*info_ptr, "needpass") == 0) { n = strtol (info_ptr[1], NULL, 10); if ((n & 1) != 0) s->flags |= SERVER_PASSWORD; if ((n & 2) != 0) s->flags |= SERVER_SP_PASSWORD; } } /* We only set the mod if gamedir is set */ if (!s->game) { s->gametype=NULL; } } static void t2_analyze_serverinfo (struct server *s) { char **info_ptr; long n; /* Clear out the flags */ s->flags = 0; if ((games[s->type].flags & GAME_SPECTATE) != 0) s->flags |= SERVER_SPECTATE; for (info_ptr = s->info; info_ptr && *info_ptr; info_ptr += 2) { if (strcmp (*info_ptr, "game") == 0) { if (strcmp(info_ptr[1],"base")) // If it's not 'base' s->game = info_ptr[1]; } //determine GameType column else if (strcmp (*info_ptr, "mission") == 0) { s->gametype = info_ptr[1]; } else if (strcmp (*info_ptr, "cheats") == 0 && info_ptr[1][0] != '0') { s->flags |= SERVER_CHEATS; } else if (strcmp (*info_ptr, "maxspectators") == 0) { n = strtol (info_ptr[1], NULL, 10); if (n <= 0) s->flags &= ~SERVER_SPECTATE; } else if (strcmp (*info_ptr, "password") == 0) { n = strtol (info_ptr[1], NULL, 10); if ((n & 1) != 0) s->flags |= SERVER_PASSWORD; if ((n & 2) != 0) s->flags |= SERVER_SP_PASSWORD; } } // unset game if game is base // if (!strcmp(s->game,"base")) // { // strcpy(s->gametype,"Alex"); // } } static void hl_analyze_serverinfo (struct server *s) { char **info_ptr; /* Clear out the flags */ s->flags = 0; if ((games[s->type].flags & GAME_SPECTATE) != 0) s->flags |= SERVER_SPECTATE; for (info_ptr = s->info; info_ptr && *info_ptr; info_ptr += 2) { if (strcmp (*info_ptr, "gamedir") == 0) { s->game = info_ptr[1]; } //determine mod else if (strcmp (*info_ptr, "gamename") == 0) { s->gametype = info_ptr[1]; } //cheats enabled? else if (strcmp (*info_ptr, "sv_cheats") == 0 && info_ptr[1][0] != '0') { s->flags |= SERVER_CHEATS; } //password required? else if (strcmp (*info_ptr, "sv_password") == 0 && info_ptr[1][0] != '0') { s->flags |= SERVER_PASSWORD; } //cheating death else if (strcmp (*info_ptr, "cdrequired") == 0 && info_ptr[1][0] != '0') { s->flags |= SERVER_PUNKBUSTER; } //VAC else if (strcmp (*info_ptr, "secure") == 0 && info_ptr[1][0] != '0') { s->flags |= SERVER_PUNKBUSTER; } // reserved slots else if (strcmp (*info_ptr, "reserve_slots") == 0) { s->private_client = strtol (info_ptr[1], NULL, 10); } } // unset Mod if gamedir is valve if (s->game && !strcmp(s->game,"valve")) { s->gametype=NULL; } } // TODO: read this stuff from a config file #define MAX_Q3A_TYPES 9 static char *q3a_gametypes[MAX_Q3A_TYPES] = { "FFA", /* 0 = Free for All */ "1v1", /* 1 = Tournament */ NULL, /* 2 = Single Player */ "TDM", /* 3 = Team Deathmatch */ "CTF", /* 4 = Capture the Flag */ "1FCTF", /* 5 = One Flag Capture the Flag */ "OVR", /* 6 = Overload */ "HRV", /* 7 = Harvester */ " mod ", /* 8+ is usually a client-side mod */ }; #define MAX_Q3A_OSP_TYPES 7 static char *q3a_osp_gametypes[MAX_Q3A_OSP_TYPES] = { "FFA", /* 0 = Free for All */ "1v1", /* 1 = Tournament */ "FFA Comp", /* 2 = FFA, Competition */ "TDM", /* 3 = Team Deathmatch */ "CTF", /* 4 = Capture the Flag */ "Clan Arena", /* 5 = Clan Arena */ "Custom OSP", /* 6+ is usually a custom OSP setting */ }; #define MAX_Q3A_UT2_TYPES 9 static char *q3a_ut2_gametypes[MAX_Q3A_UT2_TYPES] = { "FFA", /* 0 = Free for All */ "FFA", /* 1 = Free for All */ "FFA", /* 2 = Free for All */ "TDM", /* 3 = Team Deathmatch */ "Team Survivor", /* 4 = Team Survivor */ "Follow the Leader", /* 5 = Follow the Leader */ "Capture & Hold", /* 6 = Capture & Hold */ "CTF", /* 7 = Capture the Flag */ NULL, /* 8+ ?? */ }; #define MAX_Q3A_UT3_TYPES 9 static char *q3a_ut3_gametypes[MAX_Q3A_UT3_TYPES] = { "FFA", /* 0 = Free for All */ "FFA", /* 1 = Free for All */ "FFA", /* 2 = Free for All */ "TDM", /* 3 = Team Deathmatch */ "Team Survivor", /* 4 = Team Survivor */ "Follow the Leader", /* 5 = Follow the Leader */ "Capture & Hold", /* 6 = Capture & Hold */ "CTF", /* 7 = Capture the Flag */ "Bomb Mode", /* 8 = Bomb Mode */ }; #define MAX_Q3A_Q3TC045_TYPES 11 static char *q3a_q3tc045_gametypes[MAX_Q3A_Q3TC045_TYPES] = { "FFA", // 0 = Free for All NULL, // 1 = ? NULL, // 2 = ? "Survivor", // 3 = Survivor "TDM", // 4 = Team Deathmatch "CTF", // 5 = Capture the Flag "Team Survivor", // 6 = Team Survivor NULL, // 7 = ? "Capture & Hold", // 8 = Capture & Hold "King Of The Hill", // 9 = King of the hill NULL, // 10+ ?? }; #define MAX_Q3A_TRUECOMBAT_TYPES 8 static char *q3a_truecombat_gametypes[MAX_Q3A_TRUECOMBAT_TYPES] = { "FFA", // 0 = Free for All "Survivor", // 1 = Survivor/Last Man Standing NULL, // 2 = ? "TDM", // 3 = Team Deathmatch "Reverse CTF", // 4 = Reverse CTF "CTF", // 5 = Capture the Flag "Team Survivor", // 6 = Team Survivor "Mission", // 7 = Mission }; #define MAX_Q3A_THREEWAVE_TYPES 12 static char *q3a_threewave_gametypes[MAX_Q3A_THREEWAVE_TYPES] = { "FFA", // 0 - Free For All "1v1", // 1 - Tournament NULL, // 2 - Single Player (invalid, don't use this) "TDM", // 3 - Team Deathmatch "ThreeWave CTF", // 4 - ThreeWave CTF "One flag CTF", // 5 - One flag CTF (invalid, don't use this) "Obelisk", // 6 - Obelisk (invalid, don't use this) "Harvester", // 7 - Harvester (invalid, don't use this) "Portal", // 8 - Portal (invalid, don't use this) "CaptureStrike", // 9 - CaptureStrike "Classic CTF", // 10 - Classic CTF NULL // 11+ ??? }; #define MAX_Q3A_TRIBALCTF_TYPES 10 static char *q3a_tribalctf_gametypes[MAX_Q3A_TRIBALCTF_TYPES] = { NULL, // 0 - Unknown NULL, // 1 - Unknown NULL, // 2 - Unknown NULL, // 3 - Unknown NULL, // 4 - Unknown NULL, // 5 - Unknown "Freestyle", // 6 - Freestyle "Fixed", // 7 - Fixed "Roulette", // 8 - Roulette NULL // 9+ ??? }; #define MAX_Q3A_SEALS_TYPES 5 static char *q3a_seals_gametypes[MAX_Q3A_SEALS_TYPES] = { NULL, /* 0 = devmode */ NULL, /* 1 = invalid */ NULL, /* 2 = invalid */ "Operations", /* 3 = Team Deathmatch */ NULL /* 4+ invalid */ }; #define MAX_Q3A_AFTERWARDS_TYPES 3 static char *q3a_afterwards_gametypes[MAX_Q3A_AFTERWARDS_TYPES] = { "Tactical", // 0 = Tactical "FFA", // 1 = Deatchmatch NULL, // 2+ ?? }; #define MAX_Q3A_ARENA_TYPES 9 // Not sure what the proper types are, but 99% of them are a game // type of 8. Just call them all "arena" static char *q3a_arena_gametypes[MAX_Q3A_ARENA_TYPES] = { "arena", /* 0 = Arena */ "arena", /* 1 = Arena */ "arena", /* 2 = Arena */ "arena", /* 3 = Arena */ "arena", /* 4 = Arena */ "arena", /* 5 = Arena */ "arena", /* 6 = Arena */ "arena", /* 7 = Arena */ "arena", /* 8 = Arena */ }; #define MAX_Q3A_CPMA_TYPES 6 static char *q3a_cpma_gametypes[MAX_Q3A_CPMA_TYPES] = { "FFA", /* 0 = Free for All */ "1v1", /* 1 = Tournament */ NULL, /* 2 = Single Player */ "TDM", /* 3 = Team Deathmatch */ "CTF", /* 4 = Capture the Flag */ "Clan Arena", /* 5 = Clan Arena */ }; #define MAX_Q3A_Q3F_TYPES 6 static char *q3a_q3f_gametypes[MAX_Q3A_Q3F_TYPES] = { "q3f", /* 0 = Arena */ "q3f", /* 1 = Arena */ "q3f", /* 2 = Arena */ "q3f", /* 3 = Arena */ "q3f", /* 4 = Arena */ "q3f", /* 5 = Arena */ }; #define MAX_Q3A_WQ3_TYPES 6 static char *q3a_wq3_gametypes[MAX_Q3A_WQ3_TYPES] = { "FFA", "Duel", NULL, "TDM", "Round Teamplay", "Bank Robbery" }; #define MAX_Q3A_WOP_TYPES 9 static char *q3a_wop_gametypes[MAX_Q3A_WOP_TYPES] = { NULL, NULL, NULL, "Spray your Color FFA (SyC)", // 3 "LastPadStanding (LPS)", // 4 NULL, NULL, "Spray your Color Teamgame (SyC)", // 7 "BigBalloon (BB)" // 8 }; #define MAX_Q3A_EXCESSIVEPLUS_TYPES 10 static char *q3a_excessiveplus_gametypes[MAX_Q3A_EXCESSIVEPLUS_TYPES] = { "FFA", /* 0 = Free for All */ "1v1", /* 1 = Tournament */ NULL, /* 2 = Single Player */ "TDM", /* 3 = Team Deathmatch */ "CTF", /* 4 = Capture the Flag */ "RTF", /* 5 = Return the Flag */ "One Flag CTF", /* 6 = One Flag Capture the Flag */ "Clan Arena", /* 7 = Clan Arena */ "Freeze Tag", /* 8 = Freeze Tag */ "Protect the Leader" /* 9 = Protect the Leader */ }; #define MAX_WOLF_TYPES 9 static char *wolf_gametypes[MAX_WOLF_TYPES] = { NULL, // 0 - Unknown NULL, // 1 - Unknown NULL, // 2 - Unknown NULL, // 3 - Unknown NULL, // 4 - Unknown "WolfMP", // 5 - standard objective mode "WolfSW", // 6 - Stopwatch mode "WolfCP", // 7 - Checkpoint mode NULL // 8+ ??? }; #define MAX_WOLFET_TYPES 7 static char *wolfet_gametypes[MAX_WOLFET_TYPES] = { NULL, // 0 - Unknown NULL, // 1 - Unknown "Obj", // 2 - Single-Map Objective "SW", // 3 - Stopwatch "Cmpgn", // 4 - Campaign "LMS", // 5 - Last Man Standing NULL // 6+ ??? }; #define MAX_WOLFET_TCETEST_TYPES 8 static char *wolfet_tcetest_gametypes[MAX_WOLFET_TCETEST_TYPES] = { NULL, // 0 - Unknown NULL, // 1 - Unknown NULL, // 2 - Unknown NULL, // 3 - Unknown NULL, // 4 - Unknown "Demolition", // 5 - Demolition NULL, // 6 - Unknown "Bodycount" // 7 - Bodycount }; #define MAX_JK3_TYPES 9 static char *jk3_gametypes[MAX_JK3_TYPES] = { "FFA", // 0 - Free For All NULL, // 1 - Unknown NULL, // 2 - Unknown "Duell", // 3 - Duell "PDuell", // 4 - Power Duell NULL, // 5 - Unknown "TFFA", // 6 - Team Free For All "Siege", // 7 - Siege "CTF" // 8 - Capture the Flag }; struct q3a_gametype_s { char* mod; char** gametypes; int number; }; struct q3a_gametype_s q3a_gametype_map[] = { { "baseq3", q3a_gametypes, MAX_Q3A_TYPES }, { "osp", q3a_osp_gametypes, MAX_Q3A_OSP_TYPES }, { "q3ut2", q3a_ut2_gametypes, MAX_Q3A_UT2_TYPES }, { "q3ut3", q3a_ut3_gametypes, MAX_Q3A_UT3_TYPES }, { "threewave", q3a_threewave_gametypes, MAX_Q3A_THREEWAVE_TYPES }, { "seals", q3a_seals_gametypes, MAX_Q3A_SEALS_TYPES }, { "TribalCTF", q3a_tribalctf_gametypes, MAX_Q3A_TRIBALCTF_TYPES }, { "missionpack", q3a_gametypes, MAX_Q3A_TYPES }, { "generations", q3a_gametypes, MAX_Q3A_TYPES }, { "truecombat", q3a_truecombat_gametypes, MAX_Q3A_TRUECOMBAT_TYPES }, { "q3tc045", q3a_q3tc045_gametypes, MAX_Q3A_Q3TC045_TYPES }, { "freeze", q3a_gametypes, MAX_Q3A_TYPES }, { "afterwards", q3a_afterwards_gametypes, MAX_Q3A_AFTERWARDS_TYPES }, { "cpma", q3a_cpma_gametypes, MAX_Q3A_CPMA_TYPES }, { "arena", q3a_arena_gametypes, MAX_Q3A_ARENA_TYPES }, { "instaunlagged", q3a_gametypes, MAX_Q3A_TYPES }, { "instagibplus", q3a_gametypes, MAX_Q3A_TYPES }, { "beryllium", q3a_gametypes, MAX_Q3A_TYPES }, { "excessive", q3a_gametypes, MAX_Q3A_TYPES }, { "q3f", q3a_q3f_gametypes, MAX_Q3A_Q3F_TYPES }, { "q3f2", q3a_q3f_gametypes, MAX_Q3A_Q3F_TYPES }, { "westernq3", q3a_wq3_gametypes, MAX_Q3A_WQ3_TYPES }, { "wop", q3a_wop_gametypes, MAX_Q3A_WOP_TYPES }, { "excessiveplus", q3a_excessiveplus_gametypes, MAX_Q3A_EXCESSIVEPLUS_TYPES }, { NULL, NULL, 0 } }; struct q3a_gametype_s wolf_gametype_map[] = { { "main", wolf_gametypes, MAX_WOLF_TYPES }, { "wolfmp", wolf_gametypes, MAX_WOLF_TYPES }, { "bani", wolf_gametypes, // exports additional gametypes via g_gametype2 MAX_WOLF_TYPES }, { "headshot", wolf_gametypes, MAX_WOLF_TYPES }, { "osp", wolf_gametypes, MAX_WOLF_TYPES }, { "shrubmod", wolf_gametypes, MAX_WOLF_TYPES } }; // didn't find docu about this, so use q3a types struct q3a_gametype_s ef_gametype_map[] = { { "baseEF", q3a_gametypes, MAX_Q3A_TYPES } }; struct q3a_gametype_s wolfet_gametype_map[] = { { "et", wolfet_gametypes, MAX_WOLFET_TYPES }, { "etmain", wolfet_gametypes, MAX_WOLFET_TYPES }, { "ettest", wolfet_gametypes, MAX_WOLFET_TYPES }, { "etpro", wolfet_gametypes, MAX_WOLFET_TYPES }, { "shrubet", wolfet_gametypes, MAX_WOLFET_TYPES }, { "tcetest", wolfet_tcetest_gametypes, MAX_WOLFET_TCETEST_TYPES } }; struct q3a_gametype_s jk3_gametype_map[] = { { "basejka", jk3_gametypes, MAX_JK3_TYPES }, { "base", jk3_gametypes, MAX_JK3_TYPES }, { "japlus", jk3_gametypes, MAX_JK3_TYPES } }; void q3_decode_gametype (struct server *s, struct q3a_gametype_s map[]) { char *endptr; int n; int found=0; struct q3a_gametype_s* ptr; if(!s->game) return; n = strtol (s->gametype, &endptr, 10); // strtol returns a pointer to the first invalid digit, if both pointers // are equal there was no number at all if (s->gametype == endptr) return; for( ptr=map; !found && ptr && ptr->mod != NULL; ptr++ ) { if( !strcasecmp (s->game, ptr->mod) && n >=0 && n < ptr->number && ptr->gametypes[n] ) { s->gametype = ptr->gametypes[n]; found=1; } // else // Exact match not found - use the first one in the list // which should be the game's original game types // s->gametype = map->gametypes[n]; } } static void q3_analyze_serverinfo (struct server *s) { char **info_ptr; long n; char *fs_game=NULL; char *game=NULL; char *gamename=NULL; /* Clear out the flags */ s->flags = 0; if ((games[s->type].flags & GAME_SPECTATE) != 0) s->flags |= SERVER_SPECTATE; // check if it's really a q3 server. We need to do that first to determine // whether the server protcol for that game is compatible for (info_ptr = s->info; info_ptr && *info_ptr; info_ptr += 2) { if (strcmp (*info_ptr, "version" ) == 0) { if(!strncmp(info_ptr[1],"Q3",2)) { s->type=Q3_SERVER; } else if(!strncmp(info_ptr[1],"Wolf",4)) { s->type=WO_SERVER; } else if(!strncmp(info_ptr[1],"ET 2",4) || !strncmp(info_ptr[1],"ETTV ",5)) { s->type=WOET_SERVER; } // voyager elite force else if(!strncmp(info_ptr[1],"ST:V HM",7)) { s->type=EF_SERVER; } else if(!strncmp(info_ptr[1],"Medal",5)) { s->type=MOHAA_SERVER; } else if(!strncmp(info_ptr[1],"SOF2MP",6)) { s->type=SOF2S_SERVER; } else if(!strncmp(info_ptr[1],"tremulous",9)) { s->type=TREMULOUS_SERVER; } break; } } for (info_ptr = s->info; info_ptr && *info_ptr; info_ptr += 2) { /* fs_game sets the active directory and is how one chooses a mod on the command line. This should not show up in the server string but some times it does. We will take either fs_game, game or gamename as the "game" string. --baa */ if (strcmp (*info_ptr, "fs_game") == 0) { fs_game = info_ptr[1]; } else if (strcmp (*info_ptr, "gamename") == 0) { gamename = info_ptr[1]; } else if (strcmp (*info_ptr, "game") == 0) { game = info_ptr[1]; } else if (strcmp (*info_ptr, "version" ) == 0) { if (strstr (info_ptr[1], "linux")) { s->sv_os = 'L'; } else if (strstr (info_ptr[1], "win" )) { s->sv_os = 'W'; } else if (strstr (info_ptr[1], "Mac" )) { s->sv_os = 'M'; } else { s->sv_os = '?'; } } else if (!s->gametype && strcmp (*info_ptr, "g_gametype") == 0) { s->gametype = info_ptr[1]; } else if (s->type == MOHAA_SERVER && strcmp (*info_ptr, "g_gametypestring") == 0) { s->gametype = info_ptr[1]; } else if (s->type == WARSOW_SERVER && strcmp (*info_ptr, "g_gametype_name") == 0) { s->gametype = info_ptr[1]; } else if (strcmp (*info_ptr, "g_needpass") == 0) { n = strtol (info_ptr[1], NULL, 10); if ((n & 1) != 0) s->flags |= SERVER_PASSWORD; if ((n & 2) != 0) s->flags |= SERVER_SP_PASSWORD; } else if (strcmp (*info_ptr, "cheats") == 0) { s->flags |= SERVER_CHEATS; } else if (g_strcasecmp (*info_ptr, "sv_privateClients") == 0) { s->private_client = strtol (info_ptr[1], NULL, 10); } else if (!strcmp(*info_ptr, "sv_punkbuster") && info_ptr[1] && info_ptr[1][0] == '1') { s->flags |= SERVER_PUNKBUSTER; } else if (!strcmp(*info_ptr, "protocol")) { const char* masterprotocol = game_get_attribute(s->type,"masterprotocol"); if(masterprotocol && !strcmp(masterprotocol, "auto")) masterprotocol = game_get_attribute(s->type, "_masterprotocol"); if(masterprotocol && strcmp(masterprotocol, info_ptr[1])) s->flags |= SERVER_INCOMPATIBLE; } } if(fs_game) { s->game=fs_game; } else if(game) { s->game=game; } else if(gamename) { s->game=gamename; } if(s->gametype) { if ( s->type == Q3_SERVER) { q3_decode_gametype( s, q3a_gametype_map ); } else if ( s->type == WO_SERVER) { q3_decode_gametype( s, wolf_gametype_map ); } else if ( s->type == EF_SERVER) { q3_decode_gametype( s, ef_gametype_map ); } else if ( s->type == WOET_SERVER) { q3_decode_gametype( s, wolfet_gametype_map ); } else if ( s->type == JK3_SERVER) { q3_decode_gametype( s, jk3_gametype_map ); } } } static void doom3_analyze_serverinfo (struct server *s) { char **info_ptr; char *fs_game=NULL; /* Clear out the flags */ s->flags = 0; if ((games[s->type].flags & GAME_SPECTATE) != 0) s->flags |= SERVER_SPECTATE; for (info_ptr = s->info; info_ptr && *info_ptr; info_ptr += 2) { if (strcmp (*info_ptr, "fs_game") == 0) { fs_game = info_ptr[1]; } else if (strcmp (*info_ptr, "si_version" ) == 0) { if (strstr (info_ptr[1], "linux")) { s->sv_os = 'L'; } else if (strstr (info_ptr[1], "win" )) { s->sv_os = 'W'; } else if (strstr (info_ptr[1], "Mac" )) { s->sv_os = 'M'; } else { s->sv_os = '?'; } } else if (!s->gametype && strcmp (*info_ptr, "si_gameType") == 0) { s->gametype = info_ptr[1]; } else if (strcmp (*info_ptr, "si_usepass") == 0) { int n = atoi (info_ptr[1]); if ((n & 1) != 0) s->flags |= SERVER_PASSWORD; if ((n & 2) != 0) s->flags |= SERVER_SP_PASSWORD; } else if (strcmp (*info_ptr, "osmask") == 0) { char* p; unsigned long n = strtol(info_ptr[1], &p, 0); if(info_ptr[1] != p && (n & 4) != 4) { s->flags |= SERVER_INCOMPATIBLE; } } else if (!strcmp(*info_ptr, "sv_punkbuster") && info_ptr[1] && info_ptr[1][0] == '1') { s->flags |= SERVER_PUNKBUSTER; } } if(fs_game) { s->game=fs_game; } } static int quake_config_is_valid (struct server *s) { struct stat stat_buf; char *cfgdir; char *path; struct game *g = &games[s->type]; if(g->main_mod && g->main_mod[0]) cfgdir = g->main_mod[0]; else return FALSE; if (g->cmd == NULL || g->cmd[0] == '\0') { // %s = game name e.g. QuakeWorld dialog_ok (NULL, _("%s command line is empty."), g->name); return FALSE; } if (g->real_dir != NULL && g->real_dir[0] != '\0') { if (stat (g->real_dir, &stat_buf) != 0 || !S_ISDIR (stat_buf.st_mode)) { // directory name, game name dialog_ok (NULL, _("\"%s\" is not a directory\n" "Please specify correct %s working directory."), g->real_dir, g->name); return FALSE; } } path = file_in_dir (g->real_dir, cfgdir); if (stat (path, &stat_buf) || !S_ISDIR (stat_buf.st_mode)) { if (!g->real_dir || g->real_dir[0] == '\0') { // game name dialog_ok (NULL, _("Please specify correct %s working directory."), g->name); } else { dialog_ok (NULL, // directory, subdirectory, game name _("Directory \"%s\" doesn\'t contain \"%s\" subdirectory.\n" "Please specify correct %s working directory."), g->real_dir, cfgdir, g->name); } g_free (path); return FALSE; } g_free (path); return TRUE; } /** find the quake3 directory */ static char *quake3_data_dir (struct game* this) { struct stat stat_buf; char *path = NULL; char *dir = NULL; unsigned i = 0; if(!this) return NULL; dir = this->real_home?this->real_home:this->real_dir; if (!dir) return NULL; for(i = 0; this->main_mod[i]; ++i) { path = file_in_dir (dir, this->main_mod[i]); if (stat (path, &stat_buf) == 0 && S_ISDIR (stat_buf.st_mode)) { break; } else { g_free (path); path = NULL; } } return path; } static int quake3_config_is_valid (struct server *s) { struct game *g = &games[s->type]; char *path; if(!config_is_valid_generic(s)) return FALSE; path = quake3_data_dir (g); if (path == NULL) { if (!g->real_dir || g->real_dir[0] == '\0') { dialog_ok (NULL, // %s Quake3 _("~/.q3a directory doesn\'t exist or doesn\'t contain\n" "\"baseq3\" (\"demoq3\") subdirectory.\n" "Please run %s client at least once before running XQF\n" "or specify correct %s working directory."), g->name, g->name); } else { dialog_ok (NULL, // %s directory, Quake3 _("\"%s\" directory doesn\'t exist or doesn\'t contain " "\"baseq3\" (\"demoq3\") subdirectory.\n" "Please specify correct %s working directory\n" "or leave it empty (~/.q3a is used by default)"), g->real_dir, g->name); } return FALSE; } g_free (path); return TRUE; } static int config_is_valid_generic (struct server *s) { struct stat stat_buf; struct game *g = &games[s->type]; if (g->cmd == NULL || g->cmd[0] == '\0') { dialog_ok (NULL, "%s command line is empty.", g->name); return FALSE; } if (g->real_dir != NULL && g->real_dir[0] != '\0') { if (stat (g->real_dir, &stat_buf) != 0 || !S_ISDIR (stat_buf.st_mode)) { // %s directory, game name dialog_ok (NULL, _("\"%s\" is not a directory\n" "Please specify correct %s working directory."), g->real_dir, g->name); return FALSE; } } return TRUE; } static int complain_launch_cant_write_file(const char* file) { return dialog_yesno (NULL, 1, _("Launch"), _("Cancel"), //%s frontend.cfg _("Cannot write to file \"%s\".\n\nLaunch client anyway?"), file); } static FILE *open_cfg (const char *filename, int private) { FILE *f; mode_t saved_umask; if(private) saved_umask = umask(0077); f = fopen (filename, "w"); if (f) fprintf (f, "//\n// generated by XQF, do not modify\n//\n"); if(private) umask(saved_umask); return f; } static int real_password (const char *password) { if (!password || (password[0] == '1' && password[1] == '\0')) return FALSE; return TRUE; } static int write_passwords (const char *filename, const struct condef *con) { FILE *f; f = open_cfg (filename, TRUE); if (!f) return FALSE; if (con->password) fprintf (f, "password \"%s\"\n", con->password); if (con->spectator_password) fprintf (f, "spectator \"%s\"\n", con->spectator_password); if (con->rcon_password) fprintf (f, "rcon_password \"%s\"\n", con->rcon_password); fclose (f); return TRUE; } static int write_q1_vars (const struct condef *con) { FILE *f; int ret = TRUE; struct game *g = &games[con->s->type]; char* file = NULL; if(g->main_mod && g->main_mod[0]) file = g->main_mod[0]; else return FALSE; file = g_strjoin("/", g->real_dir, file, EXEC_CFG, NULL); f = open_cfg (file, FALSE); if (!f) { ret = FALSE; goto out; } if (default_q1_name) fprintf (f, "name \"%s\"\n", default_q1_name); fprintf (f, "color %d %d\n", default_q1_top_color, default_q1_bottom_color); if (games[Q1_SERVER].game_cfg) fprintf (f, "exec \"%s\"\n", games[Q1_SERVER].game_cfg); if (con->custom_cfg) fprintf (f, "exec \"%s\"\n", con->custom_cfg); fclose (f); out: if(!ret) ret = complain_launch_cant_write_file(file); g_free(file); return ret; } static int write_qw_vars (const struct condef *con) { FILE *f; int auto_pl; int ret = TRUE; struct game *g = &games[con->s->type]; char* file = NULL; if(g->main_mod && g->main_mod[0]) file = g->main_mod[0]; else return FALSE; file = g_strjoin("/", g->real_dir, file, EXEC_CFG, NULL); f = open_cfg (file, FALSE); if (!f) { ret = FALSE; goto out; } if (default_qw_name) fprintf (f, "name \"%s\"\n", default_qw_name); if (default_qw_skin) fprintf (f, "skin \"%s\"\n", default_qw_skin); fprintf (f, "team \"%s\"\n", (default_qw_team)? default_qw_team : ""); fprintf (f, "topcolor \"%d\"\n", default_qw_top_color); fprintf (f, "bottomcolor \"%d\"\n", default_qw_bottom_color); switch (pushlatency_mode) { case 1: /* automatic pushlatency */ if (con->s->ping <= 0) auto_pl = 10; /* "min" value */ else if (con->s->ping >= 2000) auto_pl = 1000; /* "max" value */ else { auto_pl = con->s->ping / 2; auto_pl = ((auto_pl + 9) / 10) * 10; /* beautify it */ } fprintf (f, "pushlatency %d\n", -auto_pl); break; case 2: /* fixed value */ fprintf (f, "pushlatency %d\n", pushlatency_value); break; default: /* do not touch */ break; } fprintf (f, "rate \"%d\"\n", default_qw_rate); fprintf (f, "cl_nodelta \"%d\"\n", default_qw_cl_nodelta); fprintf (f, "cl_predict_players \"%d\"\n", default_qw_cl_predict); fprintf (f, "noaim \"%d\"\n", default_noaim); fprintf (f, "noskins \"%d\"\n", default_qw_noskins); if (default_w_switch >= 0) fprintf (f, "setinfo w_switch \"%d\"\n", default_w_switch); if (default_b_switch >= 0) fprintf (f, "setinfo b_switch \"%d\"\n", default_b_switch); if (games[QW_SERVER].game_cfg) fprintf (f, "exec \"%s\"\n", games[QW_SERVER].game_cfg); if (con->custom_cfg) fprintf (f, "exec \"%s\"\n", con->custom_cfg); fclose (f); out: if(!ret) ret = complain_launch_cant_write_file(file); g_free(file); return ret; } static int write_q2_vars (const struct condef *con) { FILE *f; int ret = TRUE; struct game *g = &games[con->s->type]; char* file = NULL; if(g->main_mod && g->main_mod[0]) file = g->main_mod[0]; else return FALSE; file = g_strjoin("/", g->real_dir, file, EXEC_CFG, NULL); f = open_cfg (file, FALSE); if (!f) { ret = FALSE; goto out; } if (default_q2_name) fprintf (f, "set name \"%s\"\n", default_q2_name); if (default_q2_skin) fprintf (f, "set skin \"%s\"\n", default_q2_skin); fprintf (f, "set rate \"%d\"\n", default_q2_rate); fprintf (f, "set cl_nodelta \"%d\"\n", default_q2_cl_nodelta); fprintf (f, "set cl_predict \"%d\"\n", default_q2_cl_predict); fprintf (f, "set cl_noskins \"%d\"\n", default_q2_noskins); if (games[Q2_SERVER].game_cfg) fprintf (f, "exec \"%s\"\n", games[Q2_SERVER].game_cfg); if (con->custom_cfg) fprintf (f, "exec \"%s\"\n", con->custom_cfg); fclose (f); out: if(!ret) ret = complain_launch_cant_write_file(file); g_free(file); return ret; } #if 0 static int is_dir (const char *dir, const char *gamedir) { struct stat stat_buf; char *path; int res = FALSE; if (dir && gamedir) { path = file_in_dir (dir, gamedir); res = (stat (path, &stat_buf) == 0 && S_ISDIR (stat_buf.st_mode)); g_free (path); } return res; } #endif static int q1_exec_generic (const struct condef *con, int forkit) { char *argv[32]; int argi = 0; char buf[16]; char *cmd; struct game *g = &games[con->s->type]; int retval; cmd = strdup_strip (g->cmd); argv[argi++] = strtok (cmd, delim); while ((argv[argi] = strtok (NULL, delim)) != NULL) argi++; if (default_nosound) argv[argi++] = "-nosound"; if (default_nocdaudio) argv[argi++] = "-nocdaudio"; if (con->gamedir) { argv[argi++] = "-game"; argv[argi++] = con->gamedir; } argv[argi++] = "+exec"; argv[argi++] = EXEC_CFG; if (con->demo) { argv[argi++] = "+record"; argv[argi++] = con->demo; } if (con->server) { if (con->s->port != g->default_port) { g_snprintf (buf, 16, "%d", con->s->port); argv[argi++] = "+port"; argv[argi++] = buf; } argv[argi++] = "+connect"; argv[argi++] = con->server; } argv[argi] = NULL; retval = client_launch_exec (forkit, g->real_dir, argv, con->s); g_free (cmd); return retval; } static int qw_exec (const struct condef *con, int forkit) { char *argv[32]; int argi = 0; char *cmd; char *file = NULL; struct game *g = &games[con->s->type]; int retval=-1; cmd = strdup_strip (g->cmd); argv[argi++] = strtok (cmd, delim); while ((argv[argi] = strtok (NULL, delim)) != NULL) argi++; if (default_nosound) argv[argi++] = "-nosound"; if (default_nocdaudio) argv[argi++] = "-nocdaudio"; if (con->gamedir) { argv[argi++] = "-gamedir"; argv[argi++] = con->gamedir; } if (con->password || con->rcon_password || real_password (con->spectator_password)) { if(g->main_mod && g->main_mod[0]) file = g_strjoin("/", g->real_dir, g->main_mod[0], PASSWORD_CFG, NULL); if (file && !write_passwords (file, con) && !complain_launch_cant_write_file(file)) goto out; argv[argi++] = "+exec"; argv[argi++] = PASSWORD_CFG; } else { if (con->spectator_password) { argv[argi++] = "+spectator"; argv[argi++] = con->spectator_password; } } argv[argi++] = "+exec"; argv[argi++] = EXEC_CFG; if (con->server) { if (con->demo) { argv[argi++] = "+record"; argv[argi++] = con->demo; if (con->s->type == QW_SERVER) argv[argi++] = con->server; } else { argv[argi++] = "+connect"; argv[argi++] = con->server; } } argv[argi] = NULL; retval = client_launch_exec (forkit, g->real_dir, argv, con->s); out: g_free(file); g_free(cmd); return retval; } static int q2_exec (const struct condef *con, int forkit) { char *argv[32]; int argi = 0; char *cmd; char *file = NULL; struct game *g = &games[con->s->type]; int retval=-1; if(g->main_mod && g->main_mod[0]) file = g_strjoin("/", g->real_dir, g->main_mod[0], PASSWORD_CFG, NULL); cmd = strdup_strip (g->cmd); argv[argi++] = strtok (cmd, delim); while ((argv[argi] = strtok (NULL, delim)) != NULL) argi++; if (default_nosound) { argv[argi++] = "+set"; argv[argi++] = "s_initsound"; argv[argi++] = "0"; } argv[argi++] = "+set"; argv[argi++] = "cd_nocd"; argv[argi++] = (default_nocdaudio)? "1" : "0"; if (con->gamedir) { argv[argi++] = "+set"; argv[argi++] = "game"; argv[argi++] = con->gamedir; } if (con->password || con->rcon_password || real_password (con->spectator_password)) { if (file && !write_passwords (file, con) && !complain_launch_cant_write_file(file)) goto out; argv[argi++] = "+exec"; argv[argi++] = PASSWORD_CFG; } else { if (con->spectator_password) { argv[argi++] = "+spectator"; argv[argi++] = con->spectator_password; } } argv[argi++] = "+exec"; argv[argi++] = EXEC_CFG; if (con->server) { argv[argi++] = "+connect"; argv[argi++] = con->server; } if (con->demo) { argv[argi++] = "+record"; argv[argi++] = con->demo; } argv[argi] = NULL; retval = client_launch_exec (forkit, g->real_dir, argv, con->s); out: g_free (file); g_free (cmd); return retval; } static int q2_exec_generic (const struct condef *con, int forkit) { char *argv[32]; int argi = 0; char *cmd; struct game *g = &games[con->s->type]; int retval; cmd = strdup_strip (g->cmd); argv[argi++] = strtok (cmd, delim); while ((argv[argi] = strtok (NULL, delim)) != NULL) argi++; if (default_nosound) { argv[argi++] = "+set"; argv[argi++] = "s_initsound"; argv[argi++] = "0"; } argv[argi++] = "+set"; argv[argi++] = "cd_nocd"; argv[argi++] = (default_nocdaudio)? "1" : "0"; if (con->gamedir) { argv[argi++] = "+set"; argv[argi++] = "game"; argv[argi++] = con->gamedir; } if (con->server) { argv[argi++] = "+connect"; argv[argi++] = con->server; } if (con->demo) { argv[argi++] = "+record"; argv[argi++] = con->demo; } argv[argi] = NULL; retval = client_launch_exec (forkit, g->real_dir, argv, con->s); g_free (cmd); return retval; } static int q3_exec (const struct condef *con, int forkit) { char *argv[64]; int argi = 0; int cmdi = 0; char* cmd = NULL; char *protocol = NULL; char** cmdtokens = NULL; char *punkbuster; char* protocmdtofree = NULL; char** additional_args = NULL; char** memoryoptions = NULL; int i; struct game *g = NULL; int retval; int game_match_result = 0; char *real_game_dir = NULL; int setfs_game = 0; int set_punkbuster = 0; int enable_console = 0; int pass_memory_options = 0; struct quake_private* pd = NULL; if(!con) return -1; if(!con->s) return -1; g = &games[con->s->type]; if(!g) return -1; pd = (struct quake_private*)games[con->s->type].pd; setfs_game = str2bool(game_get_attribute(g->type,"setfs_game")); set_punkbuster = str2bool(game_get_attribute(g->type,"set_punkbuster")); enable_console = str2bool(game_get_attribute(g->type,"enable_console")); pass_memory_options = str2bool(game_get_attribute(g->type,"pass_memory_options")); cmdtokens = g_strsplit(g->cmd," ",0); if(cmdtokens && *cmdtokens[cmdi]) cmd=cmdtokens[cmdi++]; /* Figure out what protocal the server is running so we can try to connect with a specialized quake3 script. You need to name the scripts like quake3proto48. */ protocol = strdup_strip(find_server_setting_for_key ("protocol", con->s->info)); if (cmd && protocol) { char* tmp = g_strdup_printf("%sproto%s",cmd,protocol); char* tmp_cmd = expand_tilde(tmp); g_free(tmp); tmp = NULL; g_free(protocol); protocol = NULL; debug (1, "Check for '%s' as a command", tmp_cmd); // Check to see if we can find that generated filename // absolute path? if(tmp_cmd[0]=='/') { if(!access(tmp_cmd,X_OK)) { cmd = protocmdtofree = strdup(tmp_cmd); debug(1,"absolute path %s",cmd); } } // no, check $PATH else { char* file = find_file_in_path(tmp_cmd); if(file) { cmd = protocmdtofree = file; debug(1,"use file %s in path",cmd); } } g_free(tmp_cmd); } while(cmd) { if(*cmd) // skip empty { argv[argi++] = cmd; } cmd = cmdtokens[cmdi++]; } if (default_nosound) { argv[argi++] = "+set"; argv[argi++] = "s_initsound"; argv[argi++] = "0"; } if (con->rcon_password) { const char* pwvarname = NULL; if((pwvarname = game_get_attribute(con->s->type, "+rconpassword"))) argv[argi++] = (char*)pwvarname; else argv[argi++] = "+rconpassword"; argv[argi++] = con->rcon_password; } if (con->password) { argv[argi++] = "+password"; argv[argi++] = con->password; } if (con->server) { argv[argi++] = "+connect"; argv[argi++] = con->server; } if (con->demo) { argv[argi++] = "+record"; argv[argi++] = con->demo; } if(g->game_cfg) { argv[argi++] = "+exec"; argv[argi++] = g->game_cfg; } if (con->custom_cfg) { argv[argi++] = "+exec"; argv[argi++] = con->custom_cfg; } /* The 1.32 release of Q3A needs +set cl_punkbuster 1 on the command line. */ punkbuster = find_server_setting_for_key ("sv_punkbuster", con->s->info); if( punkbuster != NULL && strcmp( punkbuster, "1" ) == 0 ) { if( set_punkbuster ) { argv[argi++] = "+set"; argv[argi++] = "cl_punkbuster"; argv[argi++] = "1"; } else { char* option = g_strdup_printf("/" CONFIG_FILE "/Game: %s/punkbuster dialog shown",type2id(g->type)); debug( 1, "Got %s for punkbuster\n", punkbuster ); if(!config_get_bool (option)) { dialog_ok (NULL, _("The server has Punkbuster enabled but it is not going\nto be set on the command line.\nYou may have problems connecting.\nYou can fix this in the game preferences.")); config_set_bool (option,TRUE); } g_free(option); } } if(enable_console) { argv[argi++] = "+set"; argv[argi++] = "com_allowConsole"; argv[argi++] = "1"; } /* If the s->game is set, we want to put fs_game on the command line so that the mod is loaded when we connect. */ if (setfs_game && con->s->game) { gboolean is_mainmod = FALSE; for(i = 0; g->main_mod && g->main_mod[i]; ++i) { if(!g_strcasecmp(con->s->game, g->main_mod[i])) { is_mainmod = TRUE; break; } } if(!is_mainmod) { // Look in (e.g.) ~/.q3a first if(g->real_home) { real_game_dir = find_game_dir(g->real_home, con->s->game, &game_match_result); } if (!real_game_dir) { // Didn't find in home directory so look in real directory if defined real_game_dir = find_game_dir(g->real_dir, con->s->game, &game_match_result); } argv[argi++] = "+set"; argv[argi++] = "fs_game"; argv[argi++] = real_game_dir?real_game_dir:con->s->game; } } if(pass_memory_options == TRUE) { memoryoptions = g_new0(char*,5); // must be null terminated => max four entries argv[argi++] = "+set"; argv[argi++] = "com_hunkmegs"; argv[argi++] = memoryoptions[0] = strdup(game_get_attribute(g->type,"com_hunkmegs")); argv[argi++] = "+set"; argv[argi++] = "com_zonemegs"; argv[argi++] = memoryoptions[1] = strdup(game_get_attribute(g->type,"com_zonemegs")); argv[argi++] = "+set"; argv[argi++] = "com_soundmegs"; argv[argi++] = memoryoptions[2] = strdup(game_get_attribute(g->type,"com_soundmegs")); argv[argi++] = "+set"; argv[argi++] = "cg_precachedmodels"; argv[argi++] = memoryoptions[3] = strdup(game_get_attribute(g->type,"cg_precachedmodels")); } // Append additional args if needed i = 0; additional_args = get_custom_arguments(g->type, con->s->game); while(additional_args && additional_args[i] ) { argv[argi++] = additional_args[i]; i++; } argv[argi] = NULL; debug(1,"argument count %d", argi); retval = client_launch_exec (forkit, g->real_dir, argv, con->s); g_free (real_game_dir); g_free (protocmdtofree); g_strfreev(additional_args); g_strfreev(cmdtokens); g_strfreev(memoryoptions); return retval; } static int hl_exec (const struct condef *con, int forkit) { char *argv[32]; int argi = 0; char *cmd; struct game *g = &games[con->s->type]; int retval; cmd = strdup_strip (g->cmd); argv[argi++] = strtok (cmd, delim); while ((argv[argi] = strtok (NULL, delim)) != NULL) argi++; if (con->gamedir) { argv[argi++] = "-game"; argv[argi++] = con->gamedir; } if (con->server) { argv[argi++] = "+connect"; argv[argi++] = con->server; } if (con->password) { argv[argi++] = "+password"; argv[argi++] = con->password; } if (con->rcon_password) { argv[argi++] = "+rcon_password"; argv[argi++] = con->rcon_password; } argv[argi] = NULL; retval = client_launch_exec (forkit, g->real_dir, argv, con->s); g_free (cmd); return retval; } static int ut_exec (const struct condef *con, int forkit) { char *argv[32]; int argi = 0; char *cmd; struct game *g = &games[con->s->type]; int retval; char* hostport=NULL; char* real_server=NULL; char** additional_args = NULL; char **info_ptr; int i; cmd = strdup_strip (g->cmd); argv[argi++] = strtok (cmd, delim); while ((argv[argi] = strtok (NULL, delim)) != NULL) argi++; // Pass server IP address first otherwise it won't work. // Make sure ut/ut script (from installed game) contains // exec "./ut-bin" $* -log and not -log $* at the end // otherwise XQF can not connect via the command line! if(g->flags & GAME_LAUNCH_HOSTPORT) { // go through all server rules for (info_ptr = con->s->info; info_ptr && *info_ptr; info_ptr += 2) { if (!strcmp (*info_ptr, "hostport")) { hostport=info_ptr[1]; } } } if (con->server) { // gamespy port can be different from game port if(hostport) { real_server = g_strdup_printf ("%s:%s", inet_ntoa (con->s->host->ip), hostport); } else real_server = strdup(con->server); if (con->spectate) { char* tmp = NULL; if(real_password(con->spectator_password)) tmp = g_strdup_printf("%s?spectatoronly=true?password=%s",real_server,con->spectator_password); else tmp = g_strdup_printf("%s?spectatoronly=true",real_server); g_free(real_server); real_server=tmp; } // Add password if exists if (con->password) { char* tmp = g_strdup_printf("%s?password=%s",real_server,con->password); g_free(real_server); real_server=tmp; } } if(con->s) { // Append additional args if needed i = 0; additional_args = get_custom_arguments(con->s->type, con->s->game); // if (!(additional_args && additional_args[i])) argv[argi++] = real_server; while(additional_args && additional_args[i] ) { argv[argi++] = additional_args[i]; /* // append first argument to server address if(i == 0) { tmp = g_strconcat(real_server,additional_args[i],NULL); g_free(real_server); real_server=tmp; argv[argi++] = real_server; } else { argv[argi++] = additional_args[i]; } */ i++; } } if (default_nosound) { argv[argi++] = "-nosound"; } argv[argi] = NULL; retval = client_launch_exec (forkit, g->real_dir, argv, con->s); g_free (cmd); g_free (real_server); if(additional_args) g_strfreev(additional_args); return retval; } static int savage_exec(const struct condef *con, int forkit) { char *argv[32]; int argi = 0; char *cmd; struct game *g = &games[con->s->type]; int retval; char* connect_arg = NULL; cmd = strdup_strip (g->cmd); argv[argi++] = strtok (cmd, delim); while ((argv[argi] = strtok (NULL, delim)) != NULL) argi++; if (con->server) { argv[argi++] = "set"; argv[argi++] = "autoexec"; connect_arg = g_strdup_printf("connect %s",con->server); if(con->password) { char* tmp = connect_arg; connect_arg = g_strdup_printf("%s; set cl_password %s", connect_arg, con->password); g_free(tmp); } if(con->rcon_password) { char* tmp = connect_arg; connect_arg = g_strdup_printf("%s; set cl_adminpassword %s", connect_arg, con->rcon_password); g_free(tmp); } argv[argi++] = connect_arg; } argv[argi] = NULL; retval = client_launch_exec (forkit, g->real_dir, argv, con->s); g_free (cmd); g_free (connect_arg); return retval; return 0; } // this one just passes the ip address as first parameter static int exec_generic (const struct condef *con, int forkit) { char *argv[32]; int argi = 0; char *cmd; struct game *g = &games[con->s->type]; int retval; cmd = strdup_strip (g->cmd); argv[argi++] = strtok (cmd, delim); while ((argv[argi] = strtok (NULL, delim)) != NULL) argi++; if (con->server) { argv[argi++] = con->server; } argv[argi] = NULL; retval = client_launch_exec (forkit, g->real_dir, argv, con->s); g_free (cmd); return retval; } // Serious Sam: only supports +connect static int ssam_exec(const struct condef *con, int forkit) { char *argv[32]; int argi = 0; char *cmd; struct game *g = &games[con->s->type]; int retval; cmd = strdup_strip (g->cmd); argv[argi++] = strtok (cmd, delim); while ((argv[argi] = strtok (NULL, delim)) != NULL) argi++; if (con->server) { argv[argi++] = "+connect"; argv[argi++] = con->server; } argv[argi] = NULL; retval = client_launch_exec (forkit, g->real_dir, argv, con->s); g_free (cmd); return retval; } // Netpanzer: only supports -c static int netpanzer_exec(const struct condef *con, int forkit) { char *argv[32]; int argi = 0; char *cmd; struct game *g = &games[con->s->type]; int retval; cmd = strdup_strip (g->cmd); argv[argi++] = strtok (cmd, delim); while ((argv[argi] = strtok (NULL, delim)) != NULL) argi++; if (con->server) { argv[argi++] = "-c"; argv[argi++] = con->server; } argv[argi] = NULL; retval = client_launch_exec (forkit, g->real_dir, argv, con->s); g_free (cmd); return retval; } // launch any game that uses the gamespy protocol // the first argument is the content of gamename field (may be empty), // the second one the ip of the server static int gamespy_exec (const struct condef *con, int forkit) { char *argv[32]; int argi = 0; char *cmd; struct game *g = NULL; int retval; char **info_ptr; char* gamename=NULL; char* hostport=NULL; char* real_server=NULL; if(!con || !con->s) return 1; g = &games[con->s->type]; cmd = strdup_strip (g->cmd); argv[argi++] = strtok (cmd, delim); while ((argv[argi] = strtok (NULL, delim)) != NULL) argi++; // go through all server rules for (info_ptr = con->s->info; info_ptr && *info_ptr; info_ptr += 2) { if (!strcmp (*info_ptr, "gamename")) { gamename = strdup_strip(info_ptr[1]); } else if (!strcmp (*info_ptr, "hostport")) { hostport=info_ptr[1]; } } if(gamename) argv[argi++] = gamename; else argv[argi++] = ""; if (con->server) { // gamespy port can be different from game port if(hostport) { real_server = g_strdup_printf ("%s:%s", inet_ntoa (con->s->host->ip), hostport); argv[argi++] = real_server; } else { argv[argi++] = con->server; } } argv[argi] = NULL; retval = client_launch_exec (forkit, g->real_dir, argv, con->s); g_free (cmd); g_free (real_server); g_free (gamename); return retval; } static int t2_exec (const struct condef *con, int forkit) { char *argv[32]; int argi = 0; char *cmd; struct game *g = &games[con->s->type]; int retval; cmd = strdup_strip (g->cmd); argv[argi++] = strtok (cmd, delim); while ((argv[argi] = strtok (NULL, delim)) != NULL) argi++; if (con->server) { if(default_t2_name && *default_t2_name) { argv[argi++] = "-login"; argv[argi++] = default_t2_name; } argv[argi++] = "-online"; argv[argi++] = "-connect"; argv[argi++] = con->server; } argv[argi] = NULL; retval = client_launch_exec (forkit, g->real_dir, argv, con->s); g_free (cmd); return retval; } static int bf1942_exec (const struct condef *con, int forkit) { char *argv[32]; int argi = 0; char *cmd; struct game *g = NULL; int retval; char **info_ptr; char* gameid=NULL; char* hostport=NULL; char* real_server=NULL; if(!con || !con->s) return 1; g = &games[con->s->type]; cmd = strdup_strip (g->cmd); argv[argi++] = strtok (cmd, delim); while ((argv[argi] = strtok (NULL, delim)) != NULL) argi++; argv[argi++] = "+restart"; argv[argi++] = "1"; // go through all server rules for (info_ptr = con->s->info; info_ptr && *info_ptr; info_ptr += 2) { if (!strcmp (*info_ptr, "gameid")) { gameid=info_ptr[1]; } else if (!strcmp (*info_ptr, "hostport")) { hostport=info_ptr[1]; } } if(gameid) { argv[argi++] = "+game"; argv[argi++] = gameid; } // argv[argi++] = strdup_strip (gameid); if (con->server) { argv[argi++] = "+joinServer"; // gamespy port can be different from game port if(hostport) { real_server = g_strdup_printf ("%s:%s", inet_ntoa (con->s->host->ip), hostport); argv[argi++] = real_server; } else { argv[argi++] = con->server; } } argv[argi] = NULL; retval = client_launch_exec (forkit, g->real_dir, argv, con->s); g_free (cmd); g_free (real_server); return retval; } static int descent3_exec (const struct condef *con, int forkit) { char *argv[32]; int argi = 0; char *cmd; struct game *g = NULL; int retval; char **info_ptr; char* hostport=NULL; char* real_server=NULL; if(!con || !con->s) return 1; g = &games[con->s->type]; cmd = strdup_strip (g->cmd); argv[argi++] = strtok (cmd, delim); while ((argv[argi] = strtok (NULL, delim)) != NULL) argi++; // go through all server rules for (info_ptr = con->s->info; info_ptr && *info_ptr; info_ptr += 2) { if (!strcmp (*info_ptr, "hostport")) { hostport=info_ptr[1]; } } if (con->server) { argv[argi++] = "--directip"; // gamespy port can be different from game port if(hostport) { real_server = g_strdup_printf ("%s:%s", inet_ntoa (con->s->host->ip), hostport); argv[argi++] = real_server; } else { argv[argi++] = con->server; } } argv[argi] = NULL; retval = client_launch_exec (forkit, g->real_dir, argv, con->s); g_free (cmd); g_free (real_server); return retval; } static char *dir_custom_cfg_filter (const char *dir, const char *str) { static const char *cfgext[] = { ".cfg", ".scr", ".rc", NULL }; const char **ext; size_t len; if (!str) return NULL; len = strlen (str); for (ext = cfgext; *ext; ext++) { if (len > strlen (*ext) && strcasecmp (str + len - strlen (*ext), *ext) == 0) { return g_strdup (str); } } return NULL; } static GList *custom_cfg_filter (GList *list) { GList *tmp; GList *res = NULL; char *str; for (tmp = list; tmp; tmp = tmp->next) { str = (char *) tmp->data; if (strcmp (str, EXEC_CFG) && strcmp (str, PASSWORD_CFG) && strcmp (str, "__qf__.cfg") && strcasecmp (str, "config.cfg") && strcasecmp (str, "server.cfg") && strcasecmp (str, "autoexec.cfg") && strcasecmp (str, "quake.rc") && strcasecmp (str, "q3config.cfg")) { res = g_list_prepend (res, str); } else { g_free (str); } } g_list_free (list); res = g_list_reverse (res); return res; } static GList *quake_custom_cfgs (struct game* this, const char *path, const char *mod) { GList *cfgs = NULL; const char* dirs[2] = {0}; unsigned d, i; debug(4, "%s, %s", path, mod); dirs[0] = path?path:this->real_dir; dirs[1] = this->real_home; for(d = 0; d < sizeof(dirs)/sizeof(dirs[0]); ++d) { if(!(dirs[d] && *dirs[d])) continue; for(i = 0; this->main_mod && this->main_mod[i]; ++i) { char* dir = file_in_dir (dirs[d], this->main_mod[i]); GList* tmp = dir_to_list (dir, dir_custom_cfg_filter); cfgs = merge_sorted_string_lists (cfgs, tmp); g_free (dir); } if(mod) { char* dir = file_in_dir (dirs[d], mod); GList* tmp = dir_to_list (dir, dir_custom_cfg_filter); cfgs = merge_sorted_string_lists (cfgs, tmp); g_free (dir); } } cfgs = custom_cfg_filter (cfgs); return cfgs; } static void quake_save_server_rules (FILE *f, struct server *s) { char **info; if (!s || !s->info) return; info = s->info; while (info[0]) { if (info[1]) fprintf (f, "%s=%s", info[0], info[1]); else fprintf (f, "%s", info[0]); info += 2; if (info[0]) fputc (QSTAT_DELIM, f); } fputc ('\n', f); } static void quake_save_info (FILE *f, struct server *s) { struct player *p; GSList *list; if (!s->name && !s->map && !s->players && !s->info && s->ping < 0) return; fprintf (f, "%ld %ld\n", s->refreshed, s->last_answer); switch (s->type) { /* POQS */ case Q1_SERVER: case H2_SERVER: fprintf (f, "%s" QSTAT_DELIM_STR "%s:%d" QSTAT_DELIM_STR "%s" QSTAT_DELIM_STR "%s:%d" QSTAT_DELIM_STR "0" QSTAT_DELIM_STR "%s" QSTAT_DELIM_STR "%d" QSTAT_DELIM_STR "%d" QSTAT_DELIM_STR "%d" QSTAT_DELIM_STR "%d\n", games[s->type].id, inet_ntoa (s->host->ip), s->port, (s->name)? s->name : "", inet_ntoa (s->host->ip), s->port, (s->map)? s->map : "", s->maxplayers, s->curplayers, s->ping, s->retries); break; /* QW, Q2 */ default: fprintf (f, "%s" QSTAT_DELIM_STR "%s:%d" QSTAT_DELIM_STR "%s" QSTAT_DELIM_STR "%s" QSTAT_DELIM_STR "%d" QSTAT_DELIM_STR "%d" QSTAT_DELIM_STR "%d" QSTAT_DELIM_STR "%d\n", games[s->type].id, inet_ntoa (s->host->ip), s->port, (s->name)? s->name : "", (s->map)? s->map : "", s->maxplayers, s->curplayers, s->ping, s->retries); break; } /* switch (s->type) */ quake_save_server_rules (f, s); if (default_save_plrinfo) { for (list = s->players; list; list = list->next) { p = (struct player *) list->data; switch (s->type) { /* POQS */ case Q1_SERVER: case H2_SERVER: fprintf (f, "0" QSTAT_DELIM_STR "%s" QSTAT_DELIM_STR QSTAT_DELIM_STR "%d" QSTAT_DELIM_STR "%d" QSTAT_DELIM_STR "%d" QSTAT_DELIM_STR "%d\n", (p->name)? p->name : "", p->frags, p->time, p->shirt, p->pants); break; /* QW */ case QW_SERVER: case HW_SERVER: fprintf (f, "0" QSTAT_DELIM_STR "%s" QSTAT_DELIM_STR "%d" QSTAT_DELIM_STR "%d" QSTAT_DELIM_STR "%d" QSTAT_DELIM_STR "%d" QSTAT_DELIM_STR "%d" QSTAT_DELIM_STR "%s\n", (p->name)? p->name : "", p->frags, p->time, p->shirt, p->pants, p->ping, (p->skin)? p->skin : ""); break; case UN_SERVER: case UT2_SERVER: case UT2004_SERVER: case RUNE_SERVER: case POSTAL2_SERVER: case AAO_SERVER: fprintf (f, "%s" QSTAT_DELIM_STR "%d" QSTAT_DELIM_STR "%d" QSTAT_DELIM_STR "%d" QSTAT_DELIM_STR "%s" QSTAT_DELIM_STR "%s" QSTAT_DELIM_STR "\n", (p->name)? p->name : "", p->frags, p->ping, p->pants, (p->skin)? p->skin : "", (p->model)? p->model : ""); break; /* Q2, etc... */ case T2_SERVER: fprintf (f, "%s" QSTAT_DELIM_STR "%d" QSTAT_DELIM_STR "%d" QSTAT_DELIM_STR "%s" QSTAT_DELIM_STR "%s" QSTAT_DELIM_STR "\n", //tribe tag not supported yet (p->name)? p->name : "", p->frags, 0, // team number not supported yet "x", // team name not supported yet (p->model)? p->model : ""); // player_type break; case DESCENT3_SERVER: fprintf (f, "%s" QSTAT_DELIM_STR "%d" QSTAT_DELIM_STR "%d" QSTAT_DELIM_STR "%d" QSTAT_DELIM_STR "\n", p->name?p->name:"", p->frags, 0, // deaths p->ping); break; case Q4_SERVER: fprintf (f, "%s" QSTAT_DELIM_STR "%d" QSTAT_DELIM_STR "%d" QSTAT_DELIM_STR "%s\n", (p->name)? p->name : "", p->frags, p->ping, p->model?p->model:"0"); break; case HL_SERVER: case HL_SERVER_OLD: case HL2_SERVER: fprintf (f, "%s" QSTAT_DELIM_STR "%d" QSTAT_DELIM_STR "%d\n", (p->name)? p->name : "", p->frags, p->time); break; default: fprintf (f, "%s" QSTAT_DELIM_STR "%d" QSTAT_DELIM_STR "%d\n", (p->name)? p->name : "", p->frags, p->ping); break; } /* switch (s->type) */ } /* for (list = s->players ... */ } /* if (default_save_plrinfo) */ fputc ('\n', f); } // fetch additional arguments when launching server of type 'type' and it's // game matches 'gamestring' // returns a newly-allocated array of strings. Use g_strfreev() to free it. // TODO use struct server instead of char* to be able to match any variable char **get_custom_arguments(enum server_type type, const char *gamestring) { struct game *g = &games[type]; char *arg = NULL; int j; char conf[15]; char *token[2]; int n; char ** ret = NULL; GSList *temp; if(!gamestring) return NULL; temp = g_slist_nth(g->custom_args, 0); j = 0; while (temp) { g_snprintf (conf, 15, "custom_arg%d", j); arg = g_strdup((char *) temp->data); n = tokenize (arg, token, 2, ","); if(!(strcasecmp(token[0],gamestring))) { ret = g_strsplit(token[1]," ",0); debug(1, "found entry for:%s. Returning argument:%s\n",gamestring,token[1]); g_free(arg); return ret; } temp = g_slist_next(temp); } debug(1, "get_custom_arguments: Didn't find an entry for %s",gamestring); g_free(arg); return NULL; } /** map functions */ static void quake_init_maps(enum server_type type) { struct quake_private* pd = NULL; pd = (struct quake_private*)games[type].pd; g_return_if_fail(pd!=NULL); q3_clear_maps(pd->maphash); // important to avoid memleak when called second time pd->maphash = q3_init_maphash(); findquakemaps(pd->maphash,games[type].real_dir); if(games[type].real_home && access(games[type].real_home, R_OK) == 0) { findquakemaps(pd->maphash,games[type].real_home); } } static void q3_init_maps(enum server_type type) { struct quake_private* pd = NULL; pd = (struct quake_private*)games[type].pd; g_return_if_fail(pd!=NULL); q3_clear_maps(pd->maphash); // important to avoid memleak when called second time pd->maphash = q3_init_maphash(); findq3maps(pd->maphash,games[type].real_dir); if(games[type].real_home && access(games[type].real_home, R_OK) == 0) { findq3maps(pd->maphash,games[type].real_home); } } static void doom3_init_maps(enum server_type type) { struct quake_private* pd = NULL; pd = (struct quake_private*)games[type].pd; g_return_if_fail(pd!=NULL); q3_clear_maps(pd->maphash); // important to avoid memleak when called second time pd->maphash = q3_init_maphash(); finddoom3maps(pd->maphash,games[type].real_dir); if(games[type].real_home && access(games[type].real_home, R_OK) == 0) { finddoom3maps(pd->maphash, games[type].real_home); } } static void quake4_init_maps(enum server_type type) { struct quake_private* pd = NULL; pd = (struct quake_private*)games[type].pd; g_return_if_fail(pd!=NULL); q3_clear_maps(pd->maphash); // important to avoid memleak when called second time pd->maphash = q3_init_maphash(); findquake4maps(pd->maphash,games[type].real_dir); if(games[type].real_home && access(games[type].real_home, R_OK) == 0) { findquake4maps(pd->maphash, games[type].real_home); } } static void unreal_init_maps(enum server_type type) { struct unreal_private* pd = NULL; pd = (struct unreal_private*)games[type].pd; g_return_if_fail(pd!=NULL); ut_clear_maps(pd->maphash); pd->maphash = ut_init_maphash(); findutmaps_dir(pd->maphash,games[type].real_dir,pd->suffix); if(games[type].real_home && access(games[type].real_home, R_OK) == 0) { findutmaps_dir(pd->maphash,games[type].real_home,pd->suffix); } } static gboolean quake_has_map(struct server* s) { struct quake_private* pd = NULL; GHashTable* hash = NULL; g_return_val_if_fail(s!=NULL,TRUE); pd = (struct quake_private*)games[s->type].pd; g_return_val_if_fail(pd!=NULL,TRUE); hash = (GHashTable*)pd->maphash; if(!hash) return TRUE; if(!s->map) return FALSE; return q3_lookup_map(hash,s->map); } static gboolean doom3_has_map(struct server* s) { struct quake_private* pd = NULL; GHashTable* hash = NULL; g_return_val_if_fail(s!=NULL,TRUE); pd = (struct quake_private*)games[s->type].pd; g_return_val_if_fail(pd!=NULL,TRUE); hash = (GHashTable*)pd->maphash; if(!hash) return TRUE; if(!s->map) return FALSE; return doom3_lookup_map(hash,s->map); } static gboolean quake4_has_map(struct server* s) { return doom3_has_map(s); } static size_t q3_get_mapshot(struct server* s, guchar** buf) { struct quake_private* pd = NULL; GHashTable* hash = NULL; g_return_val_if_fail(s!=NULL,TRUE); pd = (struct quake_private*)games[s->type].pd; g_return_val_if_fail(pd!=NULL,TRUE); hash = (GHashTable*)pd->maphash; if(!hash) return TRUE; if(!s->map) return FALSE; return q3_lookup_mapshot(hash,s->map, buf); } static size_t doom3_get_mapshot(struct server* s, guchar** buf) { struct quake_private* pd = NULL; GHashTable* hash = NULL; g_return_val_if_fail(s!=NULL,TRUE); pd = (struct quake_private*)games[s->type].pd; g_return_val_if_fail(pd!=NULL,TRUE); hash = (GHashTable*)pd->maphash; if(!hash) return TRUE; if(!s->map) return FALSE; return doom3_lookup_mapshot(hash,s->map, buf); } static size_t quake4_get_mapshot(struct server* s, guchar** buf) { return doom3_get_mapshot(s, buf); } static gboolean unreal_has_map(struct server* s) { struct unreal_private* pd = NULL; GHashTable* hash = NULL; g_return_val_if_fail(s!=NULL,TRUE); pd = (struct unreal_private*)games[s->type].pd; g_return_val_if_fail(pd!=NULL,TRUE); hash = (GHashTable*)pd->maphash; if(!hash) return TRUE; if(!s->map) return FALSE; return ut_lookup_map(hash,s->map); } // vim: sw=2 xqf-1.0.5/src/game.h0000644002404400000620000001143710415666670011122 00000000000000/* XQF - Quake server browser and launcher * Copyright (C) 1998-2000 Roman Pozlevich * * 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 */ #ifndef __GAME_H__ #define __GAME_H__ #include #include #include #include "xqf.h" #include "launch.h" #include "pixmaps.h" // game->flags enum { GAME_CONNECT = 0x0001, GAME_RECORD = 0x0002, GAME_SPECTATE = 0x0004, GAME_PASSWORD = 0x0008, GAME_RCON = 0x0010, GAME_ADMIN = 0x0020, GAME_QUAKE1_PLAYER_COLORS = 0x0100, GAME_QUAKE1_SKIN = 0x0200, GAME_QUAKE3_MASTERPROTOCOL = 0x0400, // master server protocol version is in games_data["masterprotocol"] GAME_LAUNCH_HOSTPORT = 0x0800, // use hostport rule as port when launching GAME_MASTER_CDKEY = 0x1000, // master server requires CD key GAME_Q3COLORS = 0x2000, // Q3 color codes GAME_MASTER_STEAM = 0x4000, // server side filter }; struct game { enum server_type type; unsigned long flags; char *name; unsigned short default_port; unsigned short default_master_port; char *id; char *qstat_str; char *qstat_option; char *qstat_master_option; const char* icon; // xpm symbol name struct pixmap *pix; struct player * (*parse_player) (char *tokens[], int num, struct server *s); void (*parse_server) (char *tokens[], int num, struct server *s); void (*analyze_serverinfo) (struct server *s); int (*config_is_valid) (struct server *s); int (*write_config) (const struct condef *con); int (*exec_client) (const struct condef *con, int forkit); /** \brief find a list of custom config files * * this->main_mods as well as mod directories inside * this->real_home and dir will be scanned * @param this pointer to game * @param dir full path to game directory or NULL to use this->real_dir * @param mod which mod * @return list of found config files */ GList * (*custom_cfgs) (struct game* this, const char *dir, const char *mod); void (*save_info) (FILE *f, struct server *s); /* map functions */ /** determine installed maps, destroys previous data */ void (*init_maps)(enum server_type); /** return true if s->map is installed, false otherwise */ gboolean (*has_map)(struct server* s); /** acquire image data, function allocates space in buf, returns size. buf * must be freed by caller */ size_t (*get_mapshot)(struct server* s, guchar** buf); char *arch_identifier; enum CPU (*identify_cpu) (struct server *s, const char *versionstr); enum OS (*identify_os) (struct server *s, char *versionstr); char *cmd; char *dir; char *real_dir; /** called when either cmd or dir have changed. Also on xqf startup */ void (*cmd_or_dir_changed)(struct game* g); /** load preferences from config */ void (*prefs_load)(struct game* g); /** sync preference dialog to config */ void (*update_prefs)(struct game* g); /** built in default game specific home directory */ char *default_home; /** tilde expanded game specific home directory */ char *real_home; /** NULL terminated list of main mods (eg baseq3 for q3)*/ char** main_mod; /** NULL terminated list of commands to search in $PATH for suggestion */ char** command; /** NULL terminated list attributes and keys. used for filling games_data */ char** attributes; char *game_cfg; GData *games_data; GSList *custom_args; /** game specific private data */ void *pd; }; extern struct game games[]; extern enum server_type id2type (const char *id); extern const char *type2id (enum server_type type); extern GtkWidget *game_pixmap_with_label (enum server_type type); // retreive game specific value that belongs to key, do not free return value! const char* game_get_attribute(enum server_type type, const char* key); // set game specific key/value pair, value is _not_ copied but will be freed internally const char* game_set_attribute(enum server_type type, const char* key, char* value); // set game specific key/value pair, value is _not_ copied and will not be freed internally const char* game_set_attribute_const(enum server_type type, const char* attr, const char* value); void init_games(void); void games_done(void); #endif /* __GAME_H__ */ xqf-1.0.5/src/Makefile.am0000644002404400000620000001044510520653451012060 00000000000000SUBDIRS = xpm zip tga localedir = $(datadir)/locale INCLUDES = -I$(top_srcdir)/intl \ -DLOCALEDIR=\"$(localedir)\" \ -DPACKAGE_DATA_DIR=\"$(pkgdatadir)\" \ -DPIXMAPSDIR=\"$(datadir)/pixmaps\" \ $(GTK_CFLAGS) \ $(QSTAT23) \ $(DEBUG) \ $(COMPRESSION) \ $(GDK_PIXBUF_CFLAGS) \ $(PACKAGE_CFLAGS) \ $(OLD_GTK_SUPPORT) qstatcfgdir = $(pkgdatadir) qstatcfg_DATA = qstat.cfg EXTRA_DIST = qstat.cfg games.xml games.c $(noinst_SCRIPTS) xqf.map bin_PROGRAMS = xqf if BUILD_XQFRCON bin_PROGRAMS += xqf-rcon endif EXTRA_PROGRAMS = gamesxml2c xqf_LDADD = $(INTLLIBS) \ $(top_builddir)/src/zip/libunzip.a \ $(top_builddir)/src/tga/libtga.a \ $(GTK_LIBS) \ $(GEOIP_LIB) \ $(PACKAGE_LIBS) \ $(GDK_PIXBUF_LIBS) \ -lz xqf_LDFLAGS = -Wl,-rpath,$(pkglibdir) -Wl,--export-dynamic -Wl,--version-script=$(top_srcdir)/src/xqf.map # we need to specify all deps manually due to dummy libs xqf_DEPENDENCIES = \ $(top_builddir)/src/zip/libunzip.a \ $(top_builddir)/src/tga/libtga.a xqf_rcon_LDADD = @INTLLIBS@ $(GLIB_LIBS) $(XQFRCON_LIBS) @PACKAGE_LIBS@ xqf_rcon_SOURCES = \ rcon.c rcon.h \ debug.c debug.h \ utils.c utils.h xqf_rcon_CFLAGS = -DRCON_STANDALONE $(GLIB_CFLAGS) $(OLD_GTK_SUPPORT) xqf_SOURCES = \ addmaster.c \ addserver.c \ config.c \ country-filter.c \ debug.c \ dialogs.c \ dns.c \ filter.c \ flt-player.c \ game.c \ history.c \ host.c \ launch.c \ menus.c \ pixmaps.c \ pref.c \ psearch.c \ rc.c \ rcon.c \ server.c \ skin.c \ skin_pcx.c \ sort.c \ source.c \ srv-info.c \ srv-list.c \ srv-prop.c \ stat.c \ statistics.c \ trayicon.c \ utils.c \ xqf.c \ xqf-ui.c \ xutils.c \ zipped.c \ redial.c \ q3maps.c \ utmaps.c \ loadpixmap.c \ splash.c \ scripts.c \ addmaster.h \ addserver.h \ config.h \ country-filter.h \ debug.h \ dialogs.h \ dns.h \ filter.h \ flt-player.h \ game.h \ history.h \ host.h \ launch.h \ menus.h \ pixmaps.h \ pref.h \ psearch.h \ quake2_pal.h \ quake_pal.h \ rc.h \ rcon.h \ server.h \ skin.h \ skin_pcx.h \ sort.h \ source.h \ srv-info.h \ srv-list.h \ srv-prop.h \ stat.h \ statistics.h \ trayicon.h \ utils.h \ xqf-ui.h \ xqf.h \ xutils.h \ zipped.h \ redial.h \ q3maps.h \ utmaps.h \ i18n.h \ loadpixmap.h \ splash.h \ scripts.h noinst_SCRIPTS = gensyms.pl noinst_PROGRAMS = test_utils test_utils_SOURCES = test_utils.c \ utils.c utils.h \ debug.c debug.h test_utils_LDADD = $(xqf_LDADD) # it's only temporary, so ... gamesxml2c_LDFLAGS = $(shell xml2-config --libs) gamesxml2c_CFLAGS = $(shell xml2-config --cflags) pkglib_PROGRAMS = if DUMMY_LIBGEOIP pkglib_PROGRAMS += libxqf_dummy_GeoIP.so.0 xqf_DEPENDENCIES += libxqf_dummy_GeoIP.so endif if DUMMY_LIBGDKPIXBUF pkglib_PROGRAMS += libxqf_dummy_gdk_pixbuf.so.0 xqf_DEPENDENCIES += libxqf_dummy_gdk_pixbuf.so endif libxqf_dummy_gdk_pixbuf.c: $(top_srcdir)/src/gensyms.pl -x gdk_pixbuf_new_from_file,gdk_pixbuf_render_pixmap_and_mask,gdk_pixbuf_unref $(DUMMY_LIBGDKPIXBUF_ORIG) -o $(top_srcdir)/src/libxqf_dummy_gdk_pixbuf.c || rm $(top_srcdir)/src/libxqf_dummy_gdk_pixbuf.c test -s $(top_srcdir)/src/libxqf_dummy_gdk_pixbuf.c nodist_libxqf_dummy_gdk_pixbuf_so_0_SOURCES = libxqf_dummy_gdk_pixbuf.c libxqf_dummy_gdk_pixbuf_so_0_SOURCES = libxqf_dummy_gdk_pixbuf_stubs.c libxqf_dummy_gdk_pixbuf_so_0_LDFLAGS = -nostdlib -shared -Wl,-f,$(DUMMY_LIBGDKPIXBUF_SONAME) -Wl,-soname,libxqf_dummy_gdk_pixbuf.so.0 libxqf_dummy_gdk_pixbuf_so_0_CFLAGS = -fPIC -DPIC libxqf_dummy_gdk_pixbuf.so: libxqf_dummy_gdk_pixbuf.so.0 rm -f $@ $(LN_S) $< $@ libxqf_dummy_GeoIP.c: $(top_srcdir)/src/gensyms.pl -x GeoIP_new,GeoIP_open $(DUMMY_LIBGEOIP_ORIG) -o $(top_srcdir)/src/libxqf_dummy_GeoIP.c || rm $(top_srcdir)/src/libxqf_dummy_GeoIP.c test -s $(top_srcdir)/src/libxqf_dummy_GeoIP.c nodist_libxqf_dummy_GeoIP_so_0_SOURCES = libxqf_dummy_GeoIP.c libxqf_dummy_GeoIP_so_0_SOURCES = libxqf_dummy_GeoIP_stubs.c libxqf_dummy_GeoIP_so_0_LDFLAGS = -nostdlib -shared -Wl,-f,$(DUMMY_LIBGEOIP_SONAME) -Wl,-soname,libxqf_dummy_GeoIP.so.0 libxqf_dummy_GeoIP_so_0_CFLAGS = -fPIC -DPIC libxqf_dummy_GeoIP.so: libxqf_dummy_GeoIP.so.0 rm -f $@ $(LN_S) $< $@ CLEANFILES = \ $(nodist_libxqf_dummy_gdk_pixbuf_so_0_SOURCES) \ $(nodist_libxqf_dummy_GeoIP_so_0_SOURCES) \ libxqf_dummy_GeoIP.so \ libxqf_dummy_gdk_pixbuf.so gamelist: gamesxml2c $(top_builddir)/src/gamesxml2c $(top_srcdir)/src/games.xml > $(top_srcdir)/src/games.c .PHONY: gamelist xqf-1.0.5/src/Makefile.in0000644002404400000620000014504310523105434012070 00000000000000# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : bin_PROGRAMS = xqf$(EXEEXT) $(am__EXEEXT_1) @BUILD_XQFRCON_TRUE@am__append_1 = xqf-rcon EXTRA_PROGRAMS = gamesxml2c$(EXEEXT) noinst_PROGRAMS = test_utils$(EXEEXT) pkglib_PROGRAMS = $(am__EXEEXT_2) $(am__EXEEXT_3) @DUMMY_LIBGEOIP_TRUE@am__append_2 = libxqf_dummy_GeoIP.so.0 @DUMMY_LIBGEOIP_TRUE@am__append_3 = libxqf_dummy_GeoIP.so @DUMMY_LIBGDKPIXBUF_TRUE@am__append_4 = libxqf_dummy_gdk_pixbuf.so.0 @DUMMY_LIBGDKPIXBUF_TRUE@am__append_5 = libxqf_dummy_gdk_pixbuf.so subdir = src DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/gnuconfig.h.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = gnuconfig.h CONFIG_CLEAN_FILES = @BUILD_XQFRCON_TRUE@am__EXEEXT_1 = xqf-rcon$(EXEEXT) am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkglibdir)" \ "$(DESTDIR)$(qstatcfgdir)" binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) @DUMMY_LIBGEOIP_TRUE@am__EXEEXT_2 = libxqf_dummy_GeoIP.so.0$(EXEEXT) @DUMMY_LIBGDKPIXBUF_TRUE@am__EXEEXT_3 = libxqf_dummy_gdk_pixbuf.so.0$(EXEEXT) pkglibPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS) $(pkglib_PROGRAMS) gamesxml2c_SOURCES = gamesxml2c.c gamesxml2c_OBJECTS = gamesxml2c-gamesxml2c.$(OBJEXT) gamesxml2c_LDADD = $(LDADD) am_libxqf_dummy_GeoIP_so_0_OBJECTS = \ libxqf_dummy_GeoIP_so_0-libxqf_dummy_GeoIP_stubs.$(OBJEXT) nodist_libxqf_dummy_GeoIP_so_0_OBJECTS = \ libxqf_dummy_GeoIP_so_0-libxqf_dummy_GeoIP.$(OBJEXT) libxqf_dummy_GeoIP_so_0_OBJECTS = \ $(am_libxqf_dummy_GeoIP_so_0_OBJECTS) \ $(nodist_libxqf_dummy_GeoIP_so_0_OBJECTS) libxqf_dummy_GeoIP_so_0_LDADD = $(LDADD) am_libxqf_dummy_gdk_pixbuf_so_0_OBJECTS = libxqf_dummy_gdk_pixbuf_so_0-libxqf_dummy_gdk_pixbuf_stubs.$(OBJEXT) nodist_libxqf_dummy_gdk_pixbuf_so_0_OBJECTS = libxqf_dummy_gdk_pixbuf_so_0-libxqf_dummy_gdk_pixbuf.$(OBJEXT) libxqf_dummy_gdk_pixbuf_so_0_OBJECTS = \ $(am_libxqf_dummy_gdk_pixbuf_so_0_OBJECTS) \ $(nodist_libxqf_dummy_gdk_pixbuf_so_0_OBJECTS) libxqf_dummy_gdk_pixbuf_so_0_LDADD = $(LDADD) am_test_utils_OBJECTS = test_utils.$(OBJEXT) utils.$(OBJEXT) \ debug.$(OBJEXT) test_utils_OBJECTS = $(am_test_utils_OBJECTS) am__DEPENDENCIES_1 = am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) \ $(top_builddir)/src/zip/libunzip.a \ $(top_builddir)/src/tga/libtga.a $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) test_utils_DEPENDENCIES = $(am__DEPENDENCIES_2) am_xqf_OBJECTS = addmaster.$(OBJEXT) addserver.$(OBJEXT) \ config.$(OBJEXT) country-filter.$(OBJEXT) debug.$(OBJEXT) \ dialogs.$(OBJEXT) dns.$(OBJEXT) filter.$(OBJEXT) \ flt-player.$(OBJEXT) game.$(OBJEXT) history.$(OBJEXT) \ host.$(OBJEXT) launch.$(OBJEXT) menus.$(OBJEXT) \ pixmaps.$(OBJEXT) pref.$(OBJEXT) psearch.$(OBJEXT) \ rc.$(OBJEXT) rcon.$(OBJEXT) server.$(OBJEXT) skin.$(OBJEXT) \ skin_pcx.$(OBJEXT) sort.$(OBJEXT) source.$(OBJEXT) \ srv-info.$(OBJEXT) srv-list.$(OBJEXT) srv-prop.$(OBJEXT) \ stat.$(OBJEXT) statistics.$(OBJEXT) trayicon.$(OBJEXT) \ utils.$(OBJEXT) xqf.$(OBJEXT) xqf-ui.$(OBJEXT) \ xutils.$(OBJEXT) zipped.$(OBJEXT) redial.$(OBJEXT) \ q3maps.$(OBJEXT) utmaps.$(OBJEXT) loadpixmap.$(OBJEXT) \ splash.$(OBJEXT) scripts.$(OBJEXT) xqf_OBJECTS = $(am_xqf_OBJECTS) am_xqf_rcon_OBJECTS = xqf_rcon-rcon.$(OBJEXT) xqf_rcon-debug.$(OBJEXT) \ xqf_rcon-utils.$(OBJEXT) xqf_rcon_OBJECTS = $(am_xqf_rcon_OBJECTS) xqf_rcon_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) SCRIPTS = $(noinst_SCRIPTS) DEFAULT_INCLUDES = -I. -I$(srcdir) -I. depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = gamesxml2c.c $(libxqf_dummy_GeoIP_so_0_SOURCES) \ $(nodist_libxqf_dummy_GeoIP_so_0_SOURCES) \ $(libxqf_dummy_gdk_pixbuf_so_0_SOURCES) \ $(nodist_libxqf_dummy_gdk_pixbuf_so_0_SOURCES) \ $(test_utils_SOURCES) $(xqf_SOURCES) $(xqf_rcon_SOURCES) DIST_SOURCES = gamesxml2c.c $(libxqf_dummy_GeoIP_so_0_SOURCES) \ $(libxqf_dummy_gdk_pixbuf_so_0_SOURCES) $(test_utils_SOURCES) \ $(xqf_SOURCES) $(xqf_rcon_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-exec-recursive install-info-recursive \ install-recursive installcheck-recursive installdirs-recursive \ pdf-recursive ps-recursive uninstall-info-recursive \ uninstall-recursive am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; qstatcfgDATA_INSTALL = $(INSTALL_DATA) DATA = $(qstatcfg_DATA) ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_XQFRCON_FALSE = @BUILD_XQFRCON_FALSE@ BUILD_XQFRCON_TRUE = @BUILD_XQFRCON_TRUE@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COMPRESSION = @COMPRESSION@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEBUG = @DEBUG@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DUMMY_LIBGDKPIXBUF_FALSE = @DUMMY_LIBGDKPIXBUF_FALSE@ DUMMY_LIBGDKPIXBUF_ORIG = @DUMMY_LIBGDKPIXBUF_ORIG@ DUMMY_LIBGDKPIXBUF_SONAME = @DUMMY_LIBGDKPIXBUF_SONAME@ DUMMY_LIBGDKPIXBUF_TRUE = @DUMMY_LIBGDKPIXBUF_TRUE@ DUMMY_LIBGEOIP_FALSE = @DUMMY_LIBGEOIP_FALSE@ DUMMY_LIBGEOIP_ORIG = @DUMMY_LIBGEOIP_ORIG@ DUMMY_LIBGEOIP_SONAME = @DUMMY_LIBGEOIP_SONAME@ DUMMY_LIBGEOIP_TRUE = @DUMMY_LIBGEOIP_TRUE@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GDK_PIXBUF_CFLAGS = @GDK_PIXBUF_CFLAGS@ GDK_PIXBUF_CONFIG = @GDK_PIXBUF_CONFIG@ GDK_PIXBUF_LIBS = @GDK_PIXBUF_LIBS@ GEOIP_LIB = @GEOIP_LIB@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_CONFIG = @GLIB_CONFIG@ GLIB_LIBS = @GLIB_LIBS@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_CONFIG = @GTK_CONFIG@ GTK_LIBS = @GTK_LIBS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@ INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@ INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_ICONV = @INTLTOOL_ICONV@ INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@ INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_MSGFMT = @INTLTOOL_MSGFMT@ INTLTOOL_MSGMERGE = @INTLTOOL_MSGMERGE@ INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@ INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@ INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@ INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@ INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@ INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@ INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@ INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@ INTLTOOL_XGETTEXT = @INTLTOOL_XGETTEXT@ INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@ INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MSGFMT = @MSGFMT@ OBJEXT = @OBJEXT@ OLD_GTK_SUPPORT = @OLD_GTK_SUPPORT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_CFLAGS = @PACKAGE_CFLAGS@ PACKAGE_LIBS = @PACKAGE_LIBS@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ QSTATEXEC = @QSTATEXEC@ RANLIB = @RANLIB@ RELEASE = @RELEASE@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ XQFRCON_LIBS = @XQFRCON_LIBS@ ac_ct_CC = @ac_ct_CC@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ datadir = @datadir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ SUBDIRS = xpm zip tga localedir = $(datadir)/locale INCLUDES = -I$(top_srcdir)/intl \ -DLOCALEDIR=\"$(localedir)\" \ -DPACKAGE_DATA_DIR=\"$(pkgdatadir)\" \ -DPIXMAPSDIR=\"$(datadir)/pixmaps\" \ $(GTK_CFLAGS) \ $(QSTAT23) \ $(DEBUG) \ $(COMPRESSION) \ $(GDK_PIXBUF_CFLAGS) \ $(PACKAGE_CFLAGS) \ $(OLD_GTK_SUPPORT) qstatcfgdir = $(pkgdatadir) qstatcfg_DATA = qstat.cfg EXTRA_DIST = qstat.cfg games.xml games.c $(noinst_SCRIPTS) xqf.map xqf_LDADD = $(INTLLIBS) \ $(top_builddir)/src/zip/libunzip.a \ $(top_builddir)/src/tga/libtga.a \ $(GTK_LIBS) \ $(GEOIP_LIB) \ $(PACKAGE_LIBS) \ $(GDK_PIXBUF_LIBS) \ -lz xqf_LDFLAGS = -Wl,-rpath,$(pkglibdir) -Wl,--export-dynamic -Wl,--version-script=$(top_srcdir)/src/xqf.map # we need to specify all deps manually due to dummy libs xqf_DEPENDENCIES = $(top_builddir)/src/zip/libunzip.a \ $(top_builddir)/src/tga/libtga.a $(am__append_3) \ $(am__append_5) xqf_rcon_LDADD = @INTLLIBS@ $(GLIB_LIBS) $(XQFRCON_LIBS) @PACKAGE_LIBS@ xqf_rcon_SOURCES = \ rcon.c rcon.h \ debug.c debug.h \ utils.c utils.h xqf_rcon_CFLAGS = -DRCON_STANDALONE $(GLIB_CFLAGS) $(OLD_GTK_SUPPORT) xqf_SOURCES = \ addmaster.c \ addserver.c \ config.c \ country-filter.c \ debug.c \ dialogs.c \ dns.c \ filter.c \ flt-player.c \ game.c \ history.c \ host.c \ launch.c \ menus.c \ pixmaps.c \ pref.c \ psearch.c \ rc.c \ rcon.c \ server.c \ skin.c \ skin_pcx.c \ sort.c \ source.c \ srv-info.c \ srv-list.c \ srv-prop.c \ stat.c \ statistics.c \ trayicon.c \ utils.c \ xqf.c \ xqf-ui.c \ xutils.c \ zipped.c \ redial.c \ q3maps.c \ utmaps.c \ loadpixmap.c \ splash.c \ scripts.c \ addmaster.h \ addserver.h \ config.h \ country-filter.h \ debug.h \ dialogs.h \ dns.h \ filter.h \ flt-player.h \ game.h \ history.h \ host.h \ launch.h \ menus.h \ pixmaps.h \ pref.h \ psearch.h \ quake2_pal.h \ quake_pal.h \ rc.h \ rcon.h \ server.h \ skin.h \ skin_pcx.h \ sort.h \ source.h \ srv-info.h \ srv-list.h \ srv-prop.h \ stat.h \ statistics.h \ trayicon.h \ utils.h \ xqf-ui.h \ xqf.h \ xutils.h \ zipped.h \ redial.h \ q3maps.h \ utmaps.h \ i18n.h \ loadpixmap.h \ splash.h \ scripts.h noinst_SCRIPTS = gensyms.pl test_utils_SOURCES = test_utils.c \ utils.c utils.h \ debug.c debug.h test_utils_LDADD = $(xqf_LDADD) # it's only temporary, so ... gamesxml2c_LDFLAGS = $(shell xml2-config --libs) gamesxml2c_CFLAGS = $(shell xml2-config --cflags) nodist_libxqf_dummy_gdk_pixbuf_so_0_SOURCES = libxqf_dummy_gdk_pixbuf.c libxqf_dummy_gdk_pixbuf_so_0_SOURCES = libxqf_dummy_gdk_pixbuf_stubs.c libxqf_dummy_gdk_pixbuf_so_0_LDFLAGS = -nostdlib -shared -Wl,-f,$(DUMMY_LIBGDKPIXBUF_SONAME) -Wl,-soname,libxqf_dummy_gdk_pixbuf.so.0 libxqf_dummy_gdk_pixbuf_so_0_CFLAGS = -fPIC -DPIC nodist_libxqf_dummy_GeoIP_so_0_SOURCES = libxqf_dummy_GeoIP.c libxqf_dummy_GeoIP_so_0_SOURCES = libxqf_dummy_GeoIP_stubs.c libxqf_dummy_GeoIP_so_0_LDFLAGS = -nostdlib -shared -Wl,-f,$(DUMMY_LIBGEOIP_SONAME) -Wl,-soname,libxqf_dummy_GeoIP.so.0 libxqf_dummy_GeoIP_so_0_CFLAGS = -fPIC -DPIC CLEANFILES = \ $(nodist_libxqf_dummy_gdk_pixbuf_so_0_SOURCES) \ $(nodist_libxqf_dummy_GeoIP_so_0_SOURCES) \ libxqf_dummy_GeoIP.so \ libxqf_dummy_gdk_pixbuf.so all: gnuconfig.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu src/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh gnuconfig.h: stamp-h1 @if test ! -f $@; then \ rm -f stamp-h1; \ $(MAKE) stamp-h1; \ else :; fi stamp-h1: $(srcdir)/gnuconfig.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status src/gnuconfig.h $(srcdir)/gnuconfig.h.in: $(am__configure_deps) cd $(top_srcdir) && $(AUTOHEADER) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f gnuconfig.h stamp-h1 install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; for p in $$list; do \ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ if test -f $$p \ ; then \ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ else :; fi; \ done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; for p in $$list; do \ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ rm -f "$(DESTDIR)$(bindir)/$$f"; \ done clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) clean-noinstPROGRAMS: -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS) install-pkglibPROGRAMS: $(pkglib_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(pkglibdir)" || $(mkdir_p) "$(DESTDIR)$(pkglibdir)" @list='$(pkglib_PROGRAMS)'; for p in $$list; do \ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ if test -f $$p \ ; then \ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ echo " $(INSTALL_PROGRAM_ENV) $(pkglibPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(pkglibdir)/$$f'"; \ $(INSTALL_PROGRAM_ENV) $(pkglibPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(pkglibdir)/$$f" || exit 1; \ else :; fi; \ done uninstall-pkglibPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(pkglib_PROGRAMS)'; for p in $$list; do \ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ echo " rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \ rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \ done clean-pkglibPROGRAMS: -test -z "$(pkglib_PROGRAMS)" || rm -f $(pkglib_PROGRAMS) gamesxml2c$(EXEEXT): $(gamesxml2c_OBJECTS) $(gamesxml2c_DEPENDENCIES) @rm -f gamesxml2c$(EXEEXT) $(LINK) $(gamesxml2c_LDFLAGS) $(gamesxml2c_OBJECTS) $(gamesxml2c_LDADD) $(LIBS) libxqf_dummy_GeoIP.so.0$(EXEEXT): $(libxqf_dummy_GeoIP_so_0_OBJECTS) $(libxqf_dummy_GeoIP_so_0_DEPENDENCIES) @rm -f libxqf_dummy_GeoIP.so.0$(EXEEXT) $(LINK) $(libxqf_dummy_GeoIP_so_0_LDFLAGS) $(libxqf_dummy_GeoIP_so_0_OBJECTS) $(libxqf_dummy_GeoIP_so_0_LDADD) $(LIBS) libxqf_dummy_gdk_pixbuf.so.0$(EXEEXT): $(libxqf_dummy_gdk_pixbuf_so_0_OBJECTS) $(libxqf_dummy_gdk_pixbuf_so_0_DEPENDENCIES) @rm -f libxqf_dummy_gdk_pixbuf.so.0$(EXEEXT) $(LINK) $(libxqf_dummy_gdk_pixbuf_so_0_LDFLAGS) $(libxqf_dummy_gdk_pixbuf_so_0_OBJECTS) $(libxqf_dummy_gdk_pixbuf_so_0_LDADD) $(LIBS) test_utils$(EXEEXT): $(test_utils_OBJECTS) $(test_utils_DEPENDENCIES) @rm -f test_utils$(EXEEXT) $(LINK) $(test_utils_LDFLAGS) $(test_utils_OBJECTS) $(test_utils_LDADD) $(LIBS) xqf$(EXEEXT): $(xqf_OBJECTS) $(xqf_DEPENDENCIES) @rm -f xqf$(EXEEXT) $(LINK) $(xqf_LDFLAGS) $(xqf_OBJECTS) $(xqf_LDADD) $(LIBS) xqf-rcon$(EXEEXT): $(xqf_rcon_OBJECTS) $(xqf_rcon_DEPENDENCIES) @rm -f xqf-rcon$(EXEEXT) $(LINK) $(xqf_rcon_LDFLAGS) $(xqf_rcon_OBJECTS) $(xqf_rcon_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/addmaster.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/addserver.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/config.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/country-filter.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/debug.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dialogs.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dns.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/filter.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/flt-player.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/game.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gamesxml2c-gamesxml2c.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/history.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/host.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/launch.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxqf_dummy_GeoIP_so_0-libxqf_dummy_GeoIP.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxqf_dummy_GeoIP_so_0-libxqf_dummy_GeoIP_stubs.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxqf_dummy_gdk_pixbuf_so_0-libxqf_dummy_gdk_pixbuf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxqf_dummy_gdk_pixbuf_so_0-libxqf_dummy_gdk_pixbuf_stubs.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/loadpixmap.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/menus.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pixmaps.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pref.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/psearch.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/q3maps.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rcon.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/redial.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/scripts.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/server.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/skin.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/skin_pcx.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sort.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/source.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/splash.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/srv-info.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/srv-list.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/srv-prop.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stat.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/statistics.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_utils.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/trayicon.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utils.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utmaps.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xqf-ui.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xqf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xqf_rcon-debug.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xqf_rcon-rcon.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xqf_rcon-utils.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xutils.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zipped.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` gamesxml2c-gamesxml2c.o: gamesxml2c.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gamesxml2c_CFLAGS) $(CFLAGS) -MT gamesxml2c-gamesxml2c.o -MD -MP -MF "$(DEPDIR)/gamesxml2c-gamesxml2c.Tpo" -c -o gamesxml2c-gamesxml2c.o `test -f 'gamesxml2c.c' || echo '$(srcdir)/'`gamesxml2c.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/gamesxml2c-gamesxml2c.Tpo" "$(DEPDIR)/gamesxml2c-gamesxml2c.Po"; else rm -f "$(DEPDIR)/gamesxml2c-gamesxml2c.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gamesxml2c.c' object='gamesxml2c-gamesxml2c.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gamesxml2c_CFLAGS) $(CFLAGS) -c -o gamesxml2c-gamesxml2c.o `test -f 'gamesxml2c.c' || echo '$(srcdir)/'`gamesxml2c.c gamesxml2c-gamesxml2c.obj: gamesxml2c.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gamesxml2c_CFLAGS) $(CFLAGS) -MT gamesxml2c-gamesxml2c.obj -MD -MP -MF "$(DEPDIR)/gamesxml2c-gamesxml2c.Tpo" -c -o gamesxml2c-gamesxml2c.obj `if test -f 'gamesxml2c.c'; then $(CYGPATH_W) 'gamesxml2c.c'; else $(CYGPATH_W) '$(srcdir)/gamesxml2c.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/gamesxml2c-gamesxml2c.Tpo" "$(DEPDIR)/gamesxml2c-gamesxml2c.Po"; else rm -f "$(DEPDIR)/gamesxml2c-gamesxml2c.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gamesxml2c.c' object='gamesxml2c-gamesxml2c.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gamesxml2c_CFLAGS) $(CFLAGS) -c -o gamesxml2c-gamesxml2c.obj `if test -f 'gamesxml2c.c'; then $(CYGPATH_W) 'gamesxml2c.c'; else $(CYGPATH_W) '$(srcdir)/gamesxml2c.c'; fi` libxqf_dummy_GeoIP_so_0-libxqf_dummy_GeoIP_stubs.o: libxqf_dummy_GeoIP_stubs.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxqf_dummy_GeoIP_so_0_CFLAGS) $(CFLAGS) -MT libxqf_dummy_GeoIP_so_0-libxqf_dummy_GeoIP_stubs.o -MD -MP -MF "$(DEPDIR)/libxqf_dummy_GeoIP_so_0-libxqf_dummy_GeoIP_stubs.Tpo" -c -o libxqf_dummy_GeoIP_so_0-libxqf_dummy_GeoIP_stubs.o `test -f 'libxqf_dummy_GeoIP_stubs.c' || echo '$(srcdir)/'`libxqf_dummy_GeoIP_stubs.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libxqf_dummy_GeoIP_so_0-libxqf_dummy_GeoIP_stubs.Tpo" "$(DEPDIR)/libxqf_dummy_GeoIP_so_0-libxqf_dummy_GeoIP_stubs.Po"; else rm -f "$(DEPDIR)/libxqf_dummy_GeoIP_so_0-libxqf_dummy_GeoIP_stubs.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libxqf_dummy_GeoIP_stubs.c' object='libxqf_dummy_GeoIP_so_0-libxqf_dummy_GeoIP_stubs.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxqf_dummy_GeoIP_so_0_CFLAGS) $(CFLAGS) -c -o libxqf_dummy_GeoIP_so_0-libxqf_dummy_GeoIP_stubs.o `test -f 'libxqf_dummy_GeoIP_stubs.c' || echo '$(srcdir)/'`libxqf_dummy_GeoIP_stubs.c libxqf_dummy_GeoIP_so_0-libxqf_dummy_GeoIP_stubs.obj: libxqf_dummy_GeoIP_stubs.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxqf_dummy_GeoIP_so_0_CFLAGS) $(CFLAGS) -MT libxqf_dummy_GeoIP_so_0-libxqf_dummy_GeoIP_stubs.obj -MD -MP -MF "$(DEPDIR)/libxqf_dummy_GeoIP_so_0-libxqf_dummy_GeoIP_stubs.Tpo" -c -o libxqf_dummy_GeoIP_so_0-libxqf_dummy_GeoIP_stubs.obj `if test -f 'libxqf_dummy_GeoIP_stubs.c'; then $(CYGPATH_W) 'libxqf_dummy_GeoIP_stubs.c'; else $(CYGPATH_W) '$(srcdir)/libxqf_dummy_GeoIP_stubs.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libxqf_dummy_GeoIP_so_0-libxqf_dummy_GeoIP_stubs.Tpo" "$(DEPDIR)/libxqf_dummy_GeoIP_so_0-libxqf_dummy_GeoIP_stubs.Po"; else rm -f "$(DEPDIR)/libxqf_dummy_GeoIP_so_0-libxqf_dummy_GeoIP_stubs.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libxqf_dummy_GeoIP_stubs.c' object='libxqf_dummy_GeoIP_so_0-libxqf_dummy_GeoIP_stubs.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxqf_dummy_GeoIP_so_0_CFLAGS) $(CFLAGS) -c -o libxqf_dummy_GeoIP_so_0-libxqf_dummy_GeoIP_stubs.obj `if test -f 'libxqf_dummy_GeoIP_stubs.c'; then $(CYGPATH_W) 'libxqf_dummy_GeoIP_stubs.c'; else $(CYGPATH_W) '$(srcdir)/libxqf_dummy_GeoIP_stubs.c'; fi` libxqf_dummy_GeoIP_so_0-libxqf_dummy_GeoIP.o: libxqf_dummy_GeoIP.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxqf_dummy_GeoIP_so_0_CFLAGS) $(CFLAGS) -MT libxqf_dummy_GeoIP_so_0-libxqf_dummy_GeoIP.o -MD -MP -MF "$(DEPDIR)/libxqf_dummy_GeoIP_so_0-libxqf_dummy_GeoIP.Tpo" -c -o libxqf_dummy_GeoIP_so_0-libxqf_dummy_GeoIP.o `test -f 'libxqf_dummy_GeoIP.c' || echo '$(srcdir)/'`libxqf_dummy_GeoIP.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libxqf_dummy_GeoIP_so_0-libxqf_dummy_GeoIP.Tpo" "$(DEPDIR)/libxqf_dummy_GeoIP_so_0-libxqf_dummy_GeoIP.Po"; else rm -f "$(DEPDIR)/libxqf_dummy_GeoIP_so_0-libxqf_dummy_GeoIP.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libxqf_dummy_GeoIP.c' object='libxqf_dummy_GeoIP_so_0-libxqf_dummy_GeoIP.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxqf_dummy_GeoIP_so_0_CFLAGS) $(CFLAGS) -c -o libxqf_dummy_GeoIP_so_0-libxqf_dummy_GeoIP.o `test -f 'libxqf_dummy_GeoIP.c' || echo '$(srcdir)/'`libxqf_dummy_GeoIP.c libxqf_dummy_GeoIP_so_0-libxqf_dummy_GeoIP.obj: libxqf_dummy_GeoIP.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxqf_dummy_GeoIP_so_0_CFLAGS) $(CFLAGS) -MT libxqf_dummy_GeoIP_so_0-libxqf_dummy_GeoIP.obj -MD -MP -MF "$(DEPDIR)/libxqf_dummy_GeoIP_so_0-libxqf_dummy_GeoIP.Tpo" -c -o libxqf_dummy_GeoIP_so_0-libxqf_dummy_GeoIP.obj `if test -f 'libxqf_dummy_GeoIP.c'; then $(CYGPATH_W) 'libxqf_dummy_GeoIP.c'; else $(CYGPATH_W) '$(srcdir)/libxqf_dummy_GeoIP.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libxqf_dummy_GeoIP_so_0-libxqf_dummy_GeoIP.Tpo" "$(DEPDIR)/libxqf_dummy_GeoIP_so_0-libxqf_dummy_GeoIP.Po"; else rm -f "$(DEPDIR)/libxqf_dummy_GeoIP_so_0-libxqf_dummy_GeoIP.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libxqf_dummy_GeoIP.c' object='libxqf_dummy_GeoIP_so_0-libxqf_dummy_GeoIP.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxqf_dummy_GeoIP_so_0_CFLAGS) $(CFLAGS) -c -o libxqf_dummy_GeoIP_so_0-libxqf_dummy_GeoIP.obj `if test -f 'libxqf_dummy_GeoIP.c'; then $(CYGPATH_W) 'libxqf_dummy_GeoIP.c'; else $(CYGPATH_W) '$(srcdir)/libxqf_dummy_GeoIP.c'; fi` libxqf_dummy_gdk_pixbuf_so_0-libxqf_dummy_gdk_pixbuf_stubs.o: libxqf_dummy_gdk_pixbuf_stubs.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxqf_dummy_gdk_pixbuf_so_0_CFLAGS) $(CFLAGS) -MT libxqf_dummy_gdk_pixbuf_so_0-libxqf_dummy_gdk_pixbuf_stubs.o -MD -MP -MF "$(DEPDIR)/libxqf_dummy_gdk_pixbuf_so_0-libxqf_dummy_gdk_pixbuf_stubs.Tpo" -c -o libxqf_dummy_gdk_pixbuf_so_0-libxqf_dummy_gdk_pixbuf_stubs.o `test -f 'libxqf_dummy_gdk_pixbuf_stubs.c' || echo '$(srcdir)/'`libxqf_dummy_gdk_pixbuf_stubs.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libxqf_dummy_gdk_pixbuf_so_0-libxqf_dummy_gdk_pixbuf_stubs.Tpo" "$(DEPDIR)/libxqf_dummy_gdk_pixbuf_so_0-libxqf_dummy_gdk_pixbuf_stubs.Po"; else rm -f "$(DEPDIR)/libxqf_dummy_gdk_pixbuf_so_0-libxqf_dummy_gdk_pixbuf_stubs.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libxqf_dummy_gdk_pixbuf_stubs.c' object='libxqf_dummy_gdk_pixbuf_so_0-libxqf_dummy_gdk_pixbuf_stubs.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxqf_dummy_gdk_pixbuf_so_0_CFLAGS) $(CFLAGS) -c -o libxqf_dummy_gdk_pixbuf_so_0-libxqf_dummy_gdk_pixbuf_stubs.o `test -f 'libxqf_dummy_gdk_pixbuf_stubs.c' || echo '$(srcdir)/'`libxqf_dummy_gdk_pixbuf_stubs.c libxqf_dummy_gdk_pixbuf_so_0-libxqf_dummy_gdk_pixbuf_stubs.obj: libxqf_dummy_gdk_pixbuf_stubs.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxqf_dummy_gdk_pixbuf_so_0_CFLAGS) $(CFLAGS) -MT libxqf_dummy_gdk_pixbuf_so_0-libxqf_dummy_gdk_pixbuf_stubs.obj -MD -MP -MF "$(DEPDIR)/libxqf_dummy_gdk_pixbuf_so_0-libxqf_dummy_gdk_pixbuf_stubs.Tpo" -c -o libxqf_dummy_gdk_pixbuf_so_0-libxqf_dummy_gdk_pixbuf_stubs.obj `if test -f 'libxqf_dummy_gdk_pixbuf_stubs.c'; then $(CYGPATH_W) 'libxqf_dummy_gdk_pixbuf_stubs.c'; else $(CYGPATH_W) '$(srcdir)/libxqf_dummy_gdk_pixbuf_stubs.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libxqf_dummy_gdk_pixbuf_so_0-libxqf_dummy_gdk_pixbuf_stubs.Tpo" "$(DEPDIR)/libxqf_dummy_gdk_pixbuf_so_0-libxqf_dummy_gdk_pixbuf_stubs.Po"; else rm -f "$(DEPDIR)/libxqf_dummy_gdk_pixbuf_so_0-libxqf_dummy_gdk_pixbuf_stubs.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libxqf_dummy_gdk_pixbuf_stubs.c' object='libxqf_dummy_gdk_pixbuf_so_0-libxqf_dummy_gdk_pixbuf_stubs.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxqf_dummy_gdk_pixbuf_so_0_CFLAGS) $(CFLAGS) -c -o libxqf_dummy_gdk_pixbuf_so_0-libxqf_dummy_gdk_pixbuf_stubs.obj `if test -f 'libxqf_dummy_gdk_pixbuf_stubs.c'; then $(CYGPATH_W) 'libxqf_dummy_gdk_pixbuf_stubs.c'; else $(CYGPATH_W) '$(srcdir)/libxqf_dummy_gdk_pixbuf_stubs.c'; fi` libxqf_dummy_gdk_pixbuf_so_0-libxqf_dummy_gdk_pixbuf.o: libxqf_dummy_gdk_pixbuf.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxqf_dummy_gdk_pixbuf_so_0_CFLAGS) $(CFLAGS) -MT libxqf_dummy_gdk_pixbuf_so_0-libxqf_dummy_gdk_pixbuf.o -MD -MP -MF "$(DEPDIR)/libxqf_dummy_gdk_pixbuf_so_0-libxqf_dummy_gdk_pixbuf.Tpo" -c -o libxqf_dummy_gdk_pixbuf_so_0-libxqf_dummy_gdk_pixbuf.o `test -f 'libxqf_dummy_gdk_pixbuf.c' || echo '$(srcdir)/'`libxqf_dummy_gdk_pixbuf.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libxqf_dummy_gdk_pixbuf_so_0-libxqf_dummy_gdk_pixbuf.Tpo" "$(DEPDIR)/libxqf_dummy_gdk_pixbuf_so_0-libxqf_dummy_gdk_pixbuf.Po"; else rm -f "$(DEPDIR)/libxqf_dummy_gdk_pixbuf_so_0-libxqf_dummy_gdk_pixbuf.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libxqf_dummy_gdk_pixbuf.c' object='libxqf_dummy_gdk_pixbuf_so_0-libxqf_dummy_gdk_pixbuf.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxqf_dummy_gdk_pixbuf_so_0_CFLAGS) $(CFLAGS) -c -o libxqf_dummy_gdk_pixbuf_so_0-libxqf_dummy_gdk_pixbuf.o `test -f 'libxqf_dummy_gdk_pixbuf.c' || echo '$(srcdir)/'`libxqf_dummy_gdk_pixbuf.c libxqf_dummy_gdk_pixbuf_so_0-libxqf_dummy_gdk_pixbuf.obj: libxqf_dummy_gdk_pixbuf.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxqf_dummy_gdk_pixbuf_so_0_CFLAGS) $(CFLAGS) -MT libxqf_dummy_gdk_pixbuf_so_0-libxqf_dummy_gdk_pixbuf.obj -MD -MP -MF "$(DEPDIR)/libxqf_dummy_gdk_pixbuf_so_0-libxqf_dummy_gdk_pixbuf.Tpo" -c -o libxqf_dummy_gdk_pixbuf_so_0-libxqf_dummy_gdk_pixbuf.obj `if test -f 'libxqf_dummy_gdk_pixbuf.c'; then $(CYGPATH_W) 'libxqf_dummy_gdk_pixbuf.c'; else $(CYGPATH_W) '$(srcdir)/libxqf_dummy_gdk_pixbuf.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libxqf_dummy_gdk_pixbuf_so_0-libxqf_dummy_gdk_pixbuf.Tpo" "$(DEPDIR)/libxqf_dummy_gdk_pixbuf_so_0-libxqf_dummy_gdk_pixbuf.Po"; else rm -f "$(DEPDIR)/libxqf_dummy_gdk_pixbuf_so_0-libxqf_dummy_gdk_pixbuf.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libxqf_dummy_gdk_pixbuf.c' object='libxqf_dummy_gdk_pixbuf_so_0-libxqf_dummy_gdk_pixbuf.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxqf_dummy_gdk_pixbuf_so_0_CFLAGS) $(CFLAGS) -c -o libxqf_dummy_gdk_pixbuf_so_0-libxqf_dummy_gdk_pixbuf.obj `if test -f 'libxqf_dummy_gdk_pixbuf.c'; then $(CYGPATH_W) 'libxqf_dummy_gdk_pixbuf.c'; else $(CYGPATH_W) '$(srcdir)/libxqf_dummy_gdk_pixbuf.c'; fi` xqf_rcon-rcon.o: rcon.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xqf_rcon_CFLAGS) $(CFLAGS) -MT xqf_rcon-rcon.o -MD -MP -MF "$(DEPDIR)/xqf_rcon-rcon.Tpo" -c -o xqf_rcon-rcon.o `test -f 'rcon.c' || echo '$(srcdir)/'`rcon.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/xqf_rcon-rcon.Tpo" "$(DEPDIR)/xqf_rcon-rcon.Po"; else rm -f "$(DEPDIR)/xqf_rcon-rcon.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rcon.c' object='xqf_rcon-rcon.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xqf_rcon_CFLAGS) $(CFLAGS) -c -o xqf_rcon-rcon.o `test -f 'rcon.c' || echo '$(srcdir)/'`rcon.c xqf_rcon-rcon.obj: rcon.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xqf_rcon_CFLAGS) $(CFLAGS) -MT xqf_rcon-rcon.obj -MD -MP -MF "$(DEPDIR)/xqf_rcon-rcon.Tpo" -c -o xqf_rcon-rcon.obj `if test -f 'rcon.c'; then $(CYGPATH_W) 'rcon.c'; else $(CYGPATH_W) '$(srcdir)/rcon.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/xqf_rcon-rcon.Tpo" "$(DEPDIR)/xqf_rcon-rcon.Po"; else rm -f "$(DEPDIR)/xqf_rcon-rcon.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rcon.c' object='xqf_rcon-rcon.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xqf_rcon_CFLAGS) $(CFLAGS) -c -o xqf_rcon-rcon.obj `if test -f 'rcon.c'; then $(CYGPATH_W) 'rcon.c'; else $(CYGPATH_W) '$(srcdir)/rcon.c'; fi` xqf_rcon-debug.o: debug.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xqf_rcon_CFLAGS) $(CFLAGS) -MT xqf_rcon-debug.o -MD -MP -MF "$(DEPDIR)/xqf_rcon-debug.Tpo" -c -o xqf_rcon-debug.o `test -f 'debug.c' || echo '$(srcdir)/'`debug.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/xqf_rcon-debug.Tpo" "$(DEPDIR)/xqf_rcon-debug.Po"; else rm -f "$(DEPDIR)/xqf_rcon-debug.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='debug.c' object='xqf_rcon-debug.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xqf_rcon_CFLAGS) $(CFLAGS) -c -o xqf_rcon-debug.o `test -f 'debug.c' || echo '$(srcdir)/'`debug.c xqf_rcon-debug.obj: debug.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xqf_rcon_CFLAGS) $(CFLAGS) -MT xqf_rcon-debug.obj -MD -MP -MF "$(DEPDIR)/xqf_rcon-debug.Tpo" -c -o xqf_rcon-debug.obj `if test -f 'debug.c'; then $(CYGPATH_W) 'debug.c'; else $(CYGPATH_W) '$(srcdir)/debug.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/xqf_rcon-debug.Tpo" "$(DEPDIR)/xqf_rcon-debug.Po"; else rm -f "$(DEPDIR)/xqf_rcon-debug.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='debug.c' object='xqf_rcon-debug.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xqf_rcon_CFLAGS) $(CFLAGS) -c -o xqf_rcon-debug.obj `if test -f 'debug.c'; then $(CYGPATH_W) 'debug.c'; else $(CYGPATH_W) '$(srcdir)/debug.c'; fi` xqf_rcon-utils.o: utils.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xqf_rcon_CFLAGS) $(CFLAGS) -MT xqf_rcon-utils.o -MD -MP -MF "$(DEPDIR)/xqf_rcon-utils.Tpo" -c -o xqf_rcon-utils.o `test -f 'utils.c' || echo '$(srcdir)/'`utils.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/xqf_rcon-utils.Tpo" "$(DEPDIR)/xqf_rcon-utils.Po"; else rm -f "$(DEPDIR)/xqf_rcon-utils.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='utils.c' object='xqf_rcon-utils.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xqf_rcon_CFLAGS) $(CFLAGS) -c -o xqf_rcon-utils.o `test -f 'utils.c' || echo '$(srcdir)/'`utils.c xqf_rcon-utils.obj: utils.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xqf_rcon_CFLAGS) $(CFLAGS) -MT xqf_rcon-utils.obj -MD -MP -MF "$(DEPDIR)/xqf_rcon-utils.Tpo" -c -o xqf_rcon-utils.obj `if test -f 'utils.c'; then $(CYGPATH_W) 'utils.c'; else $(CYGPATH_W) '$(srcdir)/utils.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/xqf_rcon-utils.Tpo" "$(DEPDIR)/xqf_rcon-utils.Po"; else rm -f "$(DEPDIR)/xqf_rcon-utils.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='utils.c' object='xqf_rcon-utils.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xqf_rcon_CFLAGS) $(CFLAGS) -c -o xqf_rcon-utils.obj `if test -f 'utils.c'; then $(CYGPATH_W) 'utils.c'; else $(CYGPATH_W) '$(srcdir)/utils.c'; fi` uninstall-info-am: install-qstatcfgDATA: $(qstatcfg_DATA) @$(NORMAL_INSTALL) test -z "$(qstatcfgdir)" || $(mkdir_p) "$(DESTDIR)$(qstatcfgdir)" @list='$(qstatcfg_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(qstatcfgDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(qstatcfgdir)/$$f'"; \ $(qstatcfgDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(qstatcfgdir)/$$f"; \ done uninstall-qstatcfgDATA: @$(NORMAL_UNINSTALL) @list='$(qstatcfg_DATA)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(qstatcfgdir)/$$f'"; \ rm -f "$(DESTDIR)$(qstatcfgdir)/$$f"; \ done # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" mostlyclean-recursive clean-recursive distclean-recursive \ maintainer-clean-recursive: @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) gnuconfig.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) gnuconfig.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) gnuconfig.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) gnuconfig.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(mkdir_p) "$(distdir)/$$subdir" \ || exit 1; \ distdir=`$(am__cd) $(distdir) && pwd`; \ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$top_distdir" \ distdir="$$distdir/$$subdir" \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile $(PROGRAMS) $(SCRIPTS) $(DATA) gnuconfig.h installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkglibdir)" "$(DESTDIR)$(qstatcfgdir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-binPROGRAMS clean-generic clean-noinstPROGRAMS \ clean-pkglibPROGRAMS mostlyclean-am distclean: distclean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-hdr distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-qstatcfgDATA install-exec-am: install-binPROGRAMS install-pkglibPROGRAMS install-info: install-info-recursive install-man: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-info-am \ uninstall-pkglibPROGRAMS uninstall-qstatcfgDATA uninstall-info: uninstall-info-recursive .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \ clean clean-binPROGRAMS clean-generic clean-noinstPROGRAMS \ clean-pkglibPROGRAMS clean-recursive ctags ctags-recursive \ distclean distclean-compile distclean-generic distclean-hdr \ distclean-recursive distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-binPROGRAMS \ install-data install-data-am install-exec install-exec-am \ install-info install-info-am install-man \ install-pkglibPROGRAMS install-qstatcfgDATA install-strip \ installcheck installcheck-am installdirs installdirs-am \ maintainer-clean maintainer-clean-generic \ maintainer-clean-recursive mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-recursive pdf pdf-am ps ps-am \ tags tags-recursive uninstall uninstall-am \ uninstall-binPROGRAMS uninstall-info-am \ uninstall-pkglibPROGRAMS uninstall-qstatcfgDATA libxqf_dummy_gdk_pixbuf.c: $(top_srcdir)/src/gensyms.pl -x gdk_pixbuf_new_from_file,gdk_pixbuf_render_pixmap_and_mask,gdk_pixbuf_unref $(DUMMY_LIBGDKPIXBUF_ORIG) -o $(top_srcdir)/src/libxqf_dummy_gdk_pixbuf.c || rm $(top_srcdir)/src/libxqf_dummy_gdk_pixbuf.c test -s $(top_srcdir)/src/libxqf_dummy_gdk_pixbuf.c libxqf_dummy_gdk_pixbuf.so: libxqf_dummy_gdk_pixbuf.so.0 rm -f $@ $(LN_S) $< $@ libxqf_dummy_GeoIP.c: $(top_srcdir)/src/gensyms.pl -x GeoIP_new,GeoIP_open $(DUMMY_LIBGEOIP_ORIG) -o $(top_srcdir)/src/libxqf_dummy_GeoIP.c || rm $(top_srcdir)/src/libxqf_dummy_GeoIP.c test -s $(top_srcdir)/src/libxqf_dummy_GeoIP.c libxqf_dummy_GeoIP.so: libxqf_dummy_GeoIP.so.0 rm -f $@ $(LN_S) $< $@ gamelist: gamesxml2c $(top_builddir)/src/gamesxml2c $(top_srcdir)/src/games.xml > $(top_srcdir)/src/games.c .PHONY: gamelist # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xqf-1.0.5/src/host.c0000644002404400000620000001532210275434302011143 00000000000000/* XQF - Quake server browser and launcher * Copyright (C) 1998-2000 Roman Pozlevich * * 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 */ #include #include #include /* inet_aton, inet_ntoa */ #include /* inet_aton, inet_ntoa */ #include /* inet_aton, inet_ntoa */ #include /* time */ #include /* strtoul */ #include #include "xqf.h" #include "pref.h" #include "utils.h" #include "host.h" #include "zipped.h" struct host_hash { int num; GSList **nodes; }; static struct host_hash hosts = { 251, NULL }; static GSList *host_cache = NULL; static int host_hash_func (const struct in_addr *ip) { unsigned char *ptr; if (!ip) return 0; ptr = (char *) &ip->s_addr; return (ptr[0] + (ptr[1] << 2) + (ptr[2] << 4) + (ptr[3] << 6)) % hosts.num; } static gint host_sorting_helper (const struct host *h1, const struct host *h2) { if(h1==h2) return 0; else if(h1next) { h = (struct host *) tmp->data; list = g_slist_prepend (list, h); host_ref (h); } } return list; } struct host *host_add (const char *address) { struct in_addr addr; if (!address || !*address || !inet_aton (address, &addr)) return NULL; return host_add_in(addr); } struct host *host_add_in (struct in_addr addr) { struct host *h; GSList *ptr; int node; int i; node = host_hash_func (&addr); if (!hosts.nodes) { hosts.nodes = g_malloc (sizeof (GSList *) * hosts.num); for (i = 0; i < hosts.num; i++) hosts.nodes[i] = NULL; } else { for (ptr = hosts.nodes[node]; ptr; ptr = ptr->next) { h = (struct host *) ptr->data; if (h->ip.s_addr == addr.s_addr) return h; } } h = g_malloc0 (sizeof (struct host)); h->ip = addr; hosts.nodes[node] = g_slist_prepend (hosts.nodes[node], h); return h; } void host_unref (struct host *h) { int node; if (!h || !hosts.nodes) return; h->ref_count--; if (h->ref_count <= 0) { node = host_hash_func (&h->ip); hosts.nodes[node] = g_slist_remove (hosts.nodes[node], h); if (h->name) g_free (h->name); g_free (h); } } /* GSList *merge_host_to_resolve (GSList *hosts, struct host *h) { if (h) { if (h->refreshed == 0 || h->refreshed >= time (NULL) + HOST_CACHE_MAX_AGE) hosts = host_list_add (hosts, h); } return hosts; } */ GSList *merge_hosts_to_resolve (GSList *hosts, GSList *servers) { struct host *h; time_t curtime = time (NULL); for (; servers; servers = servers->next) { h = ((struct server *) servers->data)->host; if (h->refreshed == 0 || h->refreshed >= curtime + HOST_CACHE_MAX_AGE) { // hosts = host_list_add (hosts, h); hosts = g_slist_prepend (hosts, h); host_ref(h); } } hosts = slist_sort_remove_dups(hosts,(GCompareFunc)host_sorting_helper,(void(*)(void*))host_unref); return hosts; } static void host_cache_save_list (FILE *f, GSList *hosts) { struct host *h; while (hosts) { h = (struct host *) hosts->data; if (h->refreshed && h->name) fprintf (f, "%lu %s %s\n", h->refreshed, inet_ntoa (h->ip), h->name); hosts = hosts->next; } } static GSList *host_cache_read_list (FILE *f) { GSList *hosts = NULL; char buf[1024]; char *token[4]; int n; struct host *h; time_t refreshed; char *endptr; while (fgets (buf, 1024, f)) { n = tokenize (buf, token, 4, " \t\n\r"); if (n == 3) { refreshed = strtoul (token[0], &endptr, 10); if (endptr == token[0]) /* It's not a number */ continue; h = host_add (token[1]); if (h) { if (h->name) g_free (h->name); h->name = g_strdup (token[2]); h->refreshed = refreshed; // hosts = host_list_add (hosts, h); hosts = g_slist_prepend (hosts, h); host_ref(h); } } } hosts = slist_sort_remove_dups(hosts,(GCompareFunc)host_sorting_helper,(void(*)(void*))host_unref); return hosts; } static int host_cache_sorting_helper (const struct host *h1, const struct host *h2) { return (h1->refreshed > h2->refreshed)? -1 : 1; } static GSList *hosts_to_cache (void) { GSList *hosts = NULL; GSList *allhosts; GSList *tmp; struct host *h; time_t curtime = time (NULL); allhosts = all_hosts (); for (tmp = allhosts; tmp; tmp = tmp->next) { h = (struct host *) tmp->data; if (h->name && h->refreshed && h->refreshed < curtime + HOST_CACHE_MAX_AGE*2) { hosts = g_slist_prepend (hosts, h); host_ref (h); } } host_list_free (allhosts); hosts = g_slist_sort (hosts, (GCompareFunc) host_cache_sorting_helper); if (g_slist_length (hosts) > HOST_CACHE_MAX_SIZE) { tmp = g_slist_nth (hosts, HOST_CACHE_MAX_SIZE - 1); host_list_free (tmp->next); tmp->next = NULL; } return hosts; } void host_cache_save (void) { GSList *hosts; char *hostcache; struct zstream z; hosts = hosts_to_cache (); host_cache_clear (); host_cache = hosts; hostcache = file_in_dir (user_rcdir, HOSTCACHE_FILE); if (host_cache) { zstream_open_w (&z, hostcache); if (z.f) { host_cache_save_list (z.f, host_cache); zstream_close (&z); } } else { zstream_unlink (hostcache); } g_free (hostcache); } void host_cache_load (void) { char *hostcache; struct zstream z; hostcache = file_in_dir (user_rcdir, HOSTCACHE_FILE); zstream_open_r (&z, hostcache); if (z.f) { host_cache_clear (); host_cache = host_cache_read_list (z.f); zstream_close (&z); } g_free (hostcache); } void host_cache_clear (void) { if (host_cache) { host_list_free (host_cache); host_cache = NULL; } } xqf-1.0.5/src/host.h0000644002404400000620000000404207742556740011165 00000000000000/* XQF - Quake server browser and launcher * Copyright (C) 1998-2000 Roman Pozlevich * * 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 */ #ifndef __HOST_H__ #define __HOST_H__ #include #define HOST_CACHE_MAX_AGE (7 * 24 * 60 * 60) /* one week */ #define HOST_CACHE_MAX_SIZE 5000 extern int hosts_total (void); extern GSList *all_hosts (void); extern struct host *host_add (const char *address); extern struct host *host_add_in (struct in_addr addr); extern void host_unref (struct host *h); extern GSList *merge_host_to_resolve (GSList *hosts, struct host *h); extern GSList *merge_hosts_to_resolve (GSList *hosts, GSList *servers); extern void host_cache_save (void); extern void host_cache_load (void); extern void host_cache_clear (void); static inline void host_ref (struct host *h) { if (h) { h->ref_count++; } } static inline GSList *host_list_add (GSList *list, struct host *h) { if (g_slist_find (list, h) == NULL) { list = g_slist_prepend (list, h); host_ref (h); } return list; } static inline GSList *host_list_remove (GSList *list, struct host *h) { if (g_slist_find (list, h)) { list = g_slist_remove (list, h); host_unref (h); } return list; } static inline void host_list_free (GSList *list) { if (list) { g_slist_foreach (list, (GFunc) host_unref, NULL); g_slist_free (list); } } #endif /* __HOST_H__ */ xqf-1.0.5/src/country-filter.c0000644002404400000620000001235310177165742013167 00000000000000/* XQF - Quake server browser and launcher * Copyright (C) 1998-2000 Roman Pozlevich * * 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 */ #include "gnuconfig.h" #ifdef USE_GEOIP #include "country-filter.h" #include "i18n.h" #include "debug.h" #include "pixmaps.h" #include "loadpixmap.h" #include "xpm/noflag.xpm" #include #include #include // access() #include const unsigned MaxCountries = sizeof(GeoIP_country_code)/3; static const unsigned LAN_GeoIPid = sizeof(GeoIP_country_code)/3; // MaxCountries doesn't work in C static GeoIP* gi; /* array of (struct pixmap*), indexed by country id. flags[id] has three states: -1 flag unavailable 0 flag not yet loaded pointer to struct pixmap */ static struct pixmap* flags = NULL; void geoip_init(void) { const char* geoipdat = getenv("xqf_GEOIPDAT"); if(gi) return; // already initialized if(geoipdat) gi = GeoIP_open(geoipdat, GEOIP_STANDARD); if(!gi) gi = GeoIP_new(GEOIP_STANDARD); if(gi) flags = g_malloc0((MaxCountries+1) *sizeof(struct pixmap)); /*+1-> flag for LAN server*/ else xqf_error("GeoIP initialization failed"); } void geoip_done(void) { if(gi) GeoIP_delete(gi); g_free(flags); } gboolean geoip_is_working (void) { if (gi) return TRUE; else return FALSE; } const char* geoip_code_by_id(int id) { if(id < 0 || id > MaxCountries ) return NULL; /* LAN server have code ="00" */ if (id == LAN_GeoIPid) return "00"; else return GeoIP_country_code[id]; } const char* geoip_name_by_id(int id) { if(id < 0 || id > MaxCountries) return NULL; if (id == LAN_GeoIPid) return "LAN"; else return GeoIP_country_name[id]; } int geoip_id_by_code(const char *country) { int i; if(!gi) return -1; if (strcmp(country,"00")==0) return LAN_GeoIPid; for (i=1;ipix == GINT_TO_POINTER(-1)) return NULL; if(pix->pix) return pix; filename = find_flag_file(id); if(!filename || access(filename,R_OK)) { g_free(filename); return NULL; } debug(4,"loading %s",filename); /*FIXME_GTK2: need GError*/ #ifdef USE_GTK2 pixbuf = gdk_pixbuf_new_from_file(filename, NULL); #else pixbuf = gdk_pixbuf_new_from_file(filename); #endif if (pixbuf == NULL) { pix->pix=GINT_TO_POINTER(-1); g_warning (_("Error loading pixmap file: %s"), filename); g_free (filename); return NULL; } gdk_pixbuf_render_pixmap_and_mask(pixbuf,&pix->pix,&pix->mask,255); gdk_pixbuf_unref(pixbuf); g_free (filename); return pix; } struct pixmap* get_pixmap_for_country_with_fallback(int id) { struct pixmap* pix = get_pixmap_for_country(id); if(pix) return pix; if(!flags || flags[0].pix == GINT_TO_POINTER(-1)) return NULL; if(!flags[0].pix) { flags[0].pix = gdk_pixmap_colormap_create_from_xpm_d(NULL, gdk_colormap_get_system(), &flags[0].mask, NULL, noflag_xpm); if(!flags[0].pix) flags[0].pix = GINT_TO_POINTER(-1); } return &flags[0]; } unsigned geoip_num_countries() { return MaxCountries+1; } #endif xqf-1.0.5/src/country-filter.h0000644002404400000620000000364010141427456013165 00000000000000/* XQF - Quake server browser and launcher * Copyright (C) 1998-2000 Roman Pozlevich * * 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 */ #ifndef __COUNTRY_FILTER_H__ #define __COUNTRY_FILTER_H__ #ifdef USE_GEOIP #include #include "pixmaps.h" #include extern const unsigned MaxCountries; extern void geoip_init(void); extern void geoip_done(void); /** return two letter country code */ const char* geoip_code_by_id(int id); /** return full name of country */ const char* geoip_name_by_id(int id); /** return id for an ip address */ int geoip_id_by_ip(struct in_addr in); /** return id by country code **/ int geoip_id_by_code(const char *country); /** return TRUE if geoip init was successful */ gboolean geoip_is_working (void); /** \brief get a flag pixmap for country * * @returns flag pixmap or NULL */ struct pixmap* get_pixmap_for_country(int id); /** \brief get a flag pixmap for country * * same as get_pixmap_for_country but try to create a completely transparent * flag if no suitable one could be loaded. * @returns flag pixmap or NULL */ struct pixmap* get_pixmap_for_country_with_fallback(int id); /** \brief get number of countries */ unsigned geoip_num_countries(); #endif #endif /*__COUNTRY_FILTER_H__*/ xqf-1.0.5/src/trayicon.c0000644002404400000620000005705310145426643012032 00000000000000/* XQF - Quake server browser and launcher * * 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 .* .* .* trayicon.c: .* * Copyright (C) Jochen Baier .* .* based on: .* .* eggtrayicon.c api .* * Copyright (C) Anders Carlsson .* .* magic transparent KDE icon: .* .* Copyright (C) Jochen Baier .* */ #include #include "gnuconfig.h" #ifndef USE_GTK2 /*dummy functions for gtk 1.x, this avoid a lot ifdef´s*/ void tray_init (GtkWidget* window) { gtk_widget_show(window); }; void tray_delete_event_hook (void) {/**/}; void tray_icon_set_tooltip (gchar *tip) {/**/}; void tray_icon_stop_animation (void) {/**/}; void tray_icon_start_animation (void) {/**/}; extern void tray_done (void) {/**/}; extern gboolean tray_icon_work(void) {return FALSE;}; #else #include #include #include #include #include #include #include #include #include "i18n.h" #include "pref.h" #include "xqf.h" #include "debug.h" #include "loadpixmap.h" #include "srv-list.h" #include "source.h" #define SYSTEM_TRAY_REQUEST_DOCK 0 #define SYSTEM_TRAY_BEGIN_MESSAGE 1 #define SYSTEM_TRAY_CANCEL_MESSAGE 2 #define EGG_TYPE_TRAY_ICON (egg_tray_icon_get_type ()) #define EGG_TRAY_ICON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EGG_TYPE_TRAY_ICON, EggTrayIcon)) #define EGG_TRAY_ICON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EGG_TYPE_TRAY_ICON, EggTrayIconClass)) #define EGG_IS_TRAY_ICON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EGG_TYPE_TRAY_ICON)) #define EGG_IS_TRAY_ICON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EGG_TYPE_TRAY_ICON)) #define EGG_TRAY_ICON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EGG_TYPE_TRAY_ICON, EggTrayIconClass)) #define EVENT_REFRESH 2 #define EVENT_UPDATE 3 #define N_SERVER 100 #define ANI_TIME 10 static const char kde_window_manger[]="KWin"; typedef struct _EggTrayIcon EggTrayIcon; typedef struct _EggTrayIconClass EggTrayIconClass; struct _EggTrayIcon { GtkPlug parent_instance; guint stamp; Atom selection_atom; Atom manager_atom; Atom system_tray_opcode_atom; Window manager_window; GtkWidget *box; GtkWidget *background; GtkWidget *image; GdkPixbuf *default_pix; gboolean ready; }; struct _EggTrayIconClass { GtkPlugClass parent_class; }; GType egg_tray_icon_get_type (void); static GtkPlugClass *parent_class = NULL; EggTrayIcon *egg_tray_icon_new (const gchar *name, GdkPixbuf *pix); guint egg_tray_icon_send_message (EggTrayIcon *icon, gint timeout, const char *message, gint len); void egg_tray_icon_cancel_message (EggTrayIcon *icon, guint id); static void egg_tray_icon_init (EggTrayIcon *icon); static void egg_tray_icon_class_init (EggTrayIconClass *klass); static void egg_tray_icon_unrealize (GtkWidget *widget); static void egg_tray_icon_update_manager_window (EggTrayIcon *icon); GdkPixbuf *kde_dock_background(EggTrayIcon *icon); GtkTooltips *tray_icon_tips = NULL; EggTrayIcon *tray_icon = NULL; GdkPixbuf *frame_basic; GtkWidget *menu = NULL; GtkWidget *refresh_item; GtkWidget *update_item; GtkWidget *stop_item; GtkWidget *show_item; GtkWidget *hide_item; GtkWidget *exit_item; typedef struct _frame frame; struct _frame { GdkPixbuf *pix; gint delay; }; typedef struct _animation animation; struct _animation { GArray *array; frame current_frame; gint frame_counter; gint time_counter; gboolean loop; }; static animation *busy_ani; static animation *ready_ani; static GtkWidget *window; /* copy of the main window */ static gint x_pos = 50; static gint y_pos = 50; static gboolean animation_running = FALSE; static gboolean refresh_update=FALSE; static gint animation_timer=0; static gint animation_callback (gpointer nothing); gboolean tray_icon_work(void) { if (!tray_icon) return FALSE; return tray_icon->ready; } /*user close main window-> hide it*/ void tray_delete_event_hook(void) { gtk_window_get_position(GTK_WINDOW(window), &x_pos, &y_pos); gtk_widget_hide(window); } void show_main_window_call(GtkWidget * button, void *data) { static gboolean first_call = TRUE; if (first_call) { gtk_window_set_position(GTK_WINDOW(window), GTK_WIN_POS_CENTER); gtk_widget_show(window); first_call = FALSE; } else { gtk_window_move(GTK_WINDOW(window), x_pos, y_pos); gtk_widget_show(window); } } void hide_main_window_call(GtkWidget * button, void *data) { gtk_window_get_position(GTK_WINDOW(window), &x_pos, &y_pos); gtk_widget_hide(window); } void exit_call(GtkWidget * button, void *data) { gtk_widget_destroy(GTK_WIDGET(tray_icon)); gtk_main_quit(); } void set_menu_sens(void) { gtk_widget_set_sensitive (show_item, !GTK_WIDGET_VISIBLE(window)); gtk_widget_set_sensitive (hide_item, GTK_WIDGET_VISIBLE(window)); gtk_widget_set_sensitive (stop_item, refresh_update); } static void tray_icon_pressed(GtkWidget * button, GdkEventButton * event, EggTrayIcon * icon) { /*right click */ if (event->button == 1) { if (GTK_WIDGET_VISIBLE(window)) { gtk_window_get_position(GTK_WINDOW(window), &x_pos, &y_pos); gtk_widget_hide(window); } else { show_main_window_call(NULL, NULL); } } /*left click */ if (event->button == 3) { set_menu_sens (); gtk_menu_popup(GTK_MENU(menu), NULL, NULL, NULL, NULL, 0, gtk_get_current_event_time()); } } void tray_icon_set_tooltip(gchar * tip) { if (!tray_icon || !tray_icon->ready ) return; if(!tray_icon_tips) tray_icon_tips = gtk_tooltips_new(); gtk_tooltips_set_tip(GTK_TOOLTIPS(tray_icon_tips), GTK_WIDGET(tray_icon), tip, tip); } static gint animation_callback(gpointer _ani) { animation *ani= _ani; if (ani->frame_counter==0 && ani->time_counter==0) { ani->current_frame=g_array_index (ani->array, frame, ani->frame_counter); gtk_image_set_from_pixbuf(GTK_IMAGE(tray_icon->image), ani->current_frame.pix); } if (ani->time_counter < ani->current_frame.delay) { ani->time_counter++; return TRUE; } if (ani->frame_counter == ani->array->len-1) { ani->frame_counter= 0; ani->time_counter =0; if (ani->loop) { return TRUE; } else { animation_running=FALSE; return FALSE; } } ani->frame_counter++; ani->current_frame=g_array_index (ani->array, frame, ani->frame_counter); gtk_image_set_from_pixbuf(GTK_IMAGE(tray_icon->image), ani->current_frame.pix); ani->time_counter=0; return TRUE; } void tray_icon_start_animation(void) { if (!tray_icon_work()) return; refresh_update=TRUE; if (animation_running) { if (animation_timer) g_source_remove(animation_timer); } busy_ani->frame_counter = 0; busy_ani->time_counter = 0; animation_timer = g_timeout_add(ANI_TIME, (GtkFunction) animation_callback, busy_ani); animation_running = TRUE; } void tray_icon_stop_animation(void) { if (!tray_icon_work()) return; refresh_update=FALSE; set_menu_sens (); if (animation_running) { if (animation_timer) g_source_remove(animation_timer); ready_ani->frame_counter = 0; ready_ani->time_counter = 0; animation_timer = g_timeout_add(ANI_TIME, (GtkFunction) animation_callback, ready_ani); } } static animation *tray_icon_load_animation (gchar *name, gboolean loop) { gint i=0; gint line_number=0; gboolean eof=FALSE; gchar *ani_file; gchar *content; gchar *begin; gchar *line; gchar *png_start; gchar *delay_string=NULL; gchar *png_filename; animation *ani; frame tmp_frame; if(!name) return NULL; { char* tmp = g_strconcat("trayicon", G_DIR_SEPARATOR_S, name, NULL); ani_file = find_pixmap_directory(tmp); g_free(tmp); } if(!ani_file || !g_file_get_contents (ani_file, &content, NULL, NULL)) { xqf_warning("Could not load animation file '%s'", name); g_free(ani_file); return NULL; } ani=g_new(animation, 1); ani->array = g_array_new (FALSE, FALSE, sizeof (frame)); ani->frame_counter = 0; ani->time_counter = 0; ani->loop = loop; begin=content; while (!eof) { if ((content[i] == '\n') || (content[i] == '\0') ) { if ( content[i-1] != '\n') { line_number++; do { line= g_strndup (begin, &content[i]-begin); if (strlen (line) <= 1) { xqf_warning (_("Error in file: %s line: %d\n"), ani_file, line_number); break; } png_start =g_strrstr (line, ".png"); if (!png_start) { xqf_warning (_("Error in file: %s line: %d\n"), ani_file, line_number); break; } delay_string=g_strdup (png_start+4); g_strstrip(delay_string); if (strlen (delay_string) < 1) { xqf_warning (_("Error in file: %s line: %d\n"), ani_file, line_number); break; } tmp_frame.delay= strtol(delay_string, NULL, 10); if (tmp_frame.delay== 0) { xqf_warning (_("Error in file: %s line: %d\n"), ani_file, line_number); break; } if (tmp_frame.delay != 1) tmp_frame.delay=tmp_frame.delay / 2; *(png_start+4)=0; /*cut anything behind ".png" */ png_filename= g_strconcat(PACKAGE_DATA_DIR, G_DIR_SEPARATOR_S,"default", G_DIR_SEPARATOR_S, "trayicon", G_DIR_SEPARATOR_S, line, NULL); tmp_frame.pix = load_pixmap_as_pixbuf (png_filename); if (tmp_frame.pix == NULL) { xqf_warning (_("Error in file: %s line: %d\n"), ani_file, line_number); break; } if (png_filename) g_free (png_filename); g_array_append_val (ani->array, tmp_frame); } while (0); if (line) g_free(line); if (delay_string) g_free(delay_string); } if (content[i] == '\0' || (content[i] == '\n' && content[i+1] == '\0' )) eof=TRUE; else begin=&content[i]+1; } i++; } if (content) g_free(content); if (ani_file) g_free(ani_file); return ani; } void tray_create_menu (void) { GtkWidget *separator1 = NULL; menu = gtk_menu_new(); refresh_item = gtk_menu_item_new_with_label(_("Refresh")); g_signal_connect(G_OBJECT(refresh_item), "activate", G_CALLBACK(refresh_n_server), GINT_TO_POINTER(N_SERVER)); gtk_menu_shell_append(GTK_MENU_SHELL(menu), refresh_item); update_item= gtk_menu_item_new_with_label(_("Update")); g_signal_connect(G_OBJECT(update_item), "activate", G_CALLBACK(update_source_callback), NULL); gtk_menu_shell_append(GTK_MENU_SHELL(menu), update_item); stop_item = gtk_menu_item_new_with_label(_("Stop")); g_signal_connect(G_OBJECT(stop_item), "activate", G_CALLBACK(stop_callback), NULL); gtk_menu_shell_append(GTK_MENU_SHELL(menu), stop_item); separator1 = gtk_menu_item_new(); gtk_widget_show(separator1); gtk_menu_shell_append(GTK_MENU_SHELL(menu), separator1); gtk_widget_set_sensitive(separator1, FALSE); // translator: show main window show_item = gtk_menu_item_new_with_label(_("Show")); g_signal_connect(G_OBJECT(show_item), "activate", G_CALLBACK(show_main_window_call), NULL); gtk_menu_shell_append(GTK_MENU_SHELL(menu), show_item); // translator: hide main window hide_item= gtk_menu_item_new_with_label(_("Hide")); g_signal_connect(G_OBJECT(hide_item), "activate", G_CALLBACK(hide_main_window_call), NULL); gtk_menu_shell_append(GTK_MENU_SHELL(menu), hide_item); exit_item = gtk_menu_item_new_with_label(_("Exit")); g_signal_connect(G_OBJECT(exit_item), "activate", G_CALLBACK(exit_call), NULL); gtk_menu_shell_append(GTK_MENU_SHELL(menu), exit_item); gtk_widget_show_all(menu); } void tray_init(GtkWidget * main_window) { gdk_pixbuf_xlib_init (GDK_DISPLAY(), DefaultScreen (GDK_DISPLAY())); /* local copy */ window = main_window; gtk_window_get_position(GTK_WINDOW(window), &x_pos, &y_pos); tray_create_menu(); busy_ani = tray_icon_load_animation ("busy.ani", TRUE); ready_ani = tray_icon_load_animation("ready.ani", FALSE); frame_basic = load_pixmap_as_pixbuf("trayicon/frame_basic.png"); if(frame_basic) tray_icon = egg_tray_icon_new ("xqf", frame_basic); if (tray_icon && tray_icon->ready) { g_signal_connect(tray_icon, "button_press_event", G_CALLBACK(tray_icon_pressed),tray_icon); gtk_widget_hide(window); } else gtk_widget_show(window); } void tray_done (void) { if (busy_ani) { if (busy_ani->array) g_array_free (busy_ani->array, TRUE); if (ready_ani->array) g_array_free (ready_ani->array, TRUE); g_free(busy_ani); } g_free(ready_ani); //FIXME //if (tray_icon) //gtk_widget_destroy(GTK_WIDGET(tray_icon)); } /*eggtrayicon stuff*/ GType egg_tray_icon_get_type (void) { static GType our_type = 0; our_type = g_type_from_name ("EggTrayIcon"); if (our_type == 0) { static const GTypeInfo our_info = { sizeof (EggTrayIconClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) egg_tray_icon_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (EggTrayIcon), 0, /* n_preallocs */ (GInstanceInitFunc) egg_tray_icon_init }; our_type = g_type_register_static (GTK_TYPE_PLUG, "EggTrayIcon", &our_info, 0); } else if (parent_class == NULL) { /* we're reheating the old class from a previous instance - engage ugly hack =( */ egg_tray_icon_class_init ((EggTrayIconClass *)g_type_class_peek (our_type)); } return our_type; } static void egg_tray_icon_init (EggTrayIcon *icon) { icon->stamp = 1; gtk_widget_add_events (GTK_WIDGET (icon), GDK_PROPERTY_CHANGE_MASK); } static void egg_tray_icon_class_init (EggTrayIconClass *klass) { GtkWidgetClass *widget_class = (GtkWidgetClass *)klass; parent_class = g_type_class_peek_parent (klass); widget_class->unrealize = egg_tray_icon_unrealize; } static GdkFilterReturn egg_tray_icon_manager_filter (GdkXEvent *xevent, GdkEvent *event, gpointer user_data) { EggTrayIcon *icon = user_data; XEvent *xev = (XEvent *)xevent; if (xev->xany.type == ClientMessage && xev->xclient.message_type == icon->manager_atom && xev->xclient.data.l[1] == icon->selection_atom) { egg_tray_icon_update_manager_window (icon); } else if (xev->xany.window == icon->manager_window) { if (xev->xany.type == DestroyNotify) { egg_tray_icon_update_manager_window (icon); } } return GDK_FILTER_CONTINUE; } static void egg_tray_icon_unrealize (GtkWidget *widget) { EggTrayIcon *icon = EGG_TRAY_ICON (widget); GdkWindow *root_window=NULL; if (icon->manager_window != None) { gdk_window_remove_filter (root_window, egg_tray_icon_manager_filter, icon); if (GTK_WIDGET_CLASS (parent_class)->unrealize) (* GTK_WIDGET_CLASS (parent_class)->unrealize) (widget); } } static void egg_tray_icon_send_manager_message (EggTrayIcon *icon, long message, Window window, long data1, long data2, long data3) { XClientMessageEvent ev; Display *display; ev.type = ClientMessage; ev.window = window; ev.message_type = icon->system_tray_opcode_atom; ev.format = 32; ev.data.l[0] = gdk_x11_get_server_time (GTK_WIDGET (icon)->window); ev.data.l[1] = message; ev.data.l[2] = data1; ev.data.l[3] = data2; ev.data.l[4] = data3; display = gdk_display; gdk_error_trap_push (); XSendEvent (display, icon->manager_window, False, NoEventMask, (XEvent *)&ev); XSync (display, False); gdk_error_trap_pop (); icon->ready=TRUE; } static void egg_tray_icon_send_dock_request (EggTrayIcon *icon) { egg_tray_icon_send_manager_message (icon, SYSTEM_TRAY_REQUEST_DOCK, icon->manager_window, gtk_plug_get_id (GTK_PLUG (icon)), 0, 0); } /*from gdk-pixbuf-xlib-drawabel.c*/ static gboolean xlib_window_is_viewable (Window w) { XWindowAttributes wa; while (w != 0) { Window parent, root, *children; int nchildren; XGetWindowAttributes (GDK_DISPLAY(), w, &wa); if (wa.map_state != IsViewable) { return FALSE; } if (!XQueryTree (GDK_DISPLAY(), w, &root, &parent, &children, &nchildren)) return FALSE; if (nchildren > 0) XFree (children); if ((parent == root) || (w == root)) return TRUE; w = parent; } return FALSE; } gboolean kde_dock (EggTrayIcon *icon) { Window win; Window data; Atom kde_tray_atom = XInternAtom (GDK_DISPLAY(), "_KDE_NET_WM_SYSTEM_TRAY_WINDOW_FOR", False); Atom kde_dock_atom = XInternAtom (GDK_DISPLAY(), "KWM_DOCKWINDOW", False); //KDE 2 support not tested win = GDK_WINDOW_XID (GTK_WIDGET (icon)->window); XSetWindowBackgroundPixmap(GDK_DISPLAY(), win, ParentRelative); data = 1; XChangeProperty (GDK_DISPLAY(), win, kde_dock_atom, XA_WINDOW, 32, PropModeReplace, (unsigned char *)&data, 1); data = GDK_WINDOW_XID (window->window); XChangeProperty (GDK_DISPLAY(), win, kde_tray_atom, XA_WINDOW, 32, PropModeReplace, (unsigned char *)&data, 1); XMapWindow (GDK_DISPLAY(), win); XFlush (GDK_DISPLAY()); return (xlib_window_is_viewable(win)); } GdkPixbuf *kde_dock_background(EggTrayIcon *icon) { Window win; XWindowAttributes wa; GdkPixbuf *background; win = GDK_WINDOW_XID (GTK_WIDGET (icon)->window); XGetWindowAttributes (GDK_DISPLAY(),win, &wa); background=gdk_pixbuf_xlib_get_from_drawable (NULL, win, 0, NULL, 0, 0, 0, 0, wa.width, wa.height); return background; } static void egg_tray_icon_update_manager_window (EggTrayIcon *icon) { static GdkPixbuf *background_pixbuf; const gchar *window_manager=NULL; if (icon->manager_window != None) { GdkWindow *gdkwin; gdkwin = gdk_window_lookup (icon->manager_window); gdk_window_remove_filter (gdkwin, egg_tray_icon_manager_filter, icon); } XGrabServer (GDK_DISPLAY()); icon->manager_window = XGetSelectionOwner (GDK_DISPLAY(), icon->selection_atom); if (icon->manager_window != None) XSelectInput (GDK_DISPLAY(), icon->manager_window, StructureNotifyMask); XUngrabServer (GDK_DISPLAY()); XFlush (GDK_DISPLAY()); if (icon->manager_window == None) return; window_manager=gdk_x11_screen_get_window_manager_name (gdk_screen_get_default()); if ( !g_ascii_strcasecmp(window_manager, kde_window_manger) && kde_dock (icon)) { if ((background_pixbuf=kde_dock_background(icon)) !=NULL) { icon->box= gtk_fixed_new (); gtk_fixed_set_has_window(GTK_FIXED (icon->box),TRUE); gtk_container_add(GTK_CONTAINER(icon), icon->box); icon->image=gtk_image_new (); gtk_image_set_from_pixbuf(GTK_IMAGE(icon->image), icon->default_pix); icon->background =gtk_image_new (); gtk_image_set_from_pixbuf(GTK_IMAGE(icon->background), background_pixbuf); gtk_fixed_put (GTK_FIXED (icon->box), GTK_WIDGET(icon->background), 0, 0); gtk_fixed_put (GTK_FIXED (icon->box), GTK_WIDGET(icon->image), 0, 0); gtk_widget_show (icon->background); gtk_widget_show (icon->image); gtk_widget_show(icon->box); icon->ready=TRUE; } } else { icon->box=gtk_event_box_new (); gtk_container_add(GTK_CONTAINER(icon), icon->box); icon->image=gtk_image_new (); gtk_image_set_from_pixbuf(GTK_IMAGE(icon->image),icon->default_pix); gtk_container_add(GTK_CONTAINER(icon->box), icon->image); gtk_widget_show (icon->image); gtk_widget_show(icon->box); GdkWindow *gdkwin; gdkwin = gdk_window_lookup (icon->manager_window); gdk_window_add_filter (gdkwin, egg_tray_icon_manager_filter, icon); /* Send a request that we'd like to dock */ egg_tray_icon_send_dock_request (icon); } } EggTrayIcon * egg_tray_icon_new (const char *name, GdkPixbuf *pix) { EggTrayIcon *icon; char buffer[256]; GdkWindow *root_window; Screen *xscreen=DefaultScreenOfDisplay (GDK_DISPLAY()); g_return_val_if_fail (pix!= NULL, NULL); icon = g_object_new (EGG_TYPE_TRAY_ICON, NULL); gtk_window_set_title (GTK_WINDOW (icon), name); gtk_plug_construct (GTK_PLUG (icon), 0); gtk_widget_realize (GTK_WIDGET (icon)); icon->ready=FALSE; icon->default_pix=pix; /* Now see if there's a manager window around */ g_snprintf (buffer, sizeof (buffer), "_NET_SYSTEM_TRAY_S%d", XScreenNumberOfScreen (xscreen)); icon->selection_atom = XInternAtom (DisplayOfScreen (xscreen), buffer, False); icon->manager_atom = XInternAtom (DisplayOfScreen (xscreen), "MANAGER", False); icon->system_tray_opcode_atom = XInternAtom (DisplayOfScreen (xscreen), "_NET_SYSTEM_TRAY_OPCODE", False); gtk_window_present (GTK_WINDOW (icon)); egg_tray_icon_update_manager_window (icon); root_window = gdk_window_lookup (gdk_x11_get_default_root_xwindow ()); /* Add a root window filter so that we get changes on MANAGER */ gdk_window_add_filter (root_window, egg_tray_icon_manager_filter, icon); return icon; } guint egg_tray_icon_send_message (EggTrayIcon *icon, gint timeout, const gchar *message, gint len) { guint stamp; g_return_val_if_fail (EGG_IS_TRAY_ICON (icon), 0); g_return_val_if_fail (timeout >= 0, 0); g_return_val_if_fail (message != NULL, 0); if (icon->manager_window == None) return 0; if (len < 0) len = strlen (message); stamp = icon->stamp++; /* Get ready to send the message */ egg_tray_icon_send_manager_message (icon, SYSTEM_TRAY_BEGIN_MESSAGE, (Window)gtk_plug_get_id (GTK_PLUG (icon)), timeout, len, stamp); /* Now to send the actual message */ gdk_error_trap_push (); while (len > 0) { XClientMessageEvent ev; Display *xdisplay; xdisplay = GDK_DISPLAY(); ev.type = ClientMessage; ev.window = (Window)gtk_plug_get_id (GTK_PLUG (icon)); ev.format = 8; ev.message_type = XInternAtom (xdisplay, "_NET_SYSTEM_TRAY_MESSAGE_DATA", False); if (len > 20) { memcpy (&ev.data, message, 20); len -= 20; message += 20; } else { memcpy (&ev.data, message, len); len = 0; } XSendEvent (GDK_DISPLAY(), icon->manager_window, False, StructureNotifyMask, (XEvent *)&ev); XSync (GDK_DISPLAY(), False); } gdk_error_trap_pop (); return stamp; } void egg_tray_icon_cancel_message (EggTrayIcon *icon, guint id) { g_return_if_fail (EGG_IS_TRAY_ICON (icon)); g_return_if_fail (id > 0); egg_tray_icon_send_manager_message (icon, SYSTEM_TRAY_CANCEL_MESSAGE, (Window)gtk_plug_get_id (GTK_PLUG (icon)), id, 0, 0); } #endif /*GTK 2*/ xqf-1.0.5/src/trayicon.h0000644002404400000620000000263610065102307012021 00000000000000/* XQF - Quake server browser and launcher * * 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 .* .* .* trayicon.c: .* * Copyright (C) Jochen Baier .* .* based on: .* .* eggtrayicon.c api .* * Copyright (C) Anders Carlsson .* .* magic transparent KDE icon: .* .* Copyright (C) Jochen Baier .* */ #ifndef _system_tray_h_ #define _system_tray_h_ #include extern void tray_init (GtkWidget * window) ; extern void tray_done (void); extern void tray_delete_event_hook (void); extern void tray_icon_set_tooltip (gchar *tip); extern gboolean tray_icon_work(void); extern void tray_icon_stop_animation (void); extern void tray_icon_start_animation (void); #endif /*_system_tray_h_*/ xqf-1.0.5/src/loadpixmap.c0000644002404400000620000001612510262022614012321 00000000000000/* XQF - Quake server browser and launcher * Functions for loading image files from disk * Copyright (C) 2002 Ludwig Nussel * * 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 */ // modified version of what glade generates #include "gnuconfig.h" #include #include #include #include #include #include #include #include "loadpixmap.h" #include "pixmaps.h" #include "i18n.h" #include "debug.h" /* This is an internally used function to check if a pixmap file exists. */ static char* check_file_exists (const char *directory, const char *filename); /* This is an internally used function to create pixmaps. */ static GtkWidget* create_dummy_pixmap (GtkWidget *widget); /* This is a dummy pixmap we use when a pixmap can't be found. */ static char *dummy_pixmap_xpm[] = { /* columns rows colors chars-per-pixel */ "1 1 1 1", " c None", /* pixels */ " " }; /* This is an internally used function to create pixmaps. */ static GtkWidget* create_dummy_pixmap (GtkWidget *widget) { GdkColormap *colormap; GdkPixmap *gdkpixmap; GdkBitmap *mask; GtkWidget *pixmap; colormap = gtk_widget_get_colormap (widget); gdkpixmap = gdk_pixmap_colormap_create_from_xpm_d (NULL, colormap, &mask, NULL, dummy_pixmap_xpm); if (gdkpixmap == NULL) xqf_error ("Couldn't create replacement pixmap."); pixmap = gtk_pixmap_new (gdkpixmap, mask); gdk_pixmap_unref (gdkpixmap); gdk_bitmap_unref (mask); return pixmap; } static GList *pixmaps_directories = NULL; /* Use this function to set the directory containing installed pixmaps. */ void add_pixmap_directory (const gchar *directory) { pixmaps_directories = g_list_prepend (pixmaps_directories, g_strdup (directory)); } gchar* find_pixmap_directory(const gchar* filename) { gchar* found_filename = NULL; GList *elem; elem = pixmaps_directories; while (elem) { found_filename = check_file_exists ((gchar*)elem->data, filename); if (found_filename) break; elem = elem->next; } return found_filename; } GtkWidget* load_pixmap (GtkWidget* widget, const gchar* filename) { GtkWidget *pixmap; struct pixmap pix = { 0, 0 }; if(!load_pixmap_as_pixmap(widget, filename, &pix)) { return create_dummy_pixmap(widget); } pixmap = gtk_pixmap_new (pix.pix, pix.mask); if(pix.pix) gdk_pixmap_unref (pix.pix); if(pix.mask) gdk_bitmap_unref (pix.mask); return pixmap; } /** find a pixmap file either absolute or in the pixmap search path. * @returns filename if file exists, NULL otherwise. must be freed */ static char* find_pixmap_file(const char* filename) { char *found_filename = NULL; g_return_val_if_fail(filename!=NULL,NULL); if (!filename[0]) return NULL; // load absolute paths directly if(filename[0]=='/') found_filename = check_file_exists(NULL, filename); else found_filename = find_pixmap_directory(filename); return found_filename; } static int is_suffix(const char* filename, const char* suffix) { return(strlen(filename)>strlen(suffix) && !strcmp(filename+strlen(filename)-strlen(suffix),suffix)); } struct pixmap* load_pixmap_as_pixmap (GtkWidget* widget, const gchar* filename, struct pixmap* pix) { gchar *found_filename = NULL; GdkColormap *colormap = NULL; g_return_val_if_fail(widget!=NULL,NULL); g_return_val_if_fail(pix!=NULL,NULL); found_filename = find_pixmap_file(filename); if(is_suffix(filename, ".xpm")) // try png instead { char* tmp = g_strdup(filename); strcpy(tmp+strlen(tmp)-3, "png"); found_filename = find_pixmap_file(tmp); g_free(tmp); } if(!found_filename) { // not file on disk maybe xpm compiled into binary if(is_suffix(filename, ".xpm")) { void* xpm; char* p; p = found_filename = g_strdup(filename); if( (*p >= 'a' && *p <= 'z') || (*p >= 'A' && *p <= 'Z')) ++p; else *p++ = '_'; while(*p) { if( (*p >= 'a' && *p <= 'z') || (*p >= 'A' && *p <= 'Z') || (*p >= '0' && *p <= '9')) { ++p; } else *p++ = '_'; } xpm = dlsym(NULL, found_filename); if(xpm) { colormap = gtk_widget_get_colormap (widget); pix->pix = gdk_pixmap_colormap_create_from_xpm_d (NULL, colormap, &pix->mask, NULL, xpm); } } } else if(is_suffix(found_filename, ".xpm")) { colormap = gtk_widget_get_colormap (widget); pix->pix = gdk_pixmap_colormap_create_from_xpm (NULL, colormap, &pix->mask, NULL, found_filename); } else { /*FIXME_GTK2: need GError*/ #ifdef USE_GTK2 GdkPixbuf* pixbuf = gdk_pixbuf_new_from_file(found_filename, NULL); #else GdkPixbuf* pixbuf = gdk_pixbuf_new_from_file(found_filename); #endif if (pixbuf == NULL) { // translator: %s = file name xqf_warning (_("Error loading pixmap file: %s"), found_filename); g_free (found_filename); return NULL; } gdk_pixbuf_render_pixmap_and_mask(pixbuf,&pix->pix,&pix->mask,255); gdk_pixbuf_unref(pixbuf); } if (pix->pix == NULL) { // translator: %s = file name xqf_warning (_("Error loading pixmap file: %s"), found_filename?found_filename:filename); g_free (found_filename); return NULL; } g_free (found_filename); return pix; } void* load_pixmap_as_pixbuf (const gchar* filename) { gchar *found_filename = NULL; GdkPixbuf* pixbuf = NULL; found_filename = find_pixmap_file(filename); if(!found_filename) { // translator: %s = file name xqf_warning (_("Error loading pixmap file: %s"), filename); return NULL; } /*FIXME_GTK2: need GError*/ #ifdef USE_GTK2 pixbuf = gdk_pixbuf_new_from_file(found_filename, NULL); #else pixbuf = gdk_pixbuf_new_from_file(found_filename); #endif if (pixbuf == NULL) // translator: %s = file name xqf_warning (_("Error loading pixmap file: %s"), found_filename); g_free (found_filename); return pixbuf; } /** directory may be null */ static char* check_file_exists (const char* directory, const char* filename) { char *full_filename; if(directory) full_filename = g_strconcat(directory, G_DIR_SEPARATOR_S, filename, NULL); else full_filename = g_strdup(filename); if (access(full_filename, R_OK) == 0) return full_filename; g_free (full_filename); return NULL; } xqf-1.0.5/src/loadpixmap.h0000644002404400000620000000326710001247737012337 00000000000000/* XQF - Quake server browser and launcher * Functions for loading image files from disk * Copyright (C) 2002 Ludwig Nussel * * 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 */ #ifndef LOADPIXMAP_H #define LOADPIXMAP_H /* Use this function to set the directory containing installed pixmaps. */ void add_pixmap_directory (const gchar* directory); /* search a pixmap in the paths added by add_pixmap_directory() * must free returned path manually * returns NULL if file was not found */ gchar* find_pixmap_directory(const gchar* filename); /** This is used to create the pixmaps in the interface. */ GtkWidget* load_pixmap (GtkWidget* widget, const gchar* filename); /** fill in passed pixmap struct, return pointer to this struct on success, * NULL otherwise */ struct pixmap* load_pixmap_as_pixmap (GtkWidget* widget, const gchar* filename, struct pixmap* pix); /** load a pixmap in search path as GdkPixbuf, void* just to avoid a special header */ void* load_pixmap_as_pixbuf (const gchar* filename); #endif xqf-1.0.5/src/qstat.cfg0000644002404400000620000001271110520643252011635 00000000000000# QStat configuration file # # See qstat documentation (qstatdoc.html) for instructions # http://www.qstat.org gametype SOF2S new extend Q3S name = Soldier of Fortune 2 default port = 20100 template var = SOLDIEROFFORTUNE2 game rule = gametype end # SOF2 public master: master.sof2.ravensoft.com # The 2003 protocol is for SOF2 1.01 # The 2004 protocol is for SOF2 1.02 gametype SOF2M new extend Q3M name = SOF2 Master default port = 20110 template var = SOF2MASTER master protocol = 2004 master query = SOF2FULL master for gametype = sof2s end # The 2002 protocol is for SOF2 1.0 gametype SOF2M1.0 new extend SOF2M name = SOF2 Master (1.0) master protocol = 2002 end gametype CRS new extend GPS name = Command and Conquer: Renegade default port = 25300 template var = CNCRENEGADE game rule = gametype end # MOHAA supports two status protocols, Gamespy and Quake 3. # Seems like servers support one or the other, but not both at the same time. # The Gamespy protocol returns player name, frags, ping, and deaths. gametype MAS new extend GPS name = Medal of Honor: Allied Assault default port = 12300 template var = MOHALLIEDASSAULT game rule = gametype end # MOHAA support for the Q3 protocol is broken and more limited. The # response to "getinfo" does not include the current and max players # (they're always zero). The response to "getstatus" has the correct # current and max players, but only reports player name and ping. # If -R or -P options are specified, then both "getinfo" and "getstatus" # are sent. Otherwise only "getinfo" is sent. gametype MAQS new extend Q3S name = Medal of Honor: Allied Assault (Q) default port = 12300 template var = MOHALLIEDASSAULT game rule = gametype status packet = \xff\xff\xff\xff\x02getinfo\n status2 packet = \xff\xff\xff\xff\x02getstatus\n end # Half-Life supports a Quake 2 style status protocol, but only for # basic status, there's no player or extended rule information. The # server rule names are different from HLS. gametype HLQS new extend Q2S name = Half-Life template var = HALFLIFE default port = 27015 game rule = gamedir status packet = \xff\xff\xff\xffinfostring\x00 end # Config for Serious Sam SMS gametype SMS new extend GPS name = Serious Sam default port = 25600 status port offset = 1 template var = SERIOUSSAM game rule = gametype end # Config for Medal of Honor: Allied Assault MHS gametype MHS new extend Q3S name = Medal of Honor: Allied Assault default port = 12204 template var = MOHALLIEDASSAULT game rule = gametype status packet = \377\377\377\377\002getinfo xxx status2 packet = \377\377\377\377\002getstatus xxx end gametype CODS new extend Q3S name = Call of Duty default port = 28960 template var = CALLOFDUTY game rule = gamename end gametype CODM new extend Q3M name = Call of Duty Master default port = 20510 template var = CODMASTER master protocol = 5 master for gametype = CODS master query = full empty end # enemy territory gametype WOETS new extend Q3S name = Enemy Territory template var = ENEMYTERRITORY game rule = gamename end gametype WOETM new extend Q3M name = Enemy Territory Master template var = WOETSMASTER master protocol = 84 master for gametype = WOETS master query = end # NetPanzer > 0.1.6 gametype NETP new extend GPS name = NetPanzer template var = NETPANZER end gametype NETPM new extend GSM name = NetPanzer Master template var = NETPANZERMASTER master for gametype = NETP end gametype STMHL2 new extend STM name = Steam Master for HL2 template var = STEAMMASTERHL2 master for gametype = HL2S default port = 27011 end gametype STMA2S new extend STM name = Steam Master for A2S template var = STEAMMASTERA2S master for gametype = A2S default port = 27011 end gametype UT2004S new extend UT2S name = UT2004 template var = UT2004 end gametype UT2004M modify master for gametype = UT2004S end gametype NEXUIZS new extend Q3S name = Nexuiz template var = NEXUIZ game rule = gamename end gametype NEXUIZM new extend Q3M name = Nexuiz Master template var = NEXUIZMASTER default port = 27950 master packet = \377\377\377\377getservers Nexuiz %s %s master protocol = 3 master query = empty full master for gametype = NEXUIZS end gametype WARSOWS new extend Q2S name = Warsow default port = 44400 template var = WARSOW game rule = gamename status packet = \377\377\377\377getinfo end gametype WARSOWM new extend Q3M name = Warsow Master template var = WARSOWMASTER default port = 27950 master packet = \377\377\377\377getservers Warsow %s %s master protocol = 8 master query = empty full master for gametype = WARSOWS end gametype TREMULOUS new extend Q3S name = Tremulous template var = TREMULOUS game rule = gamename end gametype TREMULOUSM new extend Q3M name = Tremulous Master template var = TREMULOUSMASTER default port = 30710 master protocol = 69 master for gametype = TREMULOUS end gametype HLA2S new extend A2S name = Half-Life template var = HLA2S end gametype HLA2SM new extend STM master for gametype = HLA2S default port = 27010 end gametype PREYM new extend DM3M name = Prey Master template var = PREYMASTER default port = 27655 master query = empty full master for gametype = PREYS end xqf-1.0.5/src/pref.c0000644002404400000620000052037610520644446011141 00000000000000/* XQF - Quake server browser and launcher * Copyright (C) 1998-2000 Roman Pozlevich * * 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 */ #include "gnuconfig.h" #include /* FD_SETSIZE */ #include /* fprintf */ #include /* strtol */ #include /* strcmp, strlen */ #include /* FD_SETSIZE */ #include /* stat */ #include /* readlink */ #include /* setrlimit */ #include #include #include "i18n.h" #include "xqf.h" #include "xqf-ui.h" #include "game.h" #include "pref.h" #include "dialogs.h" #include "skin.h" #include "utils.h" #include "srv-prop.h" #include "pixmaps.h" #include "xutils.h" #include "config.h" #include "rc.h" #include "debug.h" #include "sort.h" #include "q3maps.h" #include "splash.h" #include "srv-list.h" #include "scripts.h" static struct generic_prefs* new_generic_prefs (void); static GtkWidget *custom_args_options_page (enum server_type type); static void scan_maps_for(enum server_type type); char *user_rcdir = NULL; char *default_q1_name = NULL; char *default_qw_name = NULL; char *default_q2_name = NULL; char *default_t2_name = NULL; char *default_qw_team = NULL; char *default_qw_skin = NULL; char *default_q2_skin = NULL; int default_q1_top_color = 0; int default_q1_bottom_color = 0; int default_qw_top_color = 0; int default_qw_bottom_color = 0; int default_qw_rate; int default_q2_rate; int default_qw_cl_nodelta; int default_q2_cl_nodelta; int default_qw_cl_predict; int default_q2_cl_predict; int default_noaim; int default_qw_noskins; int default_q2_noskins; int default_b_switch; int default_w_switch; int pushlatency_mode; int pushlatency_value; int default_nosound; int default_nocdaudio; int show_hostnames; int show_default_port; int serverlist_countbots; int default_terminate; int default_iconify; int default_launchinfo; int default_stopxmms; int default_prelaunchexec; int default_save_lists; int default_save_srvinfo; int default_save_plrinfo; int default_auto_favorites; int default_show_splash; int default_auto_maps; int skip_startup_mapscan; int default_show_tray_icon; int default_toolbar_style; int default_toolbar_tips; int default_refresh_sorts; int default_refresh_on_update; int default_resolve_on_update; int default_show_only_configured_games; char* default_icontheme; int maxretries; int maxsimultaneous; char* qstat_srcip; unsigned short qstat_srcport_low; unsigned short qstat_srcport_high; gboolean qstat_srcport_changed; gboolean qstat_srcip_changed; int sound_enable; char *sound_player = NULL; char *sound_xqf_start = NULL; char *sound_xqf_quit = NULL; char *sound_update_done = NULL; char *sound_refresh_done = NULL; char *sound_stop = NULL; char *sound_server_connect = NULL; char *sound_redial_success = NULL; gboolean use_custom_gtkrc; GtkTooltips *tooltips; static int pref_q1_top_color; static int pref_q1_bottom_color; static int pref_qw_top_color; static int pref_qw_bottom_color; static int pref_b_switch; static int pref_w_switch; static int pref_qw_noskins; static int pref_q2_noskins; static char *pref_qw_skin; static char *pref_q2_skin; static GtkWidget *games_notebook; static GtkWidget *pref_notebook; static GtkWidget *rate_spinner[2]; static GtkWidget *cl_nodelta_check_button[2]; static GtkWidget *cl_predict_check_button[2]; static GtkWidget *noaim_check_button; static GtkWidget *nosound_check_button; static GtkWidget *nocdaudio_check_button; static GtkWidget *name_q1_entry; static GtkWidget *name_qw_entry; static GtkWidget *name_q2_entry; static GtkWidget *name_t2_entry; static GtkWidget *team_qw_entry; static GtkWidget *q1_skin_preview = NULL; static GtkWidget *qw_skin_preview = NULL; static GtkWidget *q2_skin_preview = NULL; static GtkWidget *qw_skin_combo; static GtkWidget *q2_skin_combo; static GtkWidget *q1_top_color_button; static GtkWidget *q1_bottom_color_button; static GtkWidget *qw_top_color_button; static GtkWidget *qw_bottom_color_button; static GtkWidget *terminate_check_button; static GtkWidget *iconify_check_button; static GtkWidget *launchinfo_check_button; static GtkWidget *stopxmms_check_button; static GtkWidget *prelaunchexec_check_button; static GtkWidget *save_lists_check_button; static GtkWidget *save_srvinfo_check_button; static GtkWidget *save_plrinfo_check_button; static GtkWidget *auto_favorites_check_button; static GtkWidget *show_splash_button; static GtkWidget *auto_maps_check_button; #ifdef USE_GTK2 static GtkWidget *tray_icon_check_button; #endif static GtkWidget *show_hostnames_check_button; static GtkWidget *show_defport_check_button; static GtkWidget *toolbar_style_radio_buttons[3]; static GtkWidget *toolbar_tips_check_button; static GtkWidget *countbots_check_button; static GtkWidget *refresh_sorts_check_button; static GtkWidget *refresh_on_update_check_button; static GtkWidget *resolve_on_update_check_button; static GtkWidget *show_only_configured_games_check_button; static GtkWidget *use_custom_gtkrc_check_button; static GtkWidget *pushlatency_mode_radio_buttons[3]; static GtkWidget *pushlatency_value_spinner; static GtkWidget *maxretries_spinner; static GtkWidget *maxsimultaneous_spinner; static GtkWidget *qstat_srcip_entry; static GtkWidget *qstat_srcport_entry_low; static GtkWidget *qstat_srcport_entry_high; static GtkWidget *sound_enable_check_button; static GtkWidget *sound_player_entry; static GtkWidget *sound_xqf_start_entry; static GtkWidget *sound_xqf_quit_entry; static GtkWidget *sound_update_done_entry; static GtkWidget *sound_refresh_done_entry; static GtkWidget *sound_stop_entry; static GtkWidget *sound_server_connect_entry; static GtkWidget *sound_redial_success_entry; static GtkWidget *sound_player_file_dialog_button; static GtkWidget *sound_xqf_start_file_dialog_button; static GtkWidget *sound_xqf_quit_file_dialog_button; static GtkWidget *sound_update_done_file_dialog_button; static GtkWidget *sound_refresh_done_file_dialog_button; static GtkWidget *sound_stop_file_dialog_button; static GtkWidget *sound_server_connect_file_dialog_button; static GtkWidget *sound_redial_success_file_dialog_button; static GtkWidget *sound_xqf_start_file_test_button; static GtkWidget *sound_xqf_start_file_test_button; static GtkWidget *sound_xqf_quit_file_test_button; static GtkWidget *sound_update_done_file_test_button; static GtkWidget *sound_refresh_done_file_test_button; static GtkWidget *sound_stop_file_test_button; static GtkWidget *sound_server_connect_file_test_button; static GtkWidget *sound_redial_success_file_test_button; static guchar *q1_skin_data = NULL; static int q1_skin_is_valid = TRUE; static guchar *qw_skin_data = NULL; static int qw_skin_is_valid = TRUE; static guchar *q2_skin_data = NULL; static int q2_skin_is_valid = TRUE; static GtkWidget *color_menu = NULL; static GtkWidget *custom_args_add_button[GAMES_TOTAL]; static GtkWidget *custom_args_entry_game[GAMES_TOTAL]; static GtkWidget *custom_args_entry_args[GAMES_TOTAL]; static int current_row = -1; struct generic_prefs { char *pref_dir; char *real_dir; GtkWidget *dir_entry; GtkWidget *cmd_entry; GtkWidget *cfg_combo; GtkWidget *game_button; // function for adding game specific tabs to notebook void (*add_options_to_notebook) (GtkWidget *notebook, enum server_type type); // game specific data GData* games_data; GSList *custom_args; } *genprefs = NULL; enum { Q3_PREF_SETFS_GAME = 0x01, Q3_PREF_PB = 0x02, Q3_PREF_CONSOLE = 0x04, }; /* Quake 3 settings */ struct q3_common_prefs_s { const char** protocols; const char* defproto; unsigned flags; GtkWidget *setfs_gamebutton; GtkWidget *set_punkbusterbutton; GtkWidget *proto_entry; GtkWidget *console_button; }; // change config_get_string below too! static const char* q3_masterprotocols[] = { "68 - v1.32", "67 - v1.31", "66 - v1.30", "48 - v1.27", "46 - v1.25", "45 - v1.17", "43 - v1.11", NULL }; static struct q3_common_prefs_s q3_prefs = { protocols: q3_masterprotocols, defproto : "68", flags : Q3_PREF_SETFS_GAME | Q3_PREF_PB, }; static GtkWidget *pass_memory_options_button; static GtkWidget *com_hunkmegs_spinner; static GtkWidget *com_soundmegs_spinner; static GtkWidget *com_zonemegs_spinner; static GtkWidget *cg_precachedmodels_spinner; // change config_get_string below too! static const char* wo_masterprotocols[] = { "60 - v1.4", "59 - v1.32", "58 - v1.3", "57 - retail", "56 - test2", "55 - test1", NULL }; static struct q3_common_prefs_s wo_prefs = { protocols: wo_masterprotocols, defproto : "60", flags : Q3_PREF_SETFS_GAME | Q3_PREF_PB, }; // change config_get_string below too! static const char* woet_masterprotocols[] = { "84 - v2.60", "83 - v2.56", "82 - v2.55 (Release)", "71 - v2.32 (test)", NULL }; static struct q3_common_prefs_s woet_prefs = { protocols: woet_masterprotocols, defproto : "84", flags : Q3_PREF_SETFS_GAME | Q3_PREF_PB, }; static const char* ef_masterprotocols[] = { "24", NULL }; static struct q3_common_prefs_s ef_prefs = { protocols: ef_masterprotocols, defproto : "24", }; static const char* cod_masterprotocols[] = { "6 - v1.5", "5 - v1.4", "1 - retail", NULL }; static struct q3_common_prefs_s cod_prefs = { protocols: cod_masterprotocols, defproto : "5", }; static const char* jk3_masterprotocols[] = { "26 - v1.01", "25 - v1.0", NULL }; static struct q3_common_prefs_s jk3_prefs = { protocols: jk3_masterprotocols, defproto : "26", }; static const char* sof2_masterprotocols[] = { "2004 - SOF2 1.02", "2003 - SOF2 1.01", "2002 - SOF2 1.00", NULL }; static struct q3_common_prefs_s sof2_prefs = { protocols: sof2_masterprotocols, defproto : "2004", }; static const char* doom3_masterprotocols[] = { "auto", "1.40 - 1.3.1302", "1.35 - 1.1.1282", "1.33 - retail", NULL }; static struct q3_common_prefs_s doom3_prefs = { protocols: doom3_masterprotocols, defproto : "auto", flags : Q3_PREF_PB, }; static const char* quake4_masterprotocols[] = { "auto", "0 - any", "2.63 - German retail", "2.62 - retail", NULL }; static struct q3_common_prefs_s q4_prefs = { protocols: quake4_masterprotocols, defproto : "auto", flags : Q3_PREF_PB | Q3_PREF_CONSOLE, }; static const char* nexuiz_masterprotocols[] = { "3", NULL }; static struct q3_common_prefs_s nexuiz_prefs = { protocols: nexuiz_masterprotocols, defproto : "3", }; static const char* warsow_masterprotocols[] = { "8 - v0.2", "7 - v0.1", "6 - v0.072", NULL }; static struct q3_common_prefs_s warsow_prefs = { protocols: warsow_masterprotocols, defproto : "6", }; static const char* tremulous_masterprotocols[] = { "auto", "69 - v1.1.0", NULL }; static struct q3_common_prefs_s tremulous_prefs = { protocols: tremulous_masterprotocols, defproto : "69", }; static struct q3_common_prefs_s* get_pref_widgets_for_game(enum server_type type); static void game_file_dialog(enum server_type type); static void game_dir_dialog(enum server_type type); static void game_file_activate_callback(enum server_type type); static void sound_player_file_dialog(); static void sound_xqf_start_file_dialog(); static void sound_xqf_quit_file_dialog(); static void sound_update_done_file_dialog(); static void sound_refresh_done_file_dialog(); static void sound_stop_file_dialog(); static void sound_server_connect_file_dialog(); static void sound_redial_success_file_dialog(); static inline int compare_slist_strings (gconstpointer str1, gconstpointer str2) { int res; if (str1) { if (str2) { res = g_strcasecmp (str1, str2); if (!res) res = strcmp (str1, str2); } else { res = 1; } } else { res = (str2)? -1 : 0; } return res; } static void get_new_defaults_for_game (enum server_type type) { struct game *g = &games[type]; struct generic_prefs *prefs = &genprefs[type]; char buf[256]; debug (5, "get_new_defaults_for_game(%d)",type); if (prefs->cmd_entry) { if (g->cmd) g_free (g->cmd); g->cmd = strdup_strip (gtk_entry_get_text (GTK_ENTRY (prefs->cmd_entry))); } if (prefs->dir_entry) { if (g->dir) g_free (g->dir); g->dir = strdup_strip (gtk_entry_get_text (GTK_ENTRY (prefs->dir_entry))); if (g->real_dir) g_free (g->real_dir); g->real_dir = expand_tilde (g->dir); if (prefs->pref_dir) g_free (prefs->pref_dir); prefs->pref_dir = NULL; if (prefs->real_dir) g_free (prefs->real_dir); prefs->real_dir = NULL; } if (prefs->cfg_combo) { if (g->game_cfg) g_free (g->game_cfg); g->game_cfg = strdup_strip (gtk_entry_get_text ( GTK_ENTRY (GTK_COMBO (prefs->cfg_combo)->entry))); } g_snprintf (buf, sizeof(buf), "/" CONFIG_FILE "/Game: %s", type2id (type)); config_push_prefix (buf); if (g->cmd) config_set_string ("cmd", g->cmd); else config_clean_key ("cmd"); if (g->dir) config_set_string ("dir", g->dir); else config_clean_key ("dir"); if (g->game_cfg) config_set_string ("custom cfg", g->game_cfg); else config_clean_key ("custom cfg"); // Set custom arguments if (g->custom_args) g_slist_free (g->custom_args); g->custom_args = g_slist_sort (prefs->custom_args, compare_slist_strings); { int i = 0; char *str = NULL; int isdefault = FALSE; GSList *list = g->custom_args; for (i = 0;list; list = g_slist_next(list), ++i) { g_snprintf (buf, sizeof(buf), "custom_arg%d", i); config_set_string (buf, (char *) list->data); } // Clear remaining existing arguments g_snprintf (buf, sizeof(buf), "custom_arg%d", i); str = config_get_string_with_default (buf,&isdefault); while (!isdefault) { config_clean_key (buf); ++i; g_snprintf (buf, sizeof(buf), "custom_arg%d", i); g_free(str); str = config_get_string_with_default (buf,&isdefault); } } if(g->update_prefs) g->update_prefs(g); config_pop_prefix (); } static void load_game_defaults (enum server_type type) { struct game *g = &games[type]; char str[256]; int isdefault = FALSE; char *str2; char conf[64]; int j; g_snprintf (str, 256, "/" CONFIG_FILE "/Game: %s", type2id (type)); config_push_prefix (str); g_free (g->cmd); g->cmd = config_get_string ("cmd"); g_free (g->dir); g->dir = config_get_string ("dir"); g_free (g->real_dir); g->real_dir = expand_tilde (g->dir); g_free (g->game_cfg); g->game_cfg = config_get_string ("custom cfg"); g->real_home = expand_tilde (g->default_home); // Load custom arguments j = 0; g_snprintf (conf, 64, "custom_arg%d", j); str2 = config_get_string_with_default (conf,&isdefault); while (!isdefault) { g->custom_args = g_slist_append(g->custom_args, str2); debug(2,"game: %s: %s=%s",type2id (type), conf,str2); ++j; g_snprintf (conf, sizeof(conf), "custom_arg%d", j); str2 = config_get_string_with_default (conf,&isdefault); } config_pop_prefix (); } // verify Quake3 settings, return false if something's not ok int verify_q3_settings (void) { int com_hunkmegs = 0; int com_zonemegs = 0; int com_soundmegs = 0; int cg_precachedmodels = 0; com_hunkmegs = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON(com_hunkmegs_spinner)); com_soundmegs = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON(com_soundmegs_spinner)); com_zonemegs = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON(com_zonemegs_spinner)); cg_precachedmodels = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON(cg_precachedmodels_spinner)); if( com_soundmegs + com_zonemegs >= com_hunkmegs ) { dialog_ok (NULL, _("com_soundmegs and com_zonemegs must be lower than com_hunkmegs")); return FALSE; } return TRUE; } void q1_update_prefs (struct game* g) { char* str; if (pref_q1_top_color != default_q1_top_color) config_set_int ("top", default_q1_top_color = pref_q1_top_color); if (pref_q1_bottom_color != default_q1_bottom_color) config_set_int ("bottom", default_q1_bottom_color = pref_q1_bottom_color); str = strdup_strip (gtk_entry_get_text (GTK_ENTRY (name_q1_entry))); if (str == NULL || default_q1_name == NULL || (default_q1_name && strcmp (str, default_q1_name))) { if (default_q1_name) g_free (default_q1_name); default_q1_name = str; config_set_string ("player name", (str)? str : ""); } str=NULL; } /* QuakeWorld (some network settings are used by Q2) */ void qw_update_prefs (struct game* g) { char* str; int i; str = strdup_strip (gtk_entry_get_text (GTK_ENTRY (name_qw_entry))); if (str == NULL || default_qw_name == NULL || (default_qw_name && strcmp (str, default_qw_name))) { if (default_qw_name) g_free (default_qw_name); default_qw_name = str; config_set_string ("player name", (str)? str : ""); } str=NULL; str = strdup_strip (gtk_entry_get_text (GTK_ENTRY (team_qw_entry))); if (str == NULL || default_qw_team == NULL || (default_qw_team && strcmp (str, default_qw_team))) { if (default_qw_team) g_free (default_qw_team); default_qw_team = str; config_set_string ("team", (str)? str : ""); } str=NULL; if (pref_qw_top_color != default_qw_top_color) config_set_int ("top", default_qw_top_color = pref_qw_top_color); if (pref_qw_bottom_color != default_qw_bottom_color) config_set_int ("bottom", default_qw_bottom_color = pref_qw_bottom_color); if (pref_qw_skin == NULL || (default_qw_skin && strcmp (pref_qw_skin, default_qw_skin))) { if (default_qw_skin) g_free (default_qw_skin); default_qw_skin = pref_qw_skin; config_set_string ("skin", (pref_qw_skin)? pref_qw_skin : ""); } pref_qw_skin = NULL; i = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (rate_spinner[0])); if (i != default_qw_rate) config_set_int ("rate", default_qw_rate = i); i = GTK_TOGGLE_BUTTON (cl_nodelta_check_button[0])->active; if (i != default_qw_cl_nodelta) config_set_int ("cl_nodelta", default_qw_cl_nodelta = i); i = 1 - GTK_TOGGLE_BUTTON (cl_predict_check_button[0])->active; if (i != default_qw_cl_predict) config_set_int ("cl_predict", default_qw_cl_predict = i); if (pref_qw_noskins != default_qw_noskins) config_set_int ("noskins", default_qw_noskins = pref_qw_noskins); i = GTK_TOGGLE_BUTTON (noaim_check_button)->active; if (i != default_noaim) config_set_int ("noaim", default_noaim = i); for (i = 0; i < 3; i++) { if (GTK_TOGGLE_BUTTON (pushlatency_mode_radio_buttons[i])->active) { if (i != pushlatency_mode) config_set_int ("pushlatency mode", pushlatency_mode = i); break; } } i = gtk_spin_button_get_value_as_int ( GTK_SPIN_BUTTON (pushlatency_value_spinner)); if (i != pushlatency_value) config_set_int ("pushlatency value", pushlatency_value = i); if (pref_b_switch != default_b_switch) config_set_int ("b_switch", default_b_switch = pref_b_switch); if (pref_w_switch != default_w_switch) config_set_int ("w_switch", default_w_switch = pref_w_switch); } void q2_update_prefs (struct game* g) { char* str; int i; if (pref_q2_skin == NULL || (default_q2_skin && strcmp (pref_q2_skin, default_q2_skin))) { if (default_q2_skin) g_free (default_q2_skin); default_q2_skin = pref_q2_skin; config_set_string ("skin", (pref_q2_skin)? pref_q2_skin : ""); } pref_q2_skin = NULL; str = strdup_strip (gtk_entry_get_text (GTK_ENTRY (name_q2_entry))); if (str == NULL || default_q2_name == NULL || (default_q2_name && strcmp (str, default_q2_name))) { if (default_q2_name) g_free (default_q2_name); default_q2_name = str; config_set_string ("player name", (str)? str : ""); } str=NULL; i = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (rate_spinner[1])); if (i != default_q2_rate) config_set_int ("rate", default_q2_rate = i); i = GTK_TOGGLE_BUTTON (cl_nodelta_check_button[1])->active; if (i != default_q2_cl_nodelta) config_set_int ("cl_nodelta", default_q2_cl_nodelta = i); i = 1 - GTK_TOGGLE_BUTTON (cl_predict_check_button[1])->active; if (i != default_q2_cl_predict) config_set_int ("cl_predict", default_q2_cl_predict = i); if (pref_q2_noskins != default_q2_noskins) config_set_int ("noskins", default_q2_noskins = pref_q2_noskins); } void q3_update_prefs_common (struct game* g) { char* str, *str1; const char* strold; int i; enum server_type type = g->type; struct q3_common_prefs_s* w; w = get_pref_widgets_for_game(type); g_return_if_fail(w != NULL); str = strdup_strip (gtk_entry_get_text (GTK_ENTRY (GTK_COMBO (w->proto_entry)->entry))); // locate first space and mark it as str's end str1 = strchr(str,' '); if (str1) *str1='\0'; strold = game_get_attribute(type,"masterprotocol"); if(strcmp(str, strold?strold:"")) { game_set_attribute(type,"masterprotocol",strdup_strip(str)); config_set_string ("protocol", (str)? str : ""); } g_free(str); str=NULL; if(w->setfs_gamebutton) { int o; i = GTK_TOGGLE_BUTTON (w->setfs_gamebutton)->active; o = str2bool(game_get_attribute(type,"setfs_game")); if(i != o) { config_set_bool ("setfs_game", i); game_set_attribute(type,"setfs_game",g_strdup(bool2str(i))); } } if(w->set_punkbusterbutton) { int o; i = GTK_TOGGLE_BUTTON (w->set_punkbusterbutton)->active; o = str2bool(game_get_attribute(type,"set_punkbuster")); if(i != o) { config_set_bool ("set_punkbuster", i); game_set_attribute(type,"set_punkbuster",g_strdup(bool2str(i))); } } if(w->console_button) { int o; i = GTK_TOGGLE_BUTTON (w->console_button)->active; o = str2bool(game_get_attribute(type,"enable_console")); if(i != o) { config_set_bool ("enable_console", i); game_set_attribute(type,"enable_console",g_strdup(bool2str(i))); } } } void q3_update_prefs (struct game* g) { int i; enum server_type type = g->type; struct q3_common_prefs_s* w; w = get_pref_widgets_for_game(type); g_return_if_fail(w != NULL); q3_update_prefs_common(g); i = GTK_TOGGLE_BUTTON (pass_memory_options_button)->active; config_set_bool ("pass_memory_options", i); game_set_attribute(type,"pass_memory_options",g_strdup(bool2str(i))); i = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON(com_hunkmegs_spinner)); config_set_int ("com_hunkmegs", i); game_set_attribute(type,"com_hunkmegs",g_strdup_printf("%d",i)); i = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON(com_soundmegs_spinner)); config_set_int ("com_soundmegs", i); game_set_attribute(type,"com_soundmegs",g_strdup_printf("%d",i)); i = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON(com_zonemegs_spinner)); config_set_int ("com_zonemegs", i); game_set_attribute(type,"com_zonemegs",g_strdup_printf("%d",i)); i = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON(cg_precachedmodels_spinner)); config_set_int ("cg_precachedmodels", i); game_set_attribute(type,"cg_precachedmodels",g_strdup_printf("%d",i)); } static void doom3_detect_version(struct game* g) { FILE* f = NULL; char* verinfo = NULL; const char* attrproto; char line[64]; debug(3, "cmd: %s, dir: %s", g->cmd, g->real_dir); attrproto = game_get_attribute(g->type,"masterprotocol"); if(g->real_home && *g->real_home) { verinfo = file_in_dir (g->real_home, "version.info"); f = fopen(verinfo, "r"); } if(!f) { g_free(verinfo); verinfo = file_in_dir (g->real_dir, "version.info"); f = fopen(verinfo, "r"); } if(!f) goto out; if(!fgets(line, sizeof(line), f)) goto out; if(!fgets(line, sizeof(line), f)) goto out; if(strlen(line) && line[strlen(line)-1] == '\n') line[strlen(line)-1] = '\0'; debug(3, "detected %s protocol version %s", g->name, line); game_set_attribute(g->type, "_masterprotocol", g_strdup(line)); out: if(f) fclose(f); g_free(verinfo); } void doom3_update_prefs (struct game* g) { q3_update_prefs_common(g); doom3_detect_version(g); } void quake4_update_prefs (struct game* g) { q3_update_prefs_common(g); doom3_detect_version(g); } void tremulous_update_prefs (struct game* g) { q3_update_prefs_common(g); doom3_detect_version(g); } void tribes2_update_prefs (struct game* g) { char* str; str = strdup_strip (gtk_entry_get_text (GTK_ENTRY (name_t2_entry))); if (str == NULL || default_t2_name == NULL || (default_t2_name && strcmp (str, default_t2_name))) { if (default_t2_name) g_free (default_t2_name); default_t2_name = str; config_set_string ("player name", (str)? str : ""); } str=NULL; } static void ut2004_detect_cdkey(struct game* g) { FILE* f = NULL; char* keyfile = NULL; debug(2, "cmd: %s, dir: %s, home: %s", g->cmd, g->real_dir, g->real_home); keyfile = file_in_dir (g->real_home, "System/cdkey"); if(keyfile) { f = fopen(keyfile, "r"); if(!f) { g_free(keyfile); keyfile = NULL; } } if(!keyfile) { if(f) fclose(f); keyfile = file_in_dir (g->real_dir, "System/cdkey"); if(keyfile) { f = fopen(keyfile, "r"); if(!f) { g_free(keyfile); keyfile = NULL; } } } if(keyfile || (!keyfile && game_get_attribute(g->type,"cdkey"))) game_set_attribute(g->type, "cdkey", keyfile); if(f) fclose(f); } void ut2004_update_prefs (struct game* g) { ut2004_detect_cdkey(g); } static void get_new_defaults (void) { int i; debug (5, "get_new_defaults()"); /* Common part of games config */ config_push_prefix ("/" CONFIG_FILE "/Games Config"); i = GTK_TOGGLE_BUTTON (nosound_check_button)->active; if (i != default_nosound) config_set_bool ("nosound", default_nosound = i); i = GTK_TOGGLE_BUTTON (nocdaudio_check_button)->active; if (i != default_nocdaudio) config_set_bool ("nocdaudio", default_nocdaudio = i); config_pop_prefix (); for (i = 0; i < GAMES_TOTAL; i++) get_new_defaults_for_game (i); /* Appearance */ config_push_prefix ("/" CONFIG_FILE "/Appearance"); for (i = 0; i < 3; i++) { if (GTK_TOGGLE_BUTTON (toolbar_style_radio_buttons[i])->active) { if (i != default_toolbar_style) config_set_int ("toolbar style", default_toolbar_style = i); break; } } i = GTK_TOGGLE_BUTTON (toolbar_tips_check_button)->active; if (i != default_toolbar_tips) config_set_bool ("toolbar tips", default_toolbar_tips = i); i = GTK_TOGGLE_BUTTON (countbots_check_button)->active; if (i != serverlist_countbots) config_set_bool ("count bots", serverlist_countbots = i); i = GTK_TOGGLE_BUTTON (refresh_sorts_check_button)->active; if (i != default_refresh_sorts) config_set_bool ("sort on refresh", default_refresh_sorts = i); i = GTK_TOGGLE_BUTTON (refresh_on_update_check_button)->active; if (i != default_refresh_on_update) config_set_bool ("refresh on update", default_refresh_on_update = i); i = GTK_TOGGLE_BUTTON (resolve_on_update_check_button)->active; if (i != default_resolve_on_update) config_set_bool ("resolve on update", default_resolve_on_update = i); i = GTK_TOGGLE_BUTTON (show_only_configured_games_check_button)->active; if (i != default_show_only_configured_games) config_set_bool ("show only configured games", default_show_only_configured_games = i); i = GTK_TOGGLE_BUTTON (use_custom_gtkrc_check_button)->active; if (i != use_custom_gtkrc) config_set_bool ("use custom gtkrc", use_custom_gtkrc = i); config_pop_prefix (); /* General */ config_push_prefix ("/" CONFIG_FILE "/General"); i = GTK_TOGGLE_BUTTON (terminate_check_button)->active; if (i != default_terminate) config_set_bool ("terminate", default_terminate = i); i = GTK_TOGGLE_BUTTON (iconify_check_button)->active; if (i != default_iconify) config_set_bool ("iconify", default_iconify = i); i = GTK_TOGGLE_BUTTON (launchinfo_check_button)->active; if (i != default_launchinfo) config_set_bool ("launchinfo", default_launchinfo = i); i = GTK_TOGGLE_BUTTON (stopxmms_check_button)->active; if (i != default_stopxmms) config_set_bool ("stopxmms", default_stopxmms = i); i = GTK_TOGGLE_BUTTON (prelaunchexec_check_button)->active; if (i != default_prelaunchexec) config_set_bool ("prelaunchexec", default_prelaunchexec = i); i = GTK_TOGGLE_BUTTON (save_lists_check_button)->active; if (i != default_save_lists) config_set_bool ("save lists", default_save_lists = i); i = GTK_TOGGLE_BUTTON (save_srvinfo_check_button)->active; if (i != default_save_srvinfo) config_set_bool ("save srvinfo", default_save_srvinfo = i); i = GTK_TOGGLE_BUTTON (save_plrinfo_check_button)->active; if (i != default_save_plrinfo) config_set_bool ("save players", default_save_plrinfo = i); i = GTK_TOGGLE_BUTTON (auto_favorites_check_button)->active; if (i != default_auto_favorites) config_set_bool ("refresh favorites", default_auto_favorites = i); i = GTK_TOGGLE_BUTTON (show_splash_button)->active; if (i != default_show_splash) config_set_bool ("splash screen", default_show_splash = i); i = GTK_TOGGLE_BUTTON (auto_maps_check_button)->active; if (i != default_auto_maps) config_set_bool ("search maps", default_auto_maps = i); #ifdef USE_GTK2 i = GTK_TOGGLE_BUTTON (tray_icon_check_button)->active; if (i != default_show_tray_icon) config_set_bool ("showtray", default_show_tray_icon = i); #endif config_pop_prefix (); /* QStat */ config_push_prefix ("/" CONFIG_FILE "/QStat"); i = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (maxretries_spinner)); if (i != maxretries) config_set_int ("maxretires", maxretries = i); i = gtk_spin_button_get_value_as_int ( GTK_SPIN_BUTTON (maxsimultaneous_spinner)); if (i != maxsimultaneous) config_set_int ("maxsimultaneous", maxsimultaneous = i); if(qstat_srcip_changed) { if(qstat_srcip) config_set_string ("srcip", qstat_srcip); else config_clean_key("srcip"); qstat_srcip_changed = FALSE; } if(qstat_srcport_changed) { if(qstat_srcport_low) { config_set_int ("port_low", qstat_srcport_low); config_set_int ("port_high", qstat_srcport_high); } else { config_clean_key("port_low"); config_clean_key("port_high"); } qstat_srcport_changed = FALSE; } config_pop_prefix (); /* Sounds */ config_push_prefix ("/" CONFIG_FILE "/Sounds"); i = GTK_TOGGLE_BUTTON (sound_enable_check_button)->active; if (i != sound_enable) config_set_bool ("sound_enable", sound_enable = i); sound_player = strdup_strip (gtk_entry_get_text (GTK_ENTRY (sound_player_entry))); config_set_string ("sound_player", (sound_player)? sound_player : ""); sound_xqf_start = strdup_strip (gtk_entry_get_text (GTK_ENTRY (sound_xqf_start_entry))); config_set_string ("sound_xqf_start", (sound_xqf_start)? sound_xqf_start : ""); sound_xqf_quit = strdup_strip (gtk_entry_get_text (GTK_ENTRY (sound_xqf_quit_entry))); config_set_string ("sound_xqf_quit", (sound_xqf_quit)? sound_xqf_quit : ""); sound_update_done = strdup_strip (gtk_entry_get_text (GTK_ENTRY (sound_update_done_entry))); config_set_string ("sound_update_done", (sound_update_done)? sound_update_done : ""); sound_refresh_done = strdup_strip (gtk_entry_get_text (GTK_ENTRY (sound_refresh_done_entry))); config_set_string ("sound_refresh_done", (sound_refresh_done)? sound_refresh_done : ""); sound_stop = strdup_strip (gtk_entry_get_text (GTK_ENTRY (sound_stop_entry))); config_set_string ("sound_stop", (sound_stop)? sound_stop : ""); sound_server_connect = strdup_strip (gtk_entry_get_text (GTK_ENTRY (sound_server_connect_entry))); config_set_string ("sound_server_connect", (sound_server_connect)? sound_server_connect : ""); sound_redial_success = strdup_strip (gtk_entry_get_text (GTK_ENTRY (sound_redial_success_entry))); config_set_string ("sound_redial_success", (sound_redial_success)? sound_redial_success : ""); config_pop_prefix (); /* These are set from chained calls to "activate" callbacks */ gtk_check_menu_item_set_active ( GTK_CHECK_MENU_ITEM (view_hostnames_menu_item), GTK_TOGGLE_BUTTON (show_hostnames_check_button)->active); gtk_check_menu_item_set_active ( GTK_CHECK_MENU_ITEM (view_defport_menu_item), GTK_TOGGLE_BUTTON (show_defport_check_button)->active); // i = gtk_notebook_get_current_page (GTK_NOTEBOOK (profile_notebook)); // config_set_string ("/" CONFIG_FILE "/Player Profile/game", type2id (i)); i = gtk_notebook_get_current_page (GTK_NOTEBOOK (games_notebook)); config_set_string ("/" CONFIG_FILE "/Games Config/game", type2id (i)); config_sync (); rc_save (); } static int check_qstat_source_port() { unsigned short low, high; const char* val; struct in_addr in; val = gtk_entry_get_text(GTK_ENTRY(qstat_srcport_entry_low)); low = atoi(val); val = gtk_entry_get_text(GTK_ENTRY(qstat_srcport_entry_high)); high = atoi(val); val = gtk_entry_get_text(GTK_ENTRY(qstat_srcip_entry)); if(val && *val) { if(!inet_aton(val, &in)) { dialog_ok(NULL, _("Invalid source IP address")); gtk_notebook_set_page (GTK_NOTEBOOK (pref_notebook), PREF_PAGE_QSTAT); return FALSE; } else { val = inet_ntoa(in); } } if((low != 0 || high != 0) && (low < 1024 || high < 1024 || low > high)) { dialog_ok(NULL, _("Invalid source port range")); gtk_notebook_set_page (GTK_NOTEBOOK (pref_notebook), PREF_PAGE_QSTAT); return FALSE; } if(val && *val) { if(!qstat_srcip || strcmp(qstat_srcip,val)) { g_free(qstat_srcip); qstat_srcip = g_strdup(val); qstat_srcip_changed = TRUE; } } else if(qstat_srcip) { g_free(qstat_srcip); qstat_srcip = NULL; qstat_srcip_changed = TRUE; } if(qstat_srcport_low != low) { qstat_srcport_low = low; qstat_srcport_changed = TRUE; } if(qstat_srcport_high != high) { qstat_srcport_high = high; qstat_srcport_changed = TRUE; } return TRUE; } // call various verification fuctions, store settings and destroy preferences // window if everything's fine static void ok_callback (GtkWidget *widget, GtkWidget* window) { if(!verify_q3_settings()) return; if(!check_qstat_source_port()) return; if(!check_script_prefs()) return; save_script_prefs(); get_new_defaults(); gtk_widget_destroy(window); // Refresh list of sources on screen in case the 'Show only configured games' // setting has changes, or a game command line has been added or removed. refresh_source_list(); // Enable / disable tooltips after config change if (default_toolbar_tips) gtk_tooltips_enable(tooltips); else gtk_tooltips_disable(tooltips); } static void update_q1_skin (void) { if (q1_skin_preview == NULL) return; /* no configuration window */ if (q1_skin_data) { g_free (q1_skin_data); q1_skin_data = NULL; } /* Use QuakeWorld 'base' skin */ q1_skin_data = get_qw_skin ("base", genprefs[QW_SERVER].real_dir); if (q1_skin_data || q1_skin_is_valid) { draw_qw_skin (q1_skin_preview, q1_skin_data, pref_q1_top_color, pref_q1_bottom_color); q1_skin_is_valid = (q1_skin_data)? TRUE : FALSE; } } static void update_qw_skins (char *initstr) { GList *list; char *str = NULL; if (qw_skin_preview == NULL) return; /* no configuration window */ if (qw_skin_data) { g_free (qw_skin_data); qw_skin_data = NULL; } list = get_qw_skin_list (genprefs[QW_SERVER].real_dir); if (initstr) { combo_set_vals (qw_skin_combo, list, initstr); } else { str = g_strdup (gtk_entry_get_text ( GTK_ENTRY (GTK_COMBO (qw_skin_combo)->entry))); combo_set_vals (qw_skin_combo, list, str); } if (list) { qw_skin_data = get_qw_skin (pref_qw_skin, genprefs[QW_SERVER].real_dir); g_list_foreach (list, (GFunc) g_free, NULL); g_list_free (list); } if (str) g_free (str); if (qw_skin_data || qw_skin_is_valid) { draw_qw_skin (qw_skin_preview, qw_skin_data, pref_qw_top_color, pref_qw_bottom_color); qw_skin_is_valid = (qw_skin_data)? TRUE : FALSE; } } static void update_q2_skins (char *initstr) { GList *list; char *str = NULL; if (q2_skin_preview == NULL) return; /* no configuration window */ if (q2_skin_data) { g_free (q2_skin_data); q2_skin_data = NULL; } list = get_q2_skin_list (genprefs[Q2_SERVER].real_dir); if (initstr) { combo_set_vals (q2_skin_combo, list, initstr); } else { str = g_strdup (gtk_entry_get_text ( GTK_ENTRY (GTK_COMBO (q2_skin_combo)->entry))); combo_set_vals (q2_skin_combo, list, str); } if (list) { q2_skin_data = get_q2_skin (pref_q2_skin, genprefs[Q2_SERVER].real_dir); g_list_foreach (list, (GFunc) g_free, NULL); g_list_free (list); } if (str) g_free (str); if (q2_skin_data || q2_skin_is_valid) { draw_q2_skin (q2_skin_preview, q2_skin_data, Q2_SKIN_SCALE); q2_skin_is_valid = (q2_skin_data)? TRUE : FALSE; } } static void update_cfgs (enum server_type type, char *dir, char *initstr) { struct generic_prefs *prefs = &genprefs[type]; GList *cfgs; char *str = NULL; debug (5, "update_cfgs(%d,%s,%s)",type,dir,initstr); if(!prefs->cfg_combo) return; cfgs = (*games[type].custom_cfgs) (&games[type], dir, NULL); if (initstr) { combo_set_vals (prefs->cfg_combo, cfgs, initstr); } else { str = g_strdup (gtk_entry_get_text ( GTK_ENTRY (GTK_COMBO (prefs->cfg_combo)->entry))); combo_set_vals (prefs->cfg_combo, cfgs, str); } if (cfgs) { g_list_foreach (cfgs, (GFunc) g_free, NULL); g_list_free (cfgs); } if (str) g_free (str); } static gboolean dir_entry_activate_callback (GtkWidget *widget, gpointer data) { struct generic_prefs *prefs; enum server_type type; type = GPOINTER_TO_INT(gtk_object_get_user_data (GTK_OBJECT (widget))); prefs = &genprefs[type]; debug (3, "type=%d",type); if (prefs->pref_dir) g_free (prefs->pref_dir); prefs->pref_dir = strdup_strip (gtk_entry_get_text ( GTK_ENTRY (prefs->dir_entry))); g_free (prefs->real_dir); prefs->real_dir = expand_tilde (prefs->pref_dir); if(games[type].cmd_or_dir_changed) games[type].cmd_or_dir_changed(&games[type]); update_cfgs (type, prefs->real_dir, NULL); return FALSE; } static void qw_skin_combo_changed_callback (GtkWidget *widget, gpointer data) { char *new_skin; new_skin = strdup_strip ( gtk_entry_get_text (GTK_ENTRY (GTK_COMBO (qw_skin_combo)->entry))); if (!pref_qw_skin && !new_skin) return; if (pref_qw_skin && new_skin) { if (strcmp (pref_qw_skin, new_skin) == 0) { g_free (new_skin); return; } } if (pref_qw_skin) g_free (pref_qw_skin); pref_qw_skin = new_skin; if (qw_skin_data) g_free (qw_skin_data); qw_skin_data = get_qw_skin (pref_qw_skin, genprefs[QW_SERVER].real_dir); if (qw_skin_data || qw_skin_is_valid) { draw_qw_skin (qw_skin_preview, qw_skin_data, pref_qw_top_color, pref_qw_bottom_color); qw_skin_is_valid = (qw_skin_data)? TRUE : FALSE; } } static GtkWidget *color_button_event_widget = NULL; static void set_player_color (GtkWidget *widget, int i) { if (color_button_event_widget == qw_top_color_button) { if (pref_qw_top_color != i) { pref_qw_top_color = i; set_bg_color (qw_top_color_button, pref_qw_top_color); if (qw_skin_is_valid) { draw_qw_skin (qw_skin_preview, qw_skin_data, pref_qw_top_color, pref_qw_bottom_color); } } return; } if (color_button_event_widget == qw_bottom_color_button) { if (pref_qw_bottom_color != i) { pref_qw_bottom_color = i; set_bg_color (qw_bottom_color_button, pref_qw_bottom_color); if (qw_skin_is_valid) { draw_qw_skin (qw_skin_preview, qw_skin_data, pref_qw_top_color, pref_qw_bottom_color); } } return; } if (color_button_event_widget == q1_top_color_button) { if (pref_q1_top_color != i) { pref_q1_top_color = i; set_bg_color (q1_top_color_button, pref_q1_top_color); if (q1_skin_is_valid) { draw_qw_skin (q1_skin_preview, q1_skin_data, pref_q1_top_color, pref_q1_bottom_color); } } return; } if (color_button_event_widget == q1_bottom_color_button) { if (pref_q1_bottom_color != i) { pref_q1_bottom_color = i; set_bg_color (q1_bottom_color_button, pref_q1_bottom_color); if (q1_skin_is_valid) { draw_qw_skin (q1_skin_preview, q1_skin_data, pref_q1_top_color, pref_q1_bottom_color); } } return; } } static int color_button_event_callback (GtkWidget *widget, GdkEvent *event) { GdkEventButton *bevent; if (event->type == GDK_BUTTON_PRESS) { bevent = (GdkEventButton *) event; color_button_event_widget = widget; if (color_menu == NULL) color_menu = create_color_menu (set_player_color); gtk_menu_popup (GTK_MENU (color_menu), NULL, NULL, NULL, NULL, bevent->button, bevent->time); return TRUE; } return FALSE; } static GtkWidget *q1_skin_box_create (void) { GtkWidget *vbox; GtkWidget *hbox; GtkWidget *alignment; GtkWidget *frame; GtkWidget *table; GtkWidget *label; vbox = gtk_vbox_new (FALSE, 4); gtk_container_set_border_width (GTK_CONTAINER (vbox), 6); hbox = gtk_hbox_new (FALSE, 4); gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0); /* Top and Bottom Colors */ table = gtk_table_new (2, 2, FALSE); gtk_table_set_row_spacings (GTK_TABLE (table), 2); gtk_table_set_col_spacings (GTK_TABLE (table), 4); gtk_box_pack_end (GTK_BOX (hbox), table, FALSE, FALSE, 2); /* Top (Shirt) Color */ label = gtk_label_new (_("Top")); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_table_attach_defaults (GTK_TABLE (table), label, 0, 1, 0, 1); gtk_widget_show (label); q1_top_color_button = gtk_button_new_with_label (" "); gtk_widget_set_usize (q1_top_color_button, 40, -1); gtk_signal_connect (GTK_OBJECT (q1_top_color_button), "event", GTK_SIGNAL_FUNC (color_button_event_callback), NULL); gtk_table_attach_defaults (GTK_TABLE (table), q1_top_color_button, 1, 2, 0, 1); set_bg_color (q1_top_color_button, fix_qw_player_color (pref_q1_top_color)); gtk_widget_show (q1_top_color_button); /* Bottom (Pants) Color */ label = gtk_label_new (_("Bottom")); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_table_attach_defaults (GTK_TABLE (table), label, 0, 1, 1, 2); gtk_widget_show (label); q1_bottom_color_button = gtk_button_new_with_label (" "); gtk_widget_set_usize (q1_bottom_color_button, 40, -1); gtk_signal_connect (GTK_OBJECT (q1_bottom_color_button), "event", GTK_SIGNAL_FUNC (color_button_event_callback), NULL); gtk_table_attach_defaults (GTK_TABLE (table), q1_bottom_color_button, 1, 2, 1, 2); set_bg_color (q1_bottom_color_button, fix_qw_player_color (pref_q1_bottom_color)); gtk_widget_show (q1_bottom_color_button); gtk_widget_show (table); gtk_widget_show (hbox); /* Skin Preview */ alignment = gtk_alignment_new (0.5, 0.5, 0, 0); gtk_box_pack_start (GTK_BOX (vbox), alignment, FALSE, FALSE, 0); frame = gtk_frame_new (NULL); gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN); gtk_container_add (GTK_CONTAINER (alignment), frame); q1_skin_preview = gtk_preview_new (GTK_PREVIEW_COLOR); gtk_preview_size (GTK_PREVIEW (q1_skin_preview), 320, 200); gtk_container_add (GTK_CONTAINER (frame), q1_skin_preview); gtk_widget_show (q1_skin_preview); gtk_widget_show (frame); gtk_widget_show (alignment); gtk_widget_show (vbox); return vbox; } static GtkWidget *qw_skin_box_create (void) { GtkWidget *vbox; GtkWidget *hbox; GtkWidget *alignment; GtkWidget *frame; GtkWidget *table; GtkWidget *label; vbox = gtk_vbox_new (FALSE, 4); gtk_container_set_border_width (GTK_CONTAINER (vbox), 6); hbox = gtk_hbox_new (FALSE, 4); gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0); /* QW Skin ComboBox */ alignment = gtk_alignment_new (0, 0, 0, 0); gtk_box_pack_start (GTK_BOX (hbox), alignment, FALSE, FALSE, 0); qw_skin_combo = gtk_combo_new (); gtk_entry_set_max_length (GTK_ENTRY (GTK_COMBO (qw_skin_combo)->entry), 256); gtk_widget_set_usize (GTK_COMBO (qw_skin_combo)->entry, 112, -1); gtk_combo_set_use_arrows_always (GTK_COMBO (qw_skin_combo), TRUE); gtk_combo_set_case_sensitive (GTK_COMBO (qw_skin_combo), TRUE); gtk_signal_connect (GTK_OBJECT (GTK_COMBO (qw_skin_combo)->entry), "changed", GTK_SIGNAL_FUNC (qw_skin_combo_changed_callback), NULL); gtk_container_add (GTK_CONTAINER (alignment), qw_skin_combo); gtk_widget_show (qw_skin_combo); gtk_widget_show (alignment); /* Top and Bottom Colors */ table = gtk_table_new (2, 2, FALSE); gtk_table_set_row_spacings (GTK_TABLE (table), 2); gtk_table_set_col_spacings (GTK_TABLE (table), 4); gtk_box_pack_end (GTK_BOX (hbox), table, FALSE, FALSE, 2); /* Top (Shirt) Color */ label = gtk_label_new (_("Top")); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_table_attach_defaults (GTK_TABLE (table), label, 0, 1, 0, 1); gtk_widget_show (label); qw_top_color_button = gtk_button_new_with_label (" "); gtk_widget_set_usize (qw_top_color_button, 40, -1); gtk_signal_connect (GTK_OBJECT (qw_top_color_button), "event", GTK_SIGNAL_FUNC (color_button_event_callback), NULL); gtk_table_attach_defaults (GTK_TABLE (table), qw_top_color_button, 1, 2, 0, 1); set_bg_color (qw_top_color_button, fix_qw_player_color (pref_qw_top_color)); gtk_widget_show (qw_top_color_button); /* Bottom (Pants) Color */ label = gtk_label_new (_("Bottom")); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_table_attach_defaults (GTK_TABLE (table), label, 0, 1, 1, 2); gtk_widget_show (label); qw_bottom_color_button = gtk_button_new_with_label (" "); gtk_widget_set_usize (qw_bottom_color_button, 40, -1); gtk_signal_connect (GTK_OBJECT (qw_bottom_color_button), "event", GTK_SIGNAL_FUNC (color_button_event_callback), NULL); gtk_table_attach_defaults (GTK_TABLE (table), qw_bottom_color_button, 1, 2, 1, 2); set_bg_color (qw_bottom_color_button, fix_qw_player_color (pref_qw_bottom_color)); gtk_widget_show (qw_bottom_color_button); gtk_widget_show (table); gtk_widget_show (hbox); /* Skin Preview */ alignment = gtk_alignment_new (0.5, 0.5, 0, 0); gtk_box_pack_start (GTK_BOX (vbox), alignment, FALSE, FALSE, 0); frame = gtk_frame_new (NULL); gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN); gtk_container_add (GTK_CONTAINER (alignment), frame); qw_skin_preview = gtk_preview_new (GTK_PREVIEW_COLOR); gtk_preview_size (GTK_PREVIEW (qw_skin_preview), 320, 200); gtk_container_add (GTK_CONTAINER (frame), qw_skin_preview); gtk_widget_show (qw_skin_preview); gtk_widget_show (frame); gtk_widget_show (alignment); gtk_widget_show (vbox); return vbox; } static void q2_skin_combo_changed_callback (GtkWidget *widget, gpointer data) { char *new_skin; new_skin = strdup_strip ( gtk_entry_get_text (GTK_ENTRY (GTK_COMBO (q2_skin_combo)->entry))); if (!pref_q2_skin && !new_skin) return; if (pref_q2_skin && new_skin) { if (strcmp (pref_q2_skin, new_skin) == 0) { g_free (new_skin); return; } } if (pref_q2_skin) g_free (pref_q2_skin); pref_q2_skin = new_skin; if (q2_skin_data) g_free (q2_skin_data); q2_skin_data = get_q2_skin (pref_q2_skin, genprefs[Q2_SERVER].real_dir); if (q2_skin_data || q2_skin_is_valid) { draw_q2_skin (q2_skin_preview, q2_skin_data, Q2_SKIN_SCALE); q2_skin_is_valid = (q2_skin_data)? TRUE : FALSE; } } static GtkWidget *q2_skin_box_create (void) { GtkWidget *vbox; GtkWidget *hbox; GtkWidget *alignment; GtkWidget *frame; vbox = gtk_vbox_new (FALSE, 4); gtk_container_set_border_width (GTK_CONTAINER (vbox), 6); hbox = gtk_hbox_new (FALSE, 4); gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0); /* Skin Preview */ alignment = gtk_alignment_new (0, 0.5, 0, 0); gtk_box_pack_start (GTK_BOX (hbox), alignment, FALSE, FALSE, 0); frame = gtk_frame_new (NULL); gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN); gtk_container_add (GTK_CONTAINER (alignment), frame); q2_skin_preview = gtk_preview_new (GTK_PREVIEW_COLOR); gtk_preview_size (GTK_PREVIEW (q2_skin_preview), 32 * Q2_SKIN_SCALE, 32 * Q2_SKIN_SCALE); gtk_container_add (GTK_CONTAINER (frame), q2_skin_preview); gtk_widget_show (q2_skin_preview); gtk_widget_show (frame); gtk_widget_show (alignment); /* Q2 Skin ComboBox */ alignment = gtk_alignment_new (1.0, 0, 0, 0); gtk_box_pack_end (GTK_BOX (hbox), alignment, FALSE, FALSE, 0); q2_skin_combo = gtk_combo_new (); gtk_entry_set_max_length (GTK_ENTRY (GTK_COMBO (q2_skin_combo)->entry), 256); gtk_widget_set_usize (GTK_COMBO (q2_skin_combo)->entry, 144, -1); gtk_combo_set_use_arrows_always (GTK_COMBO (q2_skin_combo), TRUE); gtk_combo_set_case_sensitive (GTK_COMBO (q2_skin_combo), TRUE); gtk_signal_connect (GTK_OBJECT (GTK_COMBO (q2_skin_combo)->entry), "changed", GTK_SIGNAL_FUNC (q2_skin_combo_changed_callback), NULL); gtk_container_add (GTK_CONTAINER (alignment), q2_skin_combo); gtk_widget_show (q2_skin_combo); gtk_widget_show (alignment); gtk_widget_show (hbox); gtk_widget_show (vbox); return vbox; } static GtkWidget *player_profile_q1_page (void) { GtkWidget *page_vbox; GtkWidget *alignment; GtkWidget *frame; GtkWidget *q1_skin; GtkWidget *hbox; GtkWidget *hbox2; GtkWidget *label; page_vbox = gtk_vbox_new (FALSE, 8); gtk_container_set_border_width (GTK_CONTAINER (page_vbox), 6); hbox = gtk_hbox_new (TRUE, 4); gtk_box_pack_start (GTK_BOX (page_vbox), hbox, FALSE, FALSE, 0); // Player Name hbox2 = gtk_hbox_new (FALSE, 4); gtk_box_pack_start (GTK_BOX (hbox), hbox2, FALSE, FALSE, 0); label = gtk_label_new (_("Name")); gtk_box_pack_start (GTK_BOX (hbox2), label, FALSE, FALSE, 0); gtk_widget_show (label); name_q1_entry = gtk_entry_new_with_max_length (32); gtk_widget_set_usize (name_q1_entry, 96, -1); if (default_q1_name) { gtk_entry_set_text (GTK_ENTRY (name_q1_entry), default_q1_name); gtk_entry_set_position (GTK_ENTRY (name_q1_entry), 0); } gtk_box_pack_start (GTK_BOX (hbox2), name_q1_entry, FALSE, FALSE, 0); gtk_widget_show (name_q1_entry); gtk_widget_show (hbox2); // /Player Name /* Q1 Colors */ alignment = gtk_alignment_new (0.5, 0.5, 0, 0); gtk_box_pack_start (GTK_BOX (page_vbox), alignment, FALSE, FALSE, 0); frame = gtk_frame_new (_("Colors")); gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_ETCHED_IN); gtk_container_add (GTK_CONTAINER (alignment), frame); q1_skin = q1_skin_box_create (); gtk_container_add (GTK_CONTAINER (frame), q1_skin); gtk_widget_show (frame); gtk_widget_show (alignment); gtk_widget_show (hbox); gtk_widget_show (page_vbox); return page_vbox; } static GtkWidget *player_profile_t2_page (void) { GtkWidget *page_vbox; GtkWidget *hbox; GtkWidget *hbox2; GtkWidget *label; page_vbox = gtk_vbox_new (FALSE, 8); gtk_container_set_border_width (GTK_CONTAINER (page_vbox), 6); hbox = gtk_hbox_new (TRUE, 4); gtk_box_pack_start (GTK_BOX (page_vbox), hbox, FALSE, FALSE, 0); // Player Name hbox2 = gtk_hbox_new (FALSE, 4); gtk_box_pack_start (GTK_BOX (hbox), hbox2, FALSE, FALSE, 0); label = gtk_label_new (_("Login name")); gtk_box_pack_start (GTK_BOX (hbox2), label, FALSE, FALSE, 0); gtk_widget_show (label); name_t2_entry = gtk_entry_new_with_max_length (32); gtk_widget_set_usize (name_t2_entry, 96, -1); if (default_t2_name) { gtk_entry_set_text (GTK_ENTRY (name_t2_entry), default_t2_name); gtk_entry_set_position (GTK_ENTRY (name_t2_entry), 0); } gtk_box_pack_start (GTK_BOX (hbox2), name_t2_entry, FALSE, FALSE, 0); gtk_widget_show (name_t2_entry); gtk_widget_show (hbox2); // /Player Name gtk_widget_show (hbox); gtk_widget_show (page_vbox); return page_vbox; } static GtkWidget *player_profile_qw_page (void) { GtkWidget *page_vbox; GtkWidget *alignment; GtkWidget *frame; GtkWidget *qw_skin; GtkWidget *hbox; GtkWidget *hbox2; GtkWidget *label; page_vbox = gtk_vbox_new (FALSE, 8); gtk_container_set_border_width (GTK_CONTAINER (page_vbox), 6); hbox = gtk_hbox_new (TRUE, 4); gtk_box_pack_start (GTK_BOX (page_vbox), hbox, FALSE, FALSE, 0); /* QW Skin */ alignment = gtk_alignment_new (0.5, 0.5, 0, 0); gtk_box_pack_start (GTK_BOX (page_vbox), alignment, FALSE, FALSE, 0); frame = gtk_frame_new (_("Skin/Colors")); gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_ETCHED_IN); gtk_container_add (GTK_CONTAINER (alignment), frame); qw_skin = qw_skin_box_create (); gtk_container_add (GTK_CONTAINER (frame), qw_skin); gtk_widget_show (frame); gtk_widget_show (alignment); // Player Name hbox2 = gtk_hbox_new (FALSE, 4); gtk_box_pack_start (GTK_BOX (hbox), hbox2, FALSE, FALSE, 0); label = gtk_label_new (_("Name")); gtk_box_pack_start (GTK_BOX (hbox2), label, FALSE, FALSE, 0); gtk_widget_show (label); name_qw_entry = gtk_entry_new_with_max_length (32); gtk_widget_set_usize (name_qw_entry, 96, -1); if (default_qw_name) { gtk_entry_set_text (GTK_ENTRY (name_qw_entry), default_qw_name); gtk_entry_set_position (GTK_ENTRY (name_qw_entry), 0); } gtk_box_pack_start (GTK_BOX (hbox2), name_qw_entry, FALSE, FALSE, 0); gtk_widget_show (name_qw_entry); gtk_widget_show (hbox2); // /Player Name /* QW Team */ hbox2 = gtk_hbox_new (FALSE, 4); gtk_box_pack_start (GTK_BOX (hbox), hbox2, FALSE, FALSE, 4); label = gtk_label_new (_("Team")); gtk_box_pack_start (GTK_BOX (hbox2), label, FALSE, FALSE, 0); gtk_widget_show (label); team_qw_entry = gtk_entry_new_with_max_length (32); gtk_widget_set_usize (team_qw_entry, 96, -1); if (default_qw_team) { gtk_entry_set_text (GTK_ENTRY (team_qw_entry), default_qw_team); gtk_entry_set_position (GTK_ENTRY (team_qw_entry), 0); } gtk_box_pack_start (GTK_BOX (hbox2), team_qw_entry, FALSE, FALSE, 0); gtk_widget_show (team_qw_entry); gtk_widget_show (hbox2); gtk_widget_show (hbox); gtk_widget_show (page_vbox); return page_vbox; } static GtkWidget *player_profile_q2_page (void) { GtkWidget *page_vbox; GtkWidget *alignment; GtkWidget *frame; GtkWidget *q2_skin; GtkWidget *label; GtkWidget *hbox; page_vbox = gtk_vbox_new (FALSE, 8); gtk_container_set_border_width (GTK_CONTAINER (page_vbox), 8); // Player Name hbox = gtk_hbox_new (FALSE, 4); gtk_box_pack_start (GTK_BOX (page_vbox), hbox, FALSE, FALSE, 0); label = gtk_label_new (_("Name")); gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); gtk_widget_show (label); name_q2_entry = gtk_entry_new_with_max_length (32); gtk_widget_set_usize (name_q2_entry, 96, -1); if (default_q2_name) { gtk_entry_set_text (GTK_ENTRY (name_q2_entry), default_q2_name); gtk_entry_set_position (GTK_ENTRY (name_q2_entry), 0); } gtk_box_pack_start (GTK_BOX (hbox), name_q2_entry, FALSE, FALSE, 0); gtk_widget_show (name_q2_entry); gtk_widget_show (hbox); // /Player Name alignment = gtk_alignment_new (0.5, 0.5, 0, 0); gtk_box_pack_start (GTK_BOX (page_vbox), alignment, FALSE, FALSE, 0); frame = gtk_frame_new (_("Model/Skin")); gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_ETCHED_IN); gtk_container_add (GTK_CONTAINER (alignment), frame); q2_skin = q2_skin_box_create (); gtk_container_add (GTK_CONTAINER (frame), q2_skin); gtk_widget_show (frame); gtk_widget_show (alignment); gtk_widget_show (page_vbox); return page_vbox; } #if 0 static GtkWidget *player_profile_page (void) { GtkWidget *page_vbox; GtkWidget *page; GtkWidget *label; GtkWidget *hbox; GtkWidget *game_label; char *typestr; enum server_type type = QW_SERVER; page_vbox = gtk_vbox_new (FALSE, 8); gtk_container_set_border_width (GTK_CONTAINER (page_vbox), 8); hbox = gtk_hbox_new (FALSE, 4); gtk_box_pack_start (GTK_BOX (page_vbox), hbox, FALSE, FALSE, 8); /* Player Name */ label = gtk_label_new (_("Name")); gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); gtk_widget_show (label); name_entry = gtk_entry_new_with_max_length (32); gtk_widget_set_usize (name_entry, 96, -1); if (default_name) { gtk_entry_set_text (GTK_ENTRY (name_entry), default_name); gtk_entry_set_position (GTK_ENTRY (name_entry), 0); } gtk_box_pack_start (GTK_BOX (hbox), name_entry, FALSE, FALSE, 0); gtk_widget_show (name_entry); gtk_widget_show (hbox); profile_notebook = gtk_notebook_new (); gtk_notebook_set_tab_pos (GTK_NOTEBOOK (profile_notebook), GTK_POS_TOP); gtk_notebook_set_tab_hborder (GTK_NOTEBOOK (profile_notebook), 4); gtk_box_pack_start (GTK_BOX (page_vbox), profile_notebook, FALSE, FALSE, 0); game_label = game_pixmap_with_label (Q1_SERVER); page = player_profile_q1_page (); gtk_notebook_append_page (GTK_NOTEBOOK (profile_notebook), page, game_label); game_label = game_pixmap_with_label (QW_SERVER); page = player_profile_qw_page (); gtk_notebook_append_page (GTK_NOTEBOOK (profile_notebook), page, game_label); game_label = game_pixmap_with_label (Q2_SERVER); page = player_profile_q2_page (); gtk_notebook_append_page (GTK_NOTEBOOK (profile_notebook), page, game_label); typestr = config_get_string ("/" CONFIG_FILE "/Player Profile/game"); if (typestr) { type = id2type (typestr); g_free (typestr); } gtk_notebook_set_page (GTK_NOTEBOOK (profile_notebook), (type == Q2_SERVER)? 2 : (type == Q1_SERVER)? 0 : 1); gtk_widget_show (profile_notebook); gtk_widget_show (page_vbox); return page_vbox; } #endif static char *wb_switch_labels[9] = { N_("--- Anything ---"), N_("Axe"), N_("Shotgun"), N_("Super Shotgun"), N_("Nailgun"), N_("Super Nailgun"), N_("Grenade Launcher"), N_("Rocket Launcher"), N_("ThunderBolt") }; static void set_w_switch_callback (GtkWidget *widget, int i) { pref_w_switch = i; } static void set_b_switch_callback (GtkWidget *widget, int i) { pref_b_switch = i; } static GtkWidget *create_wb_switch_menu (void (*callback) (GtkWidget *, int)) { GtkWidget *menu; GtkWidget *menu_item; int i; menu = gtk_menu_new (); for (i = 0; i < 9; i++) { menu_item = gtk_menu_item_new_with_label (_(wb_switch_labels[i])); gtk_signal_connect (GTK_OBJECT (menu_item), "activate", GTK_SIGNAL_FUNC (callback), GINT_TO_POINTER(i)); gtk_menu_append (GTK_MENU (menu), menu_item); gtk_widget_show (menu_item); } return menu; } static void qw_noskins_option_menu_callback (GtkWidget *widget, int i) { pref_qw_noskins = i; } static void q2_noskins_option_menu_callback (GtkWidget *widget, int i) { pref_q2_noskins = i; } static GtkWidget *create_noskins_menu (int qworq2) { GtkWidget *menu; GtkWidget *menu_item; void (*callback)=qworq2?q2_noskins_option_menu_callback:qw_noskins_option_menu_callback; menu = gtk_menu_new (); menu_item = gtk_menu_item_new_with_label (_("Use skins")); gtk_signal_connect (GTK_OBJECT (menu_item), "activate", GTK_SIGNAL_FUNC (callback), (gpointer) 0); gtk_menu_append (GTK_MENU (menu), menu_item); gtk_widget_show (menu_item); menu_item = gtk_menu_item_new_with_label (_("Don\'t use skins")); gtk_signal_connect (GTK_OBJECT (menu_item), "activate", GTK_SIGNAL_FUNC (callback), (gpointer) 1); gtk_menu_append (GTK_MENU (menu), menu_item); gtk_widget_show (menu_item); menu_item = gtk_menu_item_new_with_label (_("Don\'t download new skins")); gtk_signal_connect (GTK_OBJECT (menu_item), "activate", GTK_SIGNAL_FUNC (callback), (gpointer) 2); gtk_menu_append (GTK_MENU (menu), menu_item); gtk_widget_show (menu_item); return menu; } // fill working directory with result of the directory guess function for first // token of command line if working directory is empty static void pref_guess_dir(enum server_type type, const char* cmdline, gboolean interactive) { const char* dir_entry = NULL; dir_entry = gtk_entry_get_text (GTK_ENTRY (genprefs[type].dir_entry)); if(dir_entry && *dir_entry && !interactive) return; if (cmdline && *cmdline) // if not empty { char *guessed_dir = NULL; char** cmds = NULL; cmds = g_strsplit(cmdline," ",2); if(cmds && *cmds && **cmds) { guessed_dir = resolve_path(*cmds); if(guessed_dir) gtk_entry_set_text (GTK_ENTRY (genprefs[type].dir_entry), guessed_dir); g_free(guessed_dir); g_strfreev(cmds); return; } g_strfreev(cmds); } if(interactive) dialog_ok (NULL, _("You must configure a command line first")); } /** * return true if game 'type' has commands to suggest */ static gboolean pref_can_suggest(enum server_type type) { return (games[type].command != NULL); } /** * find game binary in path and fill in command entry */ static void pref_suggest_command(enum server_type type) { char** files = NULL; char* suggested_file = NULL; const char* prevcmd = NULL; unsigned i = 0; files = games[type].command; if(!files || !files[0]) { return; } // start suggestion based on last found binary prevcmd = gtk_entry_get_text (GTK_ENTRY (genprefs[type].cmd_entry)); for(i = 0; prevcmd && files[i]; ++i ) { if(files[i+1] && !strcmp(files[i], prevcmd)) { files = files+i+1; break; } } suggested_file = find_file_in_path_list_relative(files); if(!suggested_file) { dialog_ok(_("Game not found"), // %s name of a game _("%s not found"), games[type].name); return; } // gtk entry does the freeing? -- no gtk_entry_set_text (GTK_ENTRY (genprefs[type].cmd_entry), suggested_file); pref_guess_dir (type, suggested_file, TRUE); if(games[type].cmd_or_dir_changed) games[type].cmd_or_dir_changed(&games[type]); g_free(suggested_file); return; } #warning FIXME: memleak, use strchr instead static int custom_args_compare_func (gconstpointer ptr1, gconstpointer ptr2) { // ptr1 = entire string // ptr2 = game char *temp[2]; tokenize (g_strdup((char *)ptr1), temp, 2, ","); if (strcasecmp (temp[0], ptr2) == 0) return (0); else return (1); } static void add_custom_args_defaults2 (char *str1, char *str2, enum server_type type, gpointer data) { char *temp; char *temp2[2]; temp = g_strconcat (str1, ",", str2, NULL); temp2[0] = strdup_strip (str1); temp2[1] = strdup_strip (str2); if (str1 && str2) { if (g_slist_find_custom (genprefs[type].custom_args, str1, custom_args_compare_func) == NULL ) { genprefs[type].custom_args = g_slist_append(genprefs[type].custom_args, g_strdup(temp)); gtk_clist_append(GTK_CLIST ((GtkCList *) data), temp2); } else { dialog_ok (NULL, _("An entry already exists for the game %s.\n\n" "A default entry for this game will not be added.\n\n" "Delete the entry and try again."), str1); } } g_free(temp); } // Add default custom arguments // TODO: implement a proper generic solution static void add_custom_args_defaults (GtkWidget *widget, gpointer data) { enum server_type type; struct game *g; type = GPOINTER_TO_INT(gtk_object_get_user_data (GTK_OBJECT (widget))); g = &games[type]; switch(type) { case UN_SERVER: add_custom_args_defaults2("s_SWATGame","-ini=TacticalOps.ini",UN_SERVER, data); add_custom_args_defaults2("SFTeamDM","-ini=StrikeForce.ini -userini=SFUser.ini",UN_SERVER, data); break; case UT2_SERVER: add_custom_args_defaults2("DB_DeathBall", "-USERLOGO=dbsplash.bmp -INI=DeathBall.ini -USERINI=DBUser.ini",UT2_SERVER, data); add_custom_args_defaults2("FragOpsMission", "-INI=FragOps.ini -USERINI=FOUser.ini",UT2_SERVER, data); break; case UT2004_SERVER: add_custom_args_defaults2("ROTeamGame", "-mod=RedOrchestra -log=RedOrchestra.log",UT2004_SERVER, data); add_custom_args_defaults2("TObjectiveGame", "-mod=Troopers -log=Troopers.log",UT2004_SERVER, data); add_custom_args_defaults2("TTeamGame", "-mod=Troopers -log=Troopers.log",UT2004_SERVER, data); add_custom_args_defaults2("TCTFGame", "-mod=Troopers -log=Troopers.log",UT2004_SERVER, data); add_custom_args_defaults2("AoGameInfo", "-mod=AlienSwarm -log=AlienSwarm.log",UT2004_SERVER, data); add_custom_args_defaults2("AoCampaignLobbyGame", "-mod=AlienSwarm -log=AlienSwarm.log",UT2004_SERVER, data); break; default: dialog_ok (NULL, _("There are no defaults for this game")); break; } } static void new_custom_args_callback (GtkWidget *widget, gpointer data) { enum server_type type; type = GPOINTER_TO_INT(gtk_object_get_user_data (GTK_OBJECT (widget))); current_row = -1; gtk_widget_set_sensitive (custom_args_entry_game[type], TRUE); gtk_widget_set_sensitive (custom_args_entry_args[type], TRUE); gtk_widget_set_sensitive (custom_args_add_button[type], TRUE); gtk_entry_set_text (GTK_ENTRY (custom_args_entry_game[type]), ""); gtk_entry_set_text (GTK_ENTRY (custom_args_entry_args[type]), ""); gtk_widget_grab_focus (GTK_WIDGET (custom_args_entry_game[type])); } static void add_custom_args_callback (GtkWidget *widget, gpointer data) { GSList *link; int row; char *temp[2]; enum server_type type; struct game *g; type = GPOINTER_TO_INT(gtk_object_get_user_data (GTK_OBJECT (widget))); g = &games[type]; temp[0] = strdup_strip (gtk_entry_get_text (GTK_ENTRY (custom_args_entry_game[type]))); temp[1] = strdup_strip (gtk_entry_get_text (GTK_ENTRY (custom_args_entry_args[type]))); if (current_row > -1) { row = current_row; link = g_slist_nth (genprefs[type].custom_args, current_row); genprefs[type].custom_args = g_slist_remove_link (genprefs[type].custom_args, link); current_row = -1; gtk_clist_remove (GTK_CLIST ((GtkCList *) data), row); } if (temp[0] && temp[1]) { if (g_slist_find_custom (genprefs[type].custom_args, temp[0], custom_args_compare_func) == NULL ) { genprefs[type].custom_args = g_slist_append(genprefs[type].custom_args, g_strconcat(temp[0], ",",temp[1], NULL)); gtk_clist_append(GTK_CLIST ((GtkCList *) data), temp); gtk_widget_set_sensitive (custom_args_entry_game[type], FALSE); gtk_widget_set_sensitive (custom_args_entry_args[type], FALSE); gtk_widget_set_sensitive (custom_args_add_button[type], FALSE); gtk_entry_set_text (GTK_ENTRY (custom_args_entry_game[type]), ""); gtk_entry_set_text (GTK_ENTRY (custom_args_entry_args[type]), ""); } else dialog_ok (NULL, _("There is already an entry for this game.\n\nTo modify it, select it from the list, "\ "modify it\nand then click Add/Update.")); } else dialog_ok (NULL, _("You must enter both a game and at least one argument.")); g_free (temp[0]); g_free (temp[1]); } static void delete_custom_args_callback (GtkWidget *widget, gpointer data) { GSList *link; int row; enum server_type type; struct game *g; type = GPOINTER_TO_INT(gtk_object_get_user_data (GTK_OBJECT (widget))); g = &games[type]; if (current_row < 0) return; row = current_row; link = g_slist_nth (genprefs[type].custom_args, current_row); genprefs[type].custom_args = g_slist_remove_link (genprefs[type].custom_args, link); current_row = -1; gtk_clist_remove (GTK_CLIST ((GtkCList *) data), row); current_row = -1; gtk_widget_set_sensitive (custom_args_entry_game[type], FALSE); gtk_widget_set_sensitive (custom_args_entry_args[type], FALSE); gtk_widget_set_sensitive (custom_args_add_button[type], FALSE); gtk_entry_set_text (GTK_ENTRY (custom_args_entry_game[type]), ""); gtk_entry_set_text (GTK_ENTRY (custom_args_entry_args[type]), ""); } static void custom_args_clist_select_row_callback (GtkWidget *widget, int row, int column, GdkEventButton *event, GtkCList *clist) { enum server_type type; GSList* item; char* argstr; char* game_args[2] = {0} ; type = GPOINTER_TO_INT(gtk_object_get_user_data (GTK_OBJECT (widget))); current_row = row; if(row<0) return; item = g_slist_nth(genprefs[type].custom_args, row); if(!item) return; argstr = g_strdup(item->data); tokenize (argstr, game_args, 2, ","); gtk_entry_set_text (GTK_ENTRY (custom_args_entry_game[type]), game_args[0]); gtk_entry_set_text (GTK_ENTRY (custom_args_entry_args[type]), game_args[1]); gtk_widget_set_sensitive (custom_args_entry_game[type], TRUE); gtk_widget_set_sensitive (custom_args_entry_args[type], TRUE); gtk_widget_set_sensitive (custom_args_add_button[type], TRUE); g_free(argstr); } static GtkWidget *generic_game_frame (enum server_type type) { GtkWidget *frame; GtkWidget *vbox; GtkWidget *page_vbox; GtkWidget *table; GtkWidget *label; GtkWidget *notebook; GtkWidget *hbox; GtkWidget *button; GtkWidget *hbox2 = NULL; struct generic_prefs *prefs = &genprefs[type]; struct game *g; g = &games[type]; page_vbox = gtk_vbox_new (FALSE, 4); frame = gtk_frame_new (NULL); gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_ETCHED_OUT); label = gtk_label_new (_(games[type].name)); gtk_container_add (GTK_CONTAINER (frame), label); gtk_widget_show (label); gtk_box_pack_start (GTK_BOX (page_vbox), frame, FALSE, FALSE, 0); gtk_widget_show (frame); notebook = gtk_notebook_new (); vbox = gtk_vbox_new (FALSE, 4); gtk_container_set_border_width (GTK_CONTAINER (vbox), 6); label = gtk_label_new (_("Invoking")); gtk_notebook_append_page (GTK_NOTEBOOK (notebook), vbox, label); gtk_widget_show (label); gtk_box_pack_start (GTK_BOX (page_vbox), notebook, TRUE, TRUE, 0); if ((games[type].flags & GAME_CONNECT) == 0) { label = gtk_label_new (_("*** Not Implemented ***")); gtk_misc_set_alignment (GTK_MISC (label), 0.5, 0.5); gtk_box_pack_start (GTK_BOX (vbox), label, TRUE, TRUE, 0); gtk_widget_show (label); gtk_widget_show (vbox); gtk_widget_show (notebook); gtk_widget_show (page_vbox); return page_vbox; } gtk_notebook_append_page (GTK_NOTEBOOK (notebook), custom_args_options_page(type), gtk_label_new (_("Custom Args"))); // call game specific function to add its options if(genprefs[type].add_options_to_notebook) genprefs[type].add_options_to_notebook(notebook, type); table = gtk_table_new ((games[type].custom_cfgs)? 3 : 2, 2, FALSE); gtk_table_set_row_spacings (GTK_TABLE (table), 2); gtk_table_set_col_spacings (GTK_TABLE (table), 4); gtk_box_pack_start (GTK_BOX (vbox), table, FALSE, FALSE, 0); label = gtk_label_new (_("Command Line")); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1, GTK_FILL, GTK_FILL, 0, 0); gtk_widget_show (label); hbox = gtk_hbox_new (FALSE, 0); gtk_table_attach_defaults (GTK_TABLE (table), hbox, 1, 2, 0, 1); gtk_widget_show (hbox); genprefs[type].cmd_entry = gtk_entry_new (); if (games[type].cmd) { gtk_entry_set_text (GTK_ENTRY (genprefs[type].cmd_entry), games[type].cmd); gtk_entry_set_position (GTK_ENTRY (genprefs[type].cmd_entry), 0); } gtk_signal_connect_object (GTK_OBJECT (genprefs[type].cmd_entry), "activate", GTK_SIGNAL_FUNC (game_file_activate_callback), GINT_TO_POINTER(type)); gtk_box_pack_start (GTK_BOX (hbox),genprefs[type].cmd_entry , TRUE, TRUE, 0); gtk_widget_show (genprefs[type].cmd_entry); button = gtk_button_new_with_label ("..."); gtk_signal_connect_object (GTK_OBJECT (button), "clicked", GTK_SIGNAL_FUNC (game_file_dialog), GINT_TO_POINTER(type)); gtk_box_pack_start (GTK_BOX (hbox),button , FALSE, FALSE, 3); gtk_widget_show (button); // translator: button for command suggestion button = gtk_button_new_with_label (_("Suggest")); gtk_signal_connect_object (GTK_OBJECT (button), "clicked", GTK_SIGNAL_FUNC (pref_suggest_command), GINT_TO_POINTER(type)); gtk_widget_set_sensitive (button, pref_can_suggest(type)); gtk_box_pack_start (GTK_BOX (hbox),button , FALSE, FALSE, 0); gtk_tooltips_set_tip (tooltips, button, _("Searches the path for the game executable"), NULL); gtk_widget_show (button); ///// label = gtk_label_new (_("Working Directory")); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_table_attach (GTK_TABLE (table), label, 0, 1, 1, 2, GTK_FILL, GTK_FILL, 0, 0); gtk_widget_show (label); hbox = gtk_hbox_new (FALSE, 0); gtk_table_attach_defaults (GTK_TABLE (table), hbox, 1, 2, 1, 2); gtk_widget_show (hbox); genprefs[type].dir_entry = gtk_entry_new (); if (genprefs[type].pref_dir) { gtk_entry_set_text (GTK_ENTRY (genprefs[type].dir_entry), genprefs[type].pref_dir); gtk_entry_set_position (GTK_ENTRY (genprefs[type].dir_entry), 0); } gtk_box_pack_start (GTK_BOX (hbox),genprefs[type].dir_entry , TRUE, TRUE, 0); button = gtk_button_new_with_label ("..."); gtk_signal_connect_object (GTK_OBJECT (button), "clicked", GTK_SIGNAL_FUNC (game_dir_dialog), (gpointer)type); gtk_box_pack_start (GTK_BOX (hbox),button , FALSE, FALSE, 3); gtk_widget_show (button); // translator: button for directory guess button = gtk_button_new_with_label (_("Suggest")); gtk_signal_connect_object (GTK_OBJECT (button), "clicked", GTK_SIGNAL_FUNC (game_file_activate_callback), (gpointer)type); gtk_box_pack_start (GTK_BOX (hbox),button , FALSE, FALSE, 0); gtk_tooltips_set_tip (tooltips, button, _("Tries to guess the working directory based on the command line"), NULL); gtk_widget_show (button); if (games[type].custom_cfgs) { gtk_object_set_user_data (GTK_OBJECT (genprefs[type].dir_entry), (gpointer) type); gtk_signal_connect (GTK_OBJECT (genprefs[type].dir_entry), "activate", GTK_SIGNAL_FUNC (dir_entry_activate_callback), NULL); gtk_signal_connect (GTK_OBJECT (genprefs[type].dir_entry), "focus_out_event", GTK_SIGNAL_FUNC (dir_entry_activate_callback), NULL); } gtk_widget_show (genprefs[type].dir_entry); if (games[type].custom_cfgs) { label = gtk_label_new (_("Custom CFG")); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_table_attach (GTK_TABLE (table), label, 0, 1, 2, 3, GTK_FILL, GTK_FILL, 0, 0); gtk_widget_show (label); prefs->cfg_combo = gtk_combo_new (); gtk_entry_set_max_length ( GTK_ENTRY (GTK_COMBO (prefs->cfg_combo)->entry), 256); gtk_combo_set_case_sensitive (GTK_COMBO (prefs->cfg_combo), TRUE); gtk_table_attach_defaults (GTK_TABLE (table), prefs->cfg_combo, 1, 2, 2, 3); gtk_widget_show (prefs->cfg_combo); } // Game specific notes if (game_get_attribute(type,"game_notes")) { hbox2 = gtk_hbox_new (FALSE, 0); gtk_box_pack_end (GTK_BOX (vbox), hbox2, FALSE, FALSE, 0); gtk_widget_show (hbox2); label = gtk_label_new (game_get_attribute(type,"game_notes")); gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT); gtk_box_pack_start (GTK_BOX (hbox2), label, FALSE, FALSE, 0); gtk_widget_show (label); } gtk_widget_show (table); gtk_widget_show (vbox); gtk_notebook_set_page (GTK_NOTEBOOK (notebook), 0); gtk_widget_show (notebook); gtk_widget_show (page_vbox); return page_vbox; } // Used by user_fix_defaults to add a custom arg static GtkWidget *custom_args_options_page (enum server_type type) { GtkWidget *hbox1; GtkWidget *vbox1; GtkWidget *scrolledwindow1; GtkWidget *arguments_clist; GtkWidget *game_label; GtkWidget *arguments_label; GtkWidget *frame1; GtkWidget *hbox2; GtkWidget *vbuttonbox1; GtkWidget *new_button; GtkWidget *delete_button; GtkWidget *defaults_button; GtkWidget *page_vbox; struct game *g; int width; //tooltips = gtk_tooltips_new (); g = &games[type]; genprefs[type].custom_args = g_slist_copy (g->custom_args); page_vbox = gtk_vbox_new (FALSE, 4); gtk_container_set_border_width (GTK_CONTAINER (page_vbox), 8); hbox1 = gtk_hbox_new (FALSE, 0); gtk_widget_ref (hbox1); gtk_object_set_data_full (GTK_OBJECT (page_vbox), "hbox1", hbox1, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (hbox1); gtk_container_add (GTK_CONTAINER (page_vbox), hbox1); gtk_container_set_border_width (GTK_CONTAINER (hbox1), 3); vbox1 = gtk_vbox_new (FALSE, 0); gtk_widget_ref (vbox1); gtk_object_set_data_full (GTK_OBJECT (page_vbox), "vbox1", vbox1, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (vbox1); gtk_box_pack_start (GTK_BOX (hbox1), vbox1, TRUE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (vbox1), 2); scrolledwindow1 = gtk_scrolled_window_new (NULL, NULL); gtk_widget_ref (scrolledwindow1); gtk_object_set_data_full (GTK_OBJECT (page_vbox), "scrolledwindow1", scrolledwindow1, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (scrolledwindow1); gtk_box_pack_start (GTK_BOX (vbox1), scrolledwindow1, TRUE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (scrolledwindow1), 2); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow1), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); arguments_clist = gtk_clist_new (2); gtk_widget_ref (arguments_clist); gtk_object_set_data_full (GTK_OBJECT (page_vbox), "arguments_clist", arguments_clist, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (arguments_clist); gtk_container_add (GTK_CONTAINER (scrolledwindow1), arguments_clist); gtk_clist_column_titles_show (GTK_CLIST (arguments_clist)); gtk_signal_connect (GTK_OBJECT (arguments_clist), "select_row", GTK_SIGNAL_FUNC (custom_args_clist_select_row_callback), arguments_clist); gtk_object_set_user_data (GTK_OBJECT (arguments_clist), (gpointer) type); game_label = gtk_label_new (_("Game")); gtk_widget_ref (game_label); gtk_object_set_data_full (GTK_OBJECT (page_vbox), "game_label", game_label, (GtkDestroyNotify) gtk_widget_unref); gtk_label_set_justify (GTK_LABEL (game_label), GTK_JUSTIFY_LEFT); gtk_widget_show (game_label); gtk_clist_set_column_widget (GTK_CLIST (arguments_clist), 0, game_label); arguments_label = gtk_label_new (_("Arguments")); gtk_widget_ref (arguments_label); gtk_object_set_data_full (GTK_OBJECT (page_vbox), "arguments_label", arguments_label, (GtkDestroyNotify) gtk_widget_unref); gtk_label_set_justify (GTK_LABEL (arguments_label), GTK_JUSTIFY_LEFT); gtk_widget_show (arguments_label); gtk_clist_set_column_widget (GTK_CLIST (arguments_clist), 1, arguments_label); frame1 = gtk_frame_new (_("Game and Arguments")); gtk_widget_ref (frame1); gtk_object_set_data_full (GTK_OBJECT (page_vbox), "frame1", frame1, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (frame1); gtk_box_pack_start (GTK_BOX (vbox1), frame1, FALSE, FALSE, 0); gtk_container_set_border_width (GTK_CONTAINER (frame1), 3); hbox2 = gtk_hbox_new (FALSE, 0); gtk_widget_ref (hbox2); gtk_object_set_data_full (GTK_OBJECT (page_vbox), "hbox2", hbox2, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (hbox2); gtk_container_add (GTK_CONTAINER (frame1), hbox2); gtk_container_set_border_width (GTK_CONTAINER (hbox2), 4); custom_args_entry_game[type] = gtk_entry_new (); gtk_widget_ref (custom_args_entry_game[type]); gtk_widget_set_usize (custom_args_entry_game[type], 90, -2); gtk_object_set_data_full (GTK_OBJECT (page_vbox), "custom_args_entry_game[type]", custom_args_entry_game[type], (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (custom_args_entry_game[type]); gtk_box_pack_start (GTK_BOX (hbox2), custom_args_entry_game[type], FALSE, TRUE, 0); gtk_tooltips_set_tip (tooltips, custom_args_entry_game[type], _("Enter the game name from the game column"), NULL); gtk_widget_set_sensitive (custom_args_entry_game[type], FALSE); custom_args_entry_args[type] = gtk_entry_new (); gtk_widget_ref (custom_args_entry_args[type]); gtk_object_set_data_full (GTK_OBJECT (page_vbox), "custom_args_entry_args[type]", custom_args_entry_args[type], (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (custom_args_entry_args[type]); gtk_box_pack_start (GTK_BOX (hbox2), custom_args_entry_args[type], TRUE, TRUE, 0); gtk_tooltips_set_tip (tooltips, custom_args_entry_args[type], _("Enter the arguments separated by spaces"), NULL); gtk_widget_set_sensitive (custom_args_entry_args[type], FALSE); vbuttonbox1 = gtk_vbox_new (FALSE, 0); gtk_widget_ref (vbuttonbox1); gtk_object_set_data_full (GTK_OBJECT (page_vbox), "vbuttonbox1", vbuttonbox1, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (vbuttonbox1); gtk_box_pack_start (GTK_BOX (hbox1), vbuttonbox1, FALSE, TRUE, 0); new_button = gtk_button_new_with_label (_("New")); gtk_widget_ref (new_button); gtk_object_set_data_full (GTK_OBJECT (page_vbox), "new_button", new_button, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (new_button); gtk_box_pack_start (GTK_BOX (vbuttonbox1), new_button, FALSE, FALSE, 5); GTK_WIDGET_SET_FLAGS (new_button, GTK_CAN_DEFAULT); delete_button = gtk_button_new_with_label (_("Delete")); gtk_widget_ref (delete_button); gtk_object_set_data_full (GTK_OBJECT (page_vbox), "delete_button", delete_button, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (delete_button); gtk_box_pack_start (GTK_BOX (vbuttonbox1), delete_button, FALSE, FALSE, 5); GTK_WIDGET_SET_FLAGS (delete_button, GTK_CAN_DEFAULT); defaults_button = gtk_button_new_with_label (_("Add Defaults")); gtk_widget_ref (defaults_button); gtk_object_set_data_full (GTK_OBJECT (page_vbox), "defaults_button", defaults_button, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (defaults_button); gtk_box_pack_start (GTK_BOX (vbuttonbox1), defaults_button, FALSE, FALSE, 5); GTK_WIDGET_SET_FLAGS (defaults_button, GTK_CAN_DEFAULT); custom_args_add_button[type] = gtk_button_new_with_label (_("Add/Update")); gtk_widget_ref (custom_args_add_button[type]); gtk_object_set_data_full (GTK_OBJECT (page_vbox), "add_button", custom_args_add_button[type], (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (custom_args_add_button[type]); gtk_box_pack_end (GTK_BOX (vbuttonbox1), custom_args_add_button[type], FALSE, FALSE, 7); gtk_widget_set_sensitive (custom_args_add_button[type], FALSE); GTK_WIDGET_SET_FLAGS (custom_args_add_button[type], GTK_CAN_DEFAULT); gtk_object_set_user_data (GTK_OBJECT (new_button), (gpointer) type); gtk_signal_connect (GTK_OBJECT (new_button), "clicked", GTK_SIGNAL_FUNC (new_custom_args_callback), (gpointer) arguments_clist); gtk_object_set_user_data (GTK_OBJECT (delete_button), (gpointer) type); gtk_signal_connect (GTK_OBJECT (delete_button), "clicked", GTK_SIGNAL_FUNC (delete_custom_args_callback), (gpointer) arguments_clist); gtk_object_set_user_data (GTK_OBJECT (defaults_button), (gpointer) type); gtk_signal_connect (GTK_OBJECT (defaults_button), "clicked", GTK_SIGNAL_FUNC (add_custom_args_defaults), (gpointer) arguments_clist); gtk_object_set_user_data (GTK_OBJECT (custom_args_add_button[type]), (gpointer) type); gtk_signal_connect (GTK_OBJECT (custom_args_add_button[type]), "clicked", GTK_SIGNAL_FUNC (add_custom_args_callback), (gpointer) arguments_clist); // Populate clist with custom_args from g_slist { GSList *list; char *token[2]; list = genprefs[type].custom_args; while (list) { char* tmp = g_strdup((char *)list->data); tokenize ( tmp, token, 2, ","); gtk_clist_append(GTK_CLIST (arguments_clist), token); g_free(tmp); list = g_slist_next(list); } } width = gtk_clist_optimal_column_width (GTK_CLIST (arguments_clist), 0); gtk_clist_set_column_width (GTK_CLIST (arguments_clist), 0, width?width:60); gtk_clist_set_column_width (GTK_CLIST (arguments_clist), 1, gtk_clist_optimal_column_width (GTK_CLIST (arguments_clist), 1)); gtk_widget_show (page_vbox); return page_vbox; } static void game_listitem_selected_callback (GtkItem *item, enum server_type type) { gtk_notebook_set_page (GTK_NOTEBOOK (games_notebook), type); } #define GAMES_COLS 3 #define GAMES_ROWS ((GAMES_TOTAL + GAMES_COLS - 1) / GAMES_COLS) // create dialog where commandline and working dir for all games are configured static GtkWidget *games_config_page (int defgame) { GtkWidget *page_vbox; GtkWidget *frame; GtkWidget *hbox; GtkWidget *page; GtkWidget *label; GtkWidget *gtklist=NULL; GtkWidget *scrollwin=NULL; GtkWidget *games_hbox; char *typestr; int i; page_vbox = gtk_vbox_new (FALSE, 0); gtk_container_set_border_width (GTK_CONTAINER (page_vbox), 8); games_hbox = gtk_hbox_new (FALSE, 0); gtk_container_set_border_width (GTK_CONTAINER (games_hbox), 0); gtk_box_pack_start (GTK_BOX (page_vbox), games_hbox, TRUE, TRUE, 0); frame = gtk_frame_new (NULL); gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN); scrollwin = gtk_scrolled_window_new (NULL, NULL); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrollwin), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); gtklist = gtk_list_new (); gtk_widget_set_usize (gtklist, 136, -1); // gtk_container_add (GTK_CONTAINER (scrollwin), gtklist); gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(scrollwin), gtklist); for (i = 0; i < GAMES_TOTAL; i++) { genprefs[i].game_button = gtk_list_item_new(); gtk_container_add (GTK_CONTAINER (genprefs[i].game_button), game_pixmap_with_label (i)); gtk_signal_connect (GTK_OBJECT (genprefs[i].game_button), "select", GTK_SIGNAL_FUNC (game_listitem_selected_callback), GINT_TO_POINTER(i)); gtk_widget_show(genprefs[i].game_button); gtk_container_add (GTK_CONTAINER (gtklist), genprefs[i].game_button); } gtk_widget_show(gtklist); gtk_container_add (GTK_CONTAINER (frame), scrollwin); gtk_widget_show(scrollwin); gtk_box_pack_start (GTK_BOX (games_hbox), frame, FALSE, FALSE, 0); gtk_widget_show (frame); games_notebook = gtk_notebook_new (); // the tabs are hidden, so nobody will notice its a notebook gtk_notebook_set_show_tabs (GTK_NOTEBOOK (games_notebook), FALSE); gtk_notebook_set_show_border (GTK_NOTEBOOK (games_notebook), FALSE); gtk_box_pack_start (GTK_BOX (games_hbox), games_notebook, FALSE, FALSE, 15); for (i = 0; i < GAMES_TOTAL; i++) { page = generic_game_frame (i); label = gtk_label_new (games[i].name); gtk_widget_show (label); gtk_notebook_append_page (GTK_NOTEBOOK (games_notebook), page, label); } if (defgame == UNKNOWN_SERVER) { defgame = QW_SERVER; typestr = config_get_string ("/" CONFIG_FILE "/Games Config/game"); if (typestr) { defgame = id2type (typestr); g_free (typestr); } } if(defgame >= GAMES_TOTAL) defgame = QW_SERVER; gtk_notebook_set_page (GTK_NOTEBOOK (games_notebook), defgame); gtk_list_item_select(GTK_LIST_ITEM(genprefs[defgame].game_button)); gtk_widget_show (games_notebook); /* Common Options */ frame = gtk_frame_new (_("Common Options")); gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_ETCHED_IN); gtk_box_pack_start (GTK_BOX (page_vbox), frame, FALSE, FALSE, 15); hbox = gtk_hbox_new (TRUE, 4); gtk_container_set_border_width (GTK_CONTAINER (hbox), 6); gtk_container_add (GTK_CONTAINER (frame), hbox); /* Disable CD Audio */ nocdaudio_check_button = gtk_check_button_new_with_label (_("Disable CD Audio")); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (nocdaudio_check_button), default_nocdaudio); gtk_box_pack_end (GTK_BOX (hbox), nocdaudio_check_button, TRUE, FALSE, 0); gtk_widget_show (nocdaudio_check_button); /* Disable Sound */ nosound_check_button = gtk_check_button_new_with_label (_("Disable Sound")); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (nosound_check_button), default_nosound); gtk_box_pack_end (GTK_BOX (hbox), nosound_check_button, TRUE, FALSE, 0); gtk_widget_show (nosound_check_button); gtk_widget_show (hbox); gtk_widget_show (frame); gtk_widget_show (page_vbox); gtk_widget_show (games_hbox); return page_vbox; } static void add_pushlatency_options (GtkWidget *vbox) { GtkWidget *hbox; GtkObject *adj; GSList *group = NULL; int i; static const char *pushlatency_modes[] = { N_("Do not set (use game default)"), N_("Automatically calculate from server ping time"), N_("Fixed value") }; for (i = 0; i < 3; i++) { hbox = gtk_hbox_new (FALSE, 4); gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0); pushlatency_mode_radio_buttons[i] = gtk_radio_button_new_with_label (group, _(pushlatency_modes[i])); group = gtk_radio_button_group ( GTK_RADIO_BUTTON (pushlatency_mode_radio_buttons[i])); gtk_box_pack_start (GTK_BOX (hbox), pushlatency_mode_radio_buttons[i], FALSE, FALSE, 0); gtk_widget_show (pushlatency_mode_radio_buttons[i]); gtk_widget_show (hbox); } gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON (pushlatency_mode_radio_buttons[pushlatency_mode]), TRUE); adj = gtk_adjustment_new (pushlatency_value, -1000.0, -10.0, 10.0, 50.0, 0.0); pushlatency_value_spinner = gtk_spin_button_new (GTK_ADJUSTMENT (adj), 0, 0); gtk_spin_button_set_update_policy ( GTK_SPIN_BUTTON (pushlatency_value_spinner), GTK_UPDATE_ALWAYS); gtk_widget_set_usize (pushlatency_value_spinner, 64, -1); gtk_box_pack_start (GTK_BOX (hbox), pushlatency_value_spinner, FALSE, FALSE, 0); gtk_widget_show (pushlatency_value_spinner); } static struct q3_common_prefs_s* get_pref_widgets_for_game(enum server_type type) { switch(type) { case Q3_SERVER: return &q3_prefs; case Q4_SERVER: return &q4_prefs; case WO_SERVER: return &wo_prefs; case WOET_SERVER: return &woet_prefs; case DOOM3_SERVER: return &doom3_prefs; case EF_SERVER: return &ef_prefs; case SOF2S_SERVER: return &sof2_prefs; case COD_SERVER: return &cod_prefs; case JK3_SERVER: return &jk3_prefs; case NEXUIZ_SERVER: return &nexuiz_prefs; case WARSOW_SERVER: return &warsow_prefs; case TREMULOUS_SERVER: return &tremulous_prefs; default: return NULL; } } static GtkWidget *q3_options_page (enum server_type type) { GtkWidget *page_vbox; GtkWidget *hbox; GtkWidget *label; struct q3_common_prefs_s* w = get_pref_widgets_for_game(type); page_vbox = gtk_vbox_new (FALSE, 4); gtk_container_set_border_width (GTK_CONTAINER (page_vbox), 8); if(w->protocols) { hbox = gtk_hbox_new (FALSE, 8); gtk_box_pack_start (GTK_BOX (page_vbox), hbox, FALSE, FALSE, 0); label = gtk_label_new (_("Masterserver Protocol Version")); gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); gtk_widget_show (label); w->proto_entry = gtk_combo_new (); gtk_combo_set_use_arrows_always (GTK_COMBO (w->proto_entry), TRUE); gtk_combo_set_popdown_strings(GTK_COMBO (w->proto_entry), createGListfromchar((char**)w->protocols)); gtk_list_set_selection_mode (GTK_LIST (GTK_COMBO (w->proto_entry)->list), GTK_SELECTION_BROWSE); gtk_entry_set_text (GTK_ENTRY (GTK_COMBO (w->proto_entry)->entry), game_get_attribute(type,"masterprotocol")); gtk_box_pack_start (GTK_BOX (hbox), w->proto_entry, FALSE, FALSE, 0); gtk_widget_show (w->proto_entry); gtk_widget_show (hbox); } if(w->flags & Q3_PREF_SETFS_GAME) { w->setfs_gamebutton = gtk_check_button_new_with_label (_("set fs_game on connect")); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (w->setfs_gamebutton), str2bool(game_get_attribute(type,"setfs_game"))); gtk_box_pack_start (GTK_BOX (page_vbox), w->setfs_gamebutton, FALSE, FALSE, 0); gtk_widget_show (w->setfs_gamebutton); } if(w->flags & Q3_PREF_PB) { w->set_punkbusterbutton = gtk_check_button_new_with_label (_("set cl_punkbuster on connect")); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (w->set_punkbusterbutton), str2bool(game_get_attribute(type,"set_punkbuster"))); gtk_box_pack_start (GTK_BOX (page_vbox), w->set_punkbusterbutton, FALSE, FALSE, 0); gtk_widget_show (w->set_punkbusterbutton); } if(w->flags & Q3_PREF_CONSOLE) { w->console_button = gtk_check_button_new_with_label (_("enable console")); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (w->console_button), str2bool(game_get_attribute(type,"enable_console"))); gtk_box_pack_start (GTK_BOX (page_vbox), w->console_button, FALSE, FALSE, 0); gtk_widget_show (w->console_button); } gtk_widget_show (page_vbox); return page_vbox; } static void q3_set_memory_callback (GtkWidget *widget, int what) { int com_hunkmegs = 56; int com_zonemegs = 16; int com_soundmegs = 8; int cg_precachedmodels = 3; if(what == 1) { com_hunkmegs = 72; com_zonemegs = 24; com_soundmegs = 16; cg_precachedmodels = 6; } else if(what == 2) { com_hunkmegs = 96; com_zonemegs = 24; com_soundmegs = 16; cg_precachedmodels = 15; } gtk_adjustment_set_value(gtk_spin_button_get_adjustment( GTK_SPIN_BUTTON(com_hunkmegs_spinner)),com_hunkmegs); gtk_adjustment_set_value(gtk_spin_button_get_adjustment( GTK_SPIN_BUTTON(com_zonemegs_spinner)),com_zonemegs); gtk_adjustment_set_value(gtk_spin_button_get_adjustment( GTK_SPIN_BUTTON(com_soundmegs_spinner)),com_soundmegs); gtk_adjustment_set_value(gtk_spin_button_get_adjustment( GTK_SPIN_BUTTON(cg_precachedmodels_spinner)),cg_precachedmodels); } static GtkWidget *q3_mem_options_page (void) { GtkWidget *page_vbox; GtkWidget *hbox; GtkWidget *hbox2; GtkWidget *label; GtkWidget *frame; GtkObject *adj; GtkWidget *button; int pass_memory_options = str2bool(game_get_attribute(Q3_SERVER,"pass_memory_options")); int com_hunkmegs = atoi(game_get_attribute(Q3_SERVER,"com_hunkmegs")); int com_zonemegs = atoi(game_get_attribute(Q3_SERVER,"com_zonemegs")); int com_soundmegs = atoi(game_get_attribute(Q3_SERVER,"com_soundmegs")); int cg_precachedmodels = atoi(game_get_attribute(Q3_SERVER,"cg_precachedmodels")); page_vbox = gtk_vbox_new (FALSE, 4); gtk_container_set_border_width (GTK_CONTAINER (page_vbox), 8); pass_memory_options_button = gtk_check_button_new_with_label (_("Pass memory settings on command line")); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (pass_memory_options_button), pass_memory_options); gtk_box_pack_start (GTK_BOX (page_vbox), pass_memory_options_button, FALSE, FALSE, 0); gtk_widget_show (pass_memory_options_button); hbox = gtk_hbox_new (FALSE, 8); gtk_box_pack_start (GTK_BOX (page_vbox), hbox, FALSE, FALSE, 0); adj = gtk_adjustment_new (com_hunkmegs, 32, 1024, 8, 32, 0); com_hunkmegs_spinner = gtk_spin_button_new (GTK_ADJUSTMENT (adj), 0, 0); gtk_spin_button_set_update_policy (GTK_SPIN_BUTTON (com_hunkmegs_spinner), GTK_UPDATE_ALWAYS); gtk_widget_set_usize (com_hunkmegs_spinner, 64, -1); gtk_box_pack_start (GTK_BOX (hbox), com_hunkmegs_spinner, FALSE, FALSE, 0); gtk_widget_show (com_hunkmegs_spinner); // Mega Byte label = gtk_label_new (_("MB")); gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); gtk_widget_show (label); label = gtk_label_new (_("com_hunkmegs")); gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); gtk_widget_show (label); gtk_widget_show (hbox); hbox = gtk_hbox_new (FALSE, 8); gtk_box_pack_start (GTK_BOX (page_vbox), hbox, FALSE, FALSE, 0); adj = gtk_adjustment_new (com_zonemegs, 16, 1024, 4, 8, 0); com_zonemegs_spinner = gtk_spin_button_new (GTK_ADJUSTMENT (adj), 0, 0); gtk_spin_button_set_update_policy (GTK_SPIN_BUTTON (com_zonemegs_spinner), GTK_UPDATE_ALWAYS); gtk_widget_set_usize (com_zonemegs_spinner, 64, -1); gtk_box_pack_start (GTK_BOX (hbox), com_zonemegs_spinner, FALSE, FALSE, 0); gtk_widget_show (com_zonemegs_spinner); // Mega Byte label = gtk_label_new (_("MB")); gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); gtk_widget_show (label); label = gtk_label_new (_("com_zonemegs")); gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); gtk_widget_show (label); gtk_widget_show (hbox); hbox = gtk_hbox_new (FALSE, 8); gtk_box_pack_start (GTK_BOX (page_vbox), hbox, FALSE, FALSE, 0); adj = gtk_adjustment_new (com_soundmegs, 16, 1024, 4, 8, 0); com_soundmegs_spinner = gtk_spin_button_new (GTK_ADJUSTMENT (adj), 0, 0); gtk_spin_button_set_update_policy (GTK_SPIN_BUTTON (com_soundmegs_spinner), GTK_UPDATE_ALWAYS); gtk_widget_set_usize (com_soundmegs_spinner, 64, -1); gtk_box_pack_start (GTK_BOX (hbox), com_soundmegs_spinner, FALSE, FALSE, 0); gtk_widget_show (com_soundmegs_spinner); // Mega Byte label = gtk_label_new (_("MB")); gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); gtk_widget_show (label); label = gtk_label_new (_("com_soundmegs")); gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); gtk_widget_show (label); gtk_widget_show (hbox); hbox = gtk_hbox_new (FALSE, 8); gtk_box_pack_start (GTK_BOX (page_vbox), hbox, FALSE, FALSE, 0); // value, lower, upper, step_increment, page_increment, page_size adj = gtk_adjustment_new (cg_precachedmodels, 2, 32, 1, 4, 0); cg_precachedmodels_spinner = gtk_spin_button_new (GTK_ADJUSTMENT (adj), 0, 0); gtk_spin_button_set_update_policy (GTK_SPIN_BUTTON (cg_precachedmodels_spinner), GTK_UPDATE_ALWAYS); gtk_widget_set_usize (cg_precachedmodels_spinner, 64, -1); gtk_box_pack_start (GTK_BOX (hbox), cg_precachedmodels_spinner, FALSE, FALSE, 0); gtk_widget_show (cg_precachedmodels_spinner); // Mega Byte label = gtk_label_new (_("MB")); gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); gtk_widget_show (label); label = gtk_label_new (_("cg_precachedmodels")); gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); gtk_widget_show (label); gtk_widget_show (hbox); hbox = gtk_hbox_new (FALSE, 0); gtk_box_pack_start (GTK_BOX (page_vbox), hbox, FALSE, FALSE, 8); frame = gtk_frame_new (_("Preset values")); gtk_box_pack_start (GTK_BOX (hbox), frame, FALSE, FALSE, 0); hbox2 = gtk_hbox_new (FALSE, 8); gtk_container_set_border_width(GTK_CONTAINER(hbox2),8); gtk_container_add (GTK_CONTAINER (frame), hbox2); button = gtk_button_new_with_label(_("Default")); gtk_box_pack_start (GTK_BOX (hbox2), button, FALSE, FALSE, 0); gtk_signal_connect (GTK_OBJECT (button), "clicked", GTK_SIGNAL_FUNC (q3_set_memory_callback), (gpointer) 0); gtk_widget_show (button); button = gtk_button_new_with_label(_("128MB")); gtk_box_pack_start (GTK_BOX (hbox2), button, FALSE, FALSE, 0); gtk_signal_connect (GTK_OBJECT (button), "clicked", GTK_SIGNAL_FUNC (q3_set_memory_callback), (gpointer) 1); gtk_widget_show (button); button = gtk_button_new_with_label(_(">256MB")); gtk_box_pack_start (GTK_BOX (hbox2), button, FALSE, FALSE, 0); gtk_signal_connect (GTK_OBJECT (button), "clicked", GTK_SIGNAL_FUNC (q3_set_memory_callback), (gpointer) 2); gtk_widget_show (button); gtk_widget_show (hbox2); gtk_widget_show (frame); gtk_widget_show (hbox); gtk_widget_show (page_vbox); return page_vbox; } void add_q3_options_to_notebook(GtkWidget *notebook, enum server_type type) { gtk_notebook_append_page (GTK_NOTEBOOK (notebook), q3_options_page(type), gtk_label_new (_("Options"))); if(type == Q3_SERVER) gtk_notebook_append_page (GTK_NOTEBOOK (notebook), q3_mem_options_page(), gtk_label_new (_("Memory"))); } void add_un_options_to_notebook(GtkWidget *notebook, enum server_type type) { } void add_ut2_options_to_notebook(GtkWidget *notebook, enum server_type type) { } static GtkWidget *qw_options_page (void) { GtkWidget *page_vbox; GtkWidget *label; GtkWidget *frame2; GtkWidget *hbox; GtkWidget *vbox2; GtkWidget *option_menu; debug (5, "qw_options_page()"); page_vbox = gtk_vbox_new (FALSE, 4); gtk_container_set_border_width (GTK_CONTAINER (page_vbox), 8); /* QW Specific Features */ /* 'w_switch' & 'b_switch' control */ frame2 = gtk_frame_new (_("The highest weapon that Quake should " "switch to...")); gtk_box_pack_start (GTK_BOX (page_vbox), frame2, FALSE, FALSE, 0); vbox2 = gtk_vbox_new (FALSE, 0); gtk_container_set_border_width (GTK_CONTAINER (vbox2), 6); gtk_container_add (GTK_CONTAINER (frame2), vbox2); /* 'w_switch' */ hbox = gtk_hbox_new (FALSE, 4); gtk_box_pack_start (GTK_BOX (vbox2), hbox, FALSE, FALSE, 0); label = gtk_label_new (_("upon a weapon pickup")); gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); gtk_widget_show (label); option_menu = gtk_option_menu_new (); gtk_option_menu_set_menu (GTK_OPTION_MENU (option_menu), create_wb_switch_menu (set_w_switch_callback)); gtk_option_menu_set_history (GTK_OPTION_MENU (option_menu), pref_w_switch); gtk_box_pack_end (GTK_BOX (hbox), option_menu, FALSE, FALSE, 0); gtk_widget_show (option_menu); gtk_widget_show (hbox); /* 'b_switch' */ hbox = gtk_hbox_new (FALSE, 4); gtk_box_pack_start (GTK_BOX (vbox2), hbox, FALSE, FALSE, 0); label = gtk_label_new (_("upon a backpack pickup")); gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); gtk_widget_show (label); option_menu = gtk_option_menu_new (); gtk_option_menu_set_menu (GTK_OPTION_MENU (option_menu), create_wb_switch_menu (set_b_switch_callback)); gtk_option_menu_set_history (GTK_OPTION_MENU (option_menu), pref_b_switch); gtk_box_pack_end (GTK_BOX (hbox), option_menu, FALSE, FALSE, 0); gtk_widget_show (option_menu); gtk_widget_show (hbox); gtk_widget_show (vbox2); gtk_widget_show (frame2); /* 'noaim' */ hbox = gtk_hbox_new (FALSE, 8); gtk_box_pack_start (GTK_BOX (page_vbox), hbox, FALSE, FALSE, 10); noaim_check_button = gtk_check_button_new_with_label (_("Disable auto-aiming")); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (noaim_check_button), default_noaim); gtk_box_pack_start (GTK_BOX (hbox), noaim_check_button, FALSE, FALSE, 0); gtk_widget_show (noaim_check_button); gtk_widget_show (hbox); gtk_widget_show (page_vbox); return page_vbox; } // qworq2: 0=qw/1=q2 static GtkWidget *qw_q2_options_page (int qworq2) { GtkWidget *page_vbox; GtkWidget *label; GtkWidget *frame2; GtkWidget *hbox; GtkWidget *hbox2; GtkWidget *vbox2; GtkWidget *option_menu; GtkObject *adj; debug (5, "qw_q2_options_page(%d)",qworq2); page_vbox = gtk_vbox_new (FALSE, 4); gtk_container_set_border_width (GTK_CONTAINER (page_vbox), 8); hbox = gtk_hbox_new (FALSE, 16); gtk_box_pack_start (GTK_BOX (page_vbox), hbox, FALSE, FALSE, 0); /* Skins */ hbox2 = gtk_hbox_new (FALSE, 4); gtk_box_pack_start (GTK_BOX (hbox), hbox2, FALSE, FALSE, 0); label = gtk_label_new (_("Skins")); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_box_pack_start (GTK_BOX (hbox2), label, FALSE, FALSE, 0); gtk_widget_show (label); option_menu = gtk_option_menu_new (); gtk_option_menu_set_menu (GTK_OPTION_MENU (option_menu), create_noskins_menu (qworq2)); gtk_option_menu_set_history (GTK_OPTION_MENU (option_menu), qworq2?pref_q2_noskins:pref_qw_noskins); gtk_box_pack_end (GTK_BOX (hbox2), option_menu, FALSE, FALSE, 0); gtk_widget_show (option_menu); gtk_widget_show (hbox2); /* Network Options */ /* Rate */ hbox2 = gtk_hbox_new (FALSE, 4); gtk_box_pack_end (GTK_BOX (hbox), hbox2, FALSE, FALSE, 0); label = gtk_label_new (_("Rate")); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_box_pack_start (GTK_BOX (hbox2), label, FALSE, FALSE, 0); gtk_widget_show (label); adj = gtk_adjustment_new (qworq2?default_q2_rate:default_qw_rate, 0.0, 25000.0, 500.0, 1000.0, 0.0); rate_spinner[qworq2] = gtk_spin_button_new (GTK_ADJUSTMENT (adj), 0, 0); gtk_spin_button_set_update_policy (GTK_SPIN_BUTTON (rate_spinner[qworq2]), GTK_UPDATE_ALWAYS); gtk_widget_set_usize (rate_spinner[qworq2], 64, -1); gtk_box_pack_end (GTK_BOX (hbox2), rate_spinner[qworq2], FALSE, FALSE, 0); gtk_widget_show (rate_spinner[qworq2]); gtk_widget_show (hbox2); gtk_widget_show (hbox); /* QW Specific Features */ if(qworq2 == 0) { /* 'pushlatency' */ frame2 = gtk_frame_new (_("pushlatency")); gtk_box_pack_start (GTK_BOX (page_vbox), frame2, FALSE, FALSE, 10); vbox2 = gtk_vbox_new (FALSE, 2); gtk_container_set_border_width (GTK_CONTAINER (vbox2), 6); gtk_container_add (GTK_CONTAINER (frame2), vbox2); add_pushlatency_options (vbox2); gtk_widget_show (vbox2); gtk_widget_show (frame2); } /* Troubleshooting */ frame2 = gtk_frame_new (_("Troubleshooting")); gtk_box_pack_start (GTK_BOX (page_vbox), frame2, FALSE, FALSE, 10); vbox2 = gtk_vbox_new (FALSE, 0); gtk_container_set_border_width (GTK_CONTAINER (vbox2), 6); gtk_container_add (GTK_CONTAINER (frame2), vbox2); /* 'cl_nodelta' */ hbox = gtk_hbox_new (FALSE, 8); gtk_box_pack_start (GTK_BOX (vbox2), hbox, FALSE, FALSE, 0); cl_nodelta_check_button[qworq2] = gtk_check_button_new_with_label ( _("Disable delta-compression (cl_nodelta)")); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (cl_nodelta_check_button[qworq2]), qworq2?default_q2_cl_nodelta:default_qw_cl_nodelta); gtk_box_pack_start (GTK_BOX (hbox), cl_nodelta_check_button[qworq2], FALSE, FALSE, 0); gtk_widget_show (cl_nodelta_check_button[qworq2]); gtk_widget_show (hbox); /* 'cl_predict_players' ('cl_predict' in Q2) */ hbox = gtk_hbox_new (FALSE, 8); gtk_box_pack_start (GTK_BOX (vbox2), hbox, FALSE, FALSE, 0); cl_predict_check_button[qworq2] = gtk_check_button_new_with_label ( _("Disable player/entity prediction (cl_predict_players)")); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (cl_predict_check_button[qworq2]), 1 - (qworq2?default_q2_cl_predict:default_qw_cl_predict)); gtk_box_pack_start (GTK_BOX (hbox), cl_predict_check_button[qworq2], FALSE, FALSE, 0); gtk_widget_show (cl_predict_check_button[qworq2]); gtk_widget_show (hbox); gtk_widget_show (vbox2); gtk_widget_show (frame2); gtk_widget_show (page_vbox); return page_vbox; } void add_qw_options_to_notebook(GtkWidget *notebook, enum server_type type) { gtk_notebook_append_page (GTK_NOTEBOOK (notebook), qw_options_page(), gtk_label_new (_("Weapons"))); gtk_notebook_append_page (GTK_NOTEBOOK (notebook), qw_q2_options_page(0), gtk_label_new (_("Options"))); gtk_notebook_append_page (GTK_NOTEBOOK (notebook), player_profile_qw_page(), gtk_label_new (_("Player Profile"))); } void add_q2_options_to_notebook(GtkWidget *notebook, enum server_type type) { gtk_notebook_append_page (GTK_NOTEBOOK (notebook), qw_q2_options_page(1), gtk_label_new (_("Options"))); gtk_notebook_append_page (GTK_NOTEBOOK (notebook), player_profile_q2_page(), gtk_label_new (_("Player Profile"))); } void add_q1_options_to_notebook(GtkWidget *notebook, enum server_type type) { gtk_notebook_append_page (GTK_NOTEBOOK (notebook), player_profile_q1_page(), gtk_label_new (_("Player Profile"))); } void add_t2_options_to_notebook(GtkWidget *notebook, enum server_type type) { gtk_notebook_append_page (GTK_NOTEBOOK (notebook), player_profile_t2_page(), gtk_label_new (_("Player Profile"))); } static void terminate_toggled_callback (GtkWidget *widget, gpointer data) { int val; val = GTK_TOGGLE_BUTTON (terminate_check_button)->active; gtk_widget_set_sensitive (iconify_check_button, TRUE - val); } static void launchinfo_toggled_callback (GtkWidget *widget, gpointer data) { int val; val = GTK_TOGGLE_BUTTON (launchinfo_check_button)->active; } static void prelaunchexec_toggled_callback (GtkWidget *widget, gpointer data) { int val; val = GTK_TOGGLE_BUTTON (prelaunchexec_check_button)->active; } /** make entries editable if yes == TRUE */ static void sound_set_widgets_sensitive(gboolean yes) { gtk_widget_set_sensitive (sound_player_entry, yes); gtk_widget_set_sensitive (sound_xqf_start_entry, yes); gtk_widget_set_sensitive (sound_xqf_quit_entry, yes); gtk_widget_set_sensitive (sound_update_done_entry, yes); gtk_widget_set_sensitive (sound_refresh_done_entry, yes); gtk_widget_set_sensitive (sound_stop_entry, yes); gtk_widget_set_sensitive (sound_redial_success_entry, yes); gtk_widget_set_sensitive (sound_server_connect_entry, yes); gtk_widget_set_sensitive (sound_player_file_dialog_button, yes); gtk_widget_set_sensitive (sound_xqf_start_file_dialog_button, yes); gtk_widget_set_sensitive (sound_xqf_quit_file_dialog_button, yes); gtk_widget_set_sensitive (sound_update_done_file_dialog_button, yes); gtk_widget_set_sensitive (sound_refresh_done_file_dialog_button, yes); gtk_widget_set_sensitive (sound_stop_file_dialog_button, yes); gtk_widget_set_sensitive (sound_redial_success_file_dialog_button, yes); gtk_widget_set_sensitive (sound_server_connect_file_dialog_button, yes); gtk_widget_set_sensitive (sound_xqf_start_file_test_button, yes); gtk_widget_set_sensitive (sound_xqf_quit_file_test_button, yes); gtk_widget_set_sensitive (sound_update_done_file_test_button, yes); gtk_widget_set_sensitive (sound_refresh_done_file_test_button, yes); gtk_widget_set_sensitive (sound_stop_file_test_button, yes); gtk_widget_set_sensitive (sound_redial_success_file_test_button, yes); gtk_widget_set_sensitive (sound_server_connect_file_test_button, yes); } static void sound_enable_toggled_callback (GtkWidget *widget, gpointer data) { gboolean val; val = GTK_TOGGLE_BUTTON (sound_enable_check_button)->active; sound_set_widgets_sensitive(val); } static void save_srvinfo_toggled_callback (GtkWidget *widget, gpointer data) { int val; val = GTK_TOGGLE_BUTTON (save_srvinfo_check_button)->active; gtk_widget_set_sensitive (save_plrinfo_check_button, val); } static GtkWidget *appearance_options_page (void) { GtkWidget *page_vbox; GtkWidget *frame; GtkWidget *hbox; GtkWidget *vbox; GSList *group = NULL; static const char *toolbar_styles[] = { N_("Icons"), N_("Text"), N_("Both") }; int i; page_vbox = gtk_vbox_new (FALSE, 4); gtk_container_set_border_width (GTK_CONTAINER (page_vbox), 8); frame = gtk_frame_new (_("Server List")); gtk_box_pack_start (GTK_BOX (page_vbox), frame, FALSE, FALSE, 0); vbox = gtk_vbox_new (FALSE, 2); gtk_container_set_border_width (GTK_CONTAINER (vbox), 6); gtk_container_add (GTK_CONTAINER (frame), vbox); /* Lookup host names */ hbox = gtk_hbox_new (FALSE, 4); gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0); show_hostnames_check_button = gtk_check_button_new_with_label (_("Show host names")); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (show_hostnames_check_button), show_hostnames); gtk_box_pack_start (GTK_BOX (hbox), show_hostnames_check_button, FALSE, FALSE, 0); gtk_tooltips_set_tip (tooltips, show_hostnames_check_button, _("Show hostnames instead of IP addresses if possible"), NULL); gtk_widget_show (show_hostnames_check_button); gtk_widget_show (hbox); /* Show default port */ hbox = gtk_hbox_new (FALSE, 4); gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0); show_defport_check_button = gtk_check_button_new_with_label (_("Show default port")); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (show_defport_check_button), show_default_port); gtk_box_pack_start (GTK_BOX (hbox), show_defport_check_button, FALSE, FALSE, 0); gtk_widget_show (show_defport_check_button); gtk_widget_show (hbox); /* show bots */ hbox = gtk_hbox_new (FALSE, 4); gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0); countbots_check_button = gtk_check_button_new_with_label ( _("Do not count bots as players")); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (countbots_check_button), serverlist_countbots); gtk_box_pack_start (GTK_BOX (hbox), countbots_check_button, FALSE, FALSE, 0); gtk_widget_show (countbots_check_button); gtk_widget_show (hbox); /* Sort servers real-time during refresh */ hbox = gtk_hbox_new (FALSE, 4); gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0); refresh_sorts_check_button = gtk_check_button_new_with_label ( _("Sort servers real-time during refresh")); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (refresh_sorts_check_button), default_refresh_sorts); gtk_box_pack_start (GTK_BOX (hbox), refresh_sorts_check_button, FALSE, FALSE, 0); gtk_widget_show (refresh_sorts_check_button); gtk_widget_show (hbox); /* Refresh on update */ hbox = gtk_hbox_new (FALSE, 4); gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0); refresh_on_update_check_button = gtk_check_button_new_with_label (_("Refresh on update")); gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON (refresh_on_update_check_button), default_refresh_on_update); gtk_box_pack_start (GTK_BOX (hbox), refresh_on_update_check_button, FALSE, FALSE, 0); gtk_widget_show (refresh_on_update_check_button); gtk_widget_show (hbox); /* Resolve on update */ hbox = gtk_hbox_new (FALSE, 4); gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0); resolve_on_update_check_button = gtk_check_button_new_with_label (_("Resolve hostnames on update")); gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON (resolve_on_update_check_button), default_resolve_on_update); gtk_tooltips_set_tip (tooltips, resolve_on_update_check_button, _("Enable or disable DNS resolution of IP addresses"), NULL); gtk_box_pack_start (GTK_BOX (hbox), resolve_on_update_check_button, FALSE, FALSE, 0); gtk_widget_show (resolve_on_update_check_button); gtk_widget_show (hbox); /* Show only configured games */ hbox = gtk_hbox_new (FALSE, 4); gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0); show_only_configured_games_check_button = gtk_check_button_new_with_label (_("Show only configured games")); gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON (show_only_configured_games_check_button), default_show_only_configured_games); gtk_box_pack_start (GTK_BOX (hbox), show_only_configured_games_check_button, FALSE, FALSE, 0); gtk_widget_show (show_only_configured_games_check_button); gtk_widget_show (hbox); /* gtkrc */ hbox = gtk_hbox_new (FALSE, 4); gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0); use_custom_gtkrc_check_button = gtk_check_button_new_with_label (_("Use custom color settings")); gtk_tooltips_set_tip (tooltips, use_custom_gtkrc_check_button, _("Use XQF's" " color settings instead of the system ones. You need to restart XQF" " for this setting to take effect. Note that you may need to install" " the gtk-engines package."), NULL); gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON (use_custom_gtkrc_check_button), use_custom_gtkrc); gtk_box_pack_start (GTK_BOX (hbox), use_custom_gtkrc_check_button, FALSE, FALSE, 0); gtk_widget_show (use_custom_gtkrc_check_button); gtk_widget_show (hbox); gtk_widget_show (vbox); gtk_widget_show (frame); /* Toolbar */ frame = gtk_frame_new (_("Toolbar")); gtk_box_pack_start (GTK_BOX (page_vbox), frame, FALSE, FALSE, 0); hbox = gtk_hbox_new (FALSE, 4); gtk_container_set_border_width (GTK_CONTAINER (hbox), 6); gtk_container_add (GTK_CONTAINER (frame), hbox); /* Toolbar Style */ for (i = 0; i < 3; i++) { toolbar_style_radio_buttons[i] = gtk_radio_button_new_with_label (group, _(toolbar_styles[i])); group = gtk_radio_button_group ( GTK_RADIO_BUTTON (toolbar_style_radio_buttons[i])); gtk_box_pack_start (GTK_BOX (hbox), toolbar_style_radio_buttons[i], FALSE, FALSE, 0); gtk_widget_show (toolbar_style_radio_buttons[i]); } gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON (toolbar_style_radio_buttons[default_toolbar_style]), TRUE); /* Toolbar Tips */ toolbar_tips_check_button = gtk_check_button_new_with_label (_("Tooltips")); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toolbar_tips_check_button), default_toolbar_tips); gtk_box_pack_end (GTK_BOX (hbox), toolbar_tips_check_button, FALSE, FALSE, 0); gtk_widget_show (toolbar_tips_check_button); gtk_widget_show (hbox); gtk_widget_show (frame); gtk_widget_show (page_vbox); return page_vbox; } static void scan_maps_callback (GtkWidget *widget, gpointer data) { int i; create_splashscreen(); for (i = 0; i < GAMES_TOTAL; i++) { scan_maps_for(i); } destroy_splashscreen(); server_clist_set_list (cur_server_list); } static GtkWidget *general_options_page (void) { GtkWidget *page_vbox; GtkWidget *frame; GtkWidget *hbox; GtkWidget *vbox; GtkWidget *table; page_vbox = gtk_vbox_new (FALSE, 4); gtk_container_set_border_width (GTK_CONTAINER (page_vbox), 8); /* On Startup */ frame = gtk_frame_new (_("On Startup")); gtk_box_pack_start (GTK_BOX (page_vbox), frame, FALSE, FALSE, 0); /* Refresh Favorites */ vbox = gtk_vbox_new (FALSE, 2); gtk_container_set_border_width (GTK_CONTAINER (vbox), 6); gtk_container_add (GTK_CONTAINER (frame), vbox); hbox = gtk_hbox_new (FALSE, 4); gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0); auto_favorites_check_button = gtk_check_button_new_with_label (_("Refresh Favorites")); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (auto_favorites_check_button), default_auto_favorites); gtk_box_pack_start (GTK_BOX (hbox), auto_favorites_check_button, FALSE, FALSE, 0); gtk_widget_show (auto_favorites_check_button); gtk_widget_show (hbox); hbox = gtk_hbox_new (FALSE, 4); gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0); show_splash_button = gtk_check_button_new_with_label (_("Show splash screen")); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (show_splash_button), default_show_splash); gtk_box_pack_start (GTK_BOX (hbox), show_splash_button, FALSE, FALSE, 0); gtk_widget_show (show_splash_button); gtk_widget_show (hbox); hbox = gtk_hbox_new (FALSE, 4); gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0); auto_maps_check_button = gtk_check_button_new_with_label (_("Scan for maps")); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (auto_maps_check_button), default_auto_maps); gtk_tooltips_set_tip (tooltips, auto_maps_check_button, _("Scan game directories for installed maps. xqf will" " take longer to start up when enabled."), NULL); gtk_box_pack_start (GTK_BOX (hbox), auto_maps_check_button, FALSE, FALSE, 0); gtk_widget_show (auto_maps_check_button); { GtkWidget* button = gtk_button_new_with_label(_("scan now")); gtk_box_pack_end (GTK_BOX (hbox), button, FALSE, FALSE, 0); gtk_misc_set_padding(GTK_MISC(GTK_BIN(button)->child),4,0); gtk_signal_connect (GTK_OBJECT (button), "clicked", GTK_SIGNAL_FUNC (scan_maps_callback), NULL); gtk_widget_show (button); } gtk_widget_show (hbox); #ifdef USE_GTK2 /*Tray icon*/ hbox = gtk_hbox_new (FALSE, 4); gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0); tray_icon_check_button = gtk_check_button_new_with_label (_("Minimize to system tray")); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (tray_icon_check_button), default_show_tray_icon); gtk_tooltips_set_tip (tooltips, tray_icon_check_button, _("Enable xqf tray icon. You need to restart xqf for this to take effect."), NULL); gtk_box_pack_start (GTK_BOX (hbox), tray_icon_check_button, FALSE, FALSE, 0); gtk_widget_show (tray_icon_check_button); gtk_widget_show (hbox); #endif gtk_widget_show (vbox); gtk_widget_show (frame); /* On Exit */ frame = gtk_frame_new (_("On Exit")); gtk_box_pack_start (GTK_BOX (page_vbox), frame, FALSE, FALSE, 0); vbox = gtk_vbox_new (FALSE, 2); gtk_container_set_border_width (GTK_CONTAINER (vbox), 6); gtk_container_add (GTK_CONTAINER (frame), vbox); /* Save master lists */ hbox = gtk_hbox_new (FALSE, 4); gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0); save_lists_check_button = gtk_check_button_new_with_label (_("Save server lists")); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (save_lists_check_button), default_save_lists); gtk_box_pack_start (GTK_BOX (hbox), save_lists_check_button, FALSE, FALSE, 0); gtk_widget_show (save_lists_check_button); gtk_widget_show (hbox); /* Save server information */ hbox = gtk_hbox_new (FALSE, 4); gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0); save_srvinfo_check_button = gtk_check_button_new_with_label (_("Save server information")); gtk_box_pack_start (GTK_BOX (hbox), save_srvinfo_check_button, FALSE, FALSE, 0); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (save_srvinfo_check_button), default_save_srvinfo); gtk_signal_connect (GTK_OBJECT (save_srvinfo_check_button), "toggled", GTK_SIGNAL_FUNC (save_srvinfo_toggled_callback), NULL); gtk_widget_show (save_srvinfo_check_button); gtk_widget_show (hbox); /* Save player information */ hbox = gtk_hbox_new (FALSE, 4); gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0); save_plrinfo_check_button = gtk_check_button_new_with_label (_("Save player information")); gtk_box_pack_start (GTK_BOX (hbox), save_plrinfo_check_button, FALSE, FALSE, 0); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (save_plrinfo_check_button), default_save_plrinfo); if (!default_save_srvinfo) gtk_widget_set_sensitive (save_plrinfo_check_button, FALSE); gtk_widget_show (save_plrinfo_check_button); gtk_widget_show (hbox); gtk_widget_show (vbox); gtk_widget_show (frame); /* When launching a Game */ frame = gtk_frame_new (_("When launching a game...")); gtk_box_pack_start (GTK_BOX (page_vbox), frame, FALSE, FALSE, 0); vbox = gtk_vbox_new (FALSE, 2); gtk_container_set_border_width (GTK_CONTAINER (vbox), 6); gtk_container_add (GTK_CONTAINER (frame), vbox); /* Terminate */ table = gtk_table_new(3,2,TRUE); gtk_box_pack_start (GTK_BOX (vbox), table, FALSE, FALSE, 0); terminate_check_button = gtk_check_button_new_with_label ( _("Terminate XQF")); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (terminate_check_button), default_terminate); gtk_signal_connect (GTK_OBJECT (terminate_check_button), "toggled", GTK_SIGNAL_FUNC (terminate_toggled_callback), NULL); gtk_table_attach_defaults(GTK_TABLE(table),terminate_check_button, 0, 1, 0, 1); gtk_widget_show (terminate_check_button); gtk_widget_show (hbox); /* Iconify */ iconify_check_button = gtk_check_button_new_with_label (_("Iconify XQF window")); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (iconify_check_button), default_iconify); if (default_terminate) gtk_widget_set_sensitive (iconify_check_button, FALSE); gtk_widget_show (iconify_check_button); gtk_table_attach_defaults(GTK_TABLE(table),iconify_check_button, 1, 2, 0, 1); /* Launchinfo */ hbox = gtk_hbox_new (FALSE, 4); gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0); launchinfo_check_button = gtk_check_button_new_with_label (_("Create LaunchInfo.txt")); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (launchinfo_check_button), default_launchinfo); gtk_signal_connect (GTK_OBJECT (launchinfo_check_button), "toggled", GTK_SIGNAL_FUNC (launchinfo_toggled_callback), NULL); gtk_table_attach_defaults(GTK_TABLE(table),launchinfo_check_button, 0, 1, 1, 2); gtk_tooltips_set_tip (tooltips, launchinfo_check_button, _("Creates the file ~/.qf/LaunchInfo.txt with: ping ip:port name map curplayers maxplayers"), NULL); gtk_widget_show (launchinfo_check_button); /* Prelaunchinfo */ prelaunchexec_check_button = gtk_check_button_new_with_label (_("Execute prelaunch")); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (prelaunchexec_check_button), default_prelaunchexec); gtk_signal_connect (GTK_OBJECT (prelaunchexec_check_button), "toggled", GTK_SIGNAL_FUNC (prelaunchexec_toggled_callback), NULL); gtk_tooltips_set_tip (tooltips, prelaunchexec_check_button, _("Executes ~/.qf/PreLaunch (if it exists) before launching the game"), NULL); gtk_widget_show (prelaunchexec_check_button); gtk_table_attach_defaults(GTK_TABLE(table),prelaunchexec_check_button, 1, 2, 1, 2); /* Stop XMMS */ stopxmms_check_button = gtk_check_button_new_with_label (_("Stop current song in XMMS")); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (stopxmms_check_button), default_stopxmms); gtk_tooltips_set_tip (tooltips, stopxmms_check_button, _("Stopping XMMS will release /dev/dsp. " "Activate this option if you use XMMS and have a cheap soundcard " "that allows only one application to open /dev/dsp."), NULL); gtk_widget_show (stopxmms_check_button); gtk_table_attach_defaults(GTK_TABLE(table),stopxmms_check_button, 0, 1, 2, 3); gtk_widget_show(table); gtk_widget_show (hbox); gtk_widget_show (vbox); gtk_widget_show (frame); gtk_widget_show (hbox); gtk_widget_show (frame); gtk_widget_show (page_vbox); return page_vbox; } static GtkWidget *qstat_options_page (void) { GtkWidget *page_vbox; GtkWidget *frame; GtkWidget *table; GtkWidget *label; GtkObject *adj; GtkWidget* alignment; GtkWidget* hbox; unsigned row = 0; page_vbox = gtk_vbox_new (FALSE, 4); gtk_container_set_border_width (GTK_CONTAINER (page_vbox), 8); /* QStat preferences -- maxsimultaneous & maxretries */ frame = gtk_frame_new (_("QStat Options")); gtk_box_pack_start (GTK_BOX (page_vbox), frame, FALSE, FALSE, 0); table = gtk_table_new (2, 3, FALSE); gtk_table_set_row_spacings (GTK_TABLE (table), 2); gtk_table_set_col_spacings (GTK_TABLE (table), 4); gtk_container_set_border_width (GTK_CONTAINER (table), 6); gtk_container_add (GTK_CONTAINER (frame), table); /* maxsimultaneous */ label = gtk_label_new (_("Number of simultaneous servers to query")); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_table_attach_defaults (GTK_TABLE (table), label, 0, 1, row, row+1); gtk_widget_show (label); adj = gtk_adjustment_new (maxsimultaneous, 1.0, FD_SETSIZE, 1.0, 5.0, 0.0); maxsimultaneous_spinner = gtk_spin_button_new (GTK_ADJUSTMENT (adj), 0, 0); gtk_spin_button_set_update_policy (GTK_SPIN_BUTTON (maxsimultaneous_spinner), GTK_UPDATE_ALWAYS); gtk_widget_set_usize (maxsimultaneous_spinner, 48, -1); alignment = gtk_alignment_new (1, 0.5, 0, 0); gtk_container_add (GTK_CONTAINER (alignment), maxsimultaneous_spinner); gtk_table_attach_defaults (GTK_TABLE (table), alignment, 1, 2, row, row+1); gtk_widget_show (maxsimultaneous_spinner); gtk_widget_show(alignment); ++row; /* maxretries */ label = gtk_label_new (_("Number of retries")); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_table_attach_defaults (GTK_TABLE (table), label, 0, 1, row, row+1); gtk_widget_show (label); adj = gtk_adjustment_new (maxretries, 1.0, MAX_RETRIES, 1.0, 1.0, 0.0); maxretries_spinner = gtk_spin_button_new (GTK_ADJUSTMENT (adj), 0, 0); gtk_widget_set_usize (maxretries_spinner, 48, -1); alignment = gtk_alignment_new (1, 0.5, 0, 0); gtk_container_add (GTK_CONTAINER (alignment), maxretries_spinner); gtk_table_attach_defaults (GTK_TABLE (table), alignment, 1, 2, row, row+1); gtk_widget_show (maxretries_spinner); gtk_widget_show(alignment); ++row; /* srcip */ label = gtk_label_new (_("Source IP Address")); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_table_attach_defaults (GTK_TABLE (table), label, 0, 1, row, row+1); gtk_widget_show (label); qstat_srcip_entry = gtk_entry_new (); gtk_entry_set_max_length(GTK_ENTRY(qstat_srcip_entry), 15); gtk_entry_set_text (GTK_ENTRY (qstat_srcip_entry), qstat_srcip?qstat_srcip:""); alignment = gtk_alignment_new (1, 0.5, 0, 0); gtk_container_add (GTK_CONTAINER (alignment), qstat_srcip_entry); gtk_table_attach_defaults (GTK_TABLE (table), alignment, 1, 2, row, row+1); gtk_widget_show (qstat_srcip_entry); gtk_widget_show (alignment); ++row; /* srcport */ { char buf[6]; label = gtk_label_new (_("Source Port Range")); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_table_attach_defaults (GTK_TABLE (table), label, 0, 1, row, row+1); gtk_widget_show (label); hbox = gtk_hbox_new (FALSE, 4); if(qstat_srcport_low) snprintf(buf, sizeof(buf), "%hu", qstat_srcport_low); else *buf = '\0'; qstat_srcport_entry_low = gtk_entry_new (); gtk_entry_set_max_length(GTK_ENTRY(qstat_srcport_entry_low), 5); gtk_entry_set_text (GTK_ENTRY (qstat_srcport_entry_low), buf); gtk_box_pack_start(GTK_BOX(hbox), qstat_srcport_entry_low, FALSE, FALSE, 0); gtk_widget_set_usize (qstat_srcport_entry_low, 70, -1); label = gtk_label_new ("-"); gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); if(qstat_srcport_high) snprintf(buf, sizeof(buf), "%hu", qstat_srcport_high); else *buf = '\0'; qstat_srcport_entry_high = gtk_entry_new (); gtk_entry_set_max_length(GTK_ENTRY(qstat_srcport_entry_high), 5); gtk_entry_set_text (GTK_ENTRY (qstat_srcport_entry_high), buf); gtk_box_pack_start(GTK_BOX(hbox), qstat_srcport_entry_high, FALSE, FALSE, 0); gtk_widget_set_usize (qstat_srcport_entry_high, 70, -1); alignment = gtk_alignment_new (1, 0.5, 0, 0); gtk_container_add (GTK_CONTAINER (alignment), hbox); gtk_table_attach_defaults (GTK_TABLE (table), alignment, 1, 2, row, row+1); gtk_widget_show (qstat_srcport_entry_low); gtk_widget_show (label); gtk_widget_show (qstat_srcport_entry_high); gtk_widget_show (alignment); gtk_widget_show (hbox); ++row; } gtk_widget_show (table); gtk_widget_show (frame); gtk_widget_show (page_vbox); return page_vbox; } static void play_sound_pref (GtkWidget *sound_entry) { const char* file = gtk_entry_get_text (GTK_ENTRY (sound_entry)); const char* player = gtk_entry_get_text (GTK_ENTRY (sound_player_entry)); play_sound_with (player, file, 1); } // create a button with label "Test", set padding to make it look nice static inline GtkWidget* sound_test_button_new() { // Translator: sound test button GtkWidget* button = gtk_button_new_with_label (_("Test")); gtk_misc_set_padding(GTK_MISC(GTK_BIN(button)->child),4,0); return button; } static GtkWidget *sound_options_page (void) { GtkWidget *page_vbox; GtkWidget *frame; GtkWidget *table; GtkWidget *label; page_vbox = gtk_vbox_new (FALSE, 4); gtk_container_set_border_width (GTK_CONTAINER (page_vbox), 8); /* Sound Enable / Disable frame */ /* Sounds Enable / Disable */ frame = gtk_frame_new (_("Sound Enable / Disable")); gtk_box_pack_start (GTK_BOX (page_vbox), frame, FALSE, FALSE, 0); table = gtk_table_new (2, 3, FALSE); gtk_table_set_row_spacings (GTK_TABLE (table), 2); gtk_table_set_col_spacings (GTK_TABLE (table), 4); gtk_container_set_border_width (GTK_CONTAINER (table), 6); gtk_container_add (GTK_CONTAINER (frame), table); gtk_widget_show (table); /* Sound Enable */ sound_enable_check_button = gtk_check_button_new_with_label (_("Enable Sound")); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (sound_enable_check_button), sound_enable); gtk_signal_connect (GTK_OBJECT (sound_enable_check_button), "toggled", GTK_SIGNAL_FUNC (sound_enable_toggled_callback), NULL); gtk_table_attach (GTK_TABLE (table), sound_enable_check_button, 0, 1, 0, 1, GTK_FILL, GTK_FILL, 0, 0); gtk_widget_show (sound_enable_check_button); /* Sound Player */ label = gtk_label_new (_("Player program")); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_table_attach (GTK_TABLE (table), label, 0, 1, 1, 2, GTK_FILL, GTK_FILL, 0, 0); gtk_widget_show (label); sound_player_entry = gtk_entry_new (); if(sound_player) { gtk_entry_set_text (GTK_ENTRY (sound_player_entry), sound_player); gtk_entry_set_position (GTK_ENTRY (sound_player_entry), 0); } gtk_table_attach_defaults (GTK_TABLE (table), sound_player_entry, 1, 2, 1, 2); gtk_widget_show (sound_player_entry); // File selection dialog sound_player_file_dialog_button = gtk_button_new_with_label ("..."); gtk_signal_connect_object (GTK_OBJECT (sound_player_file_dialog_button), "clicked", GTK_SIGNAL_FUNC (sound_player_file_dialog), NULL); gtk_table_attach (GTK_TABLE (table), sound_player_file_dialog_button, 2, 3, 1, 2, 0, 0, 0, 0); gtk_widget_show (sound_player_file_dialog_button); gtk_widget_show (frame); /* Sound Files frame */ /* Sounds preferences -- player and various sounds */ frame = gtk_frame_new (_("Sound Files")); gtk_box_pack_start (GTK_BOX (page_vbox), frame, FALSE, FALSE, 0); table = gtk_table_new (2, 3, FALSE); gtk_table_set_row_spacings (GTK_TABLE (table), 2); gtk_table_set_col_spacings (GTK_TABLE (table), 4); gtk_container_set_border_width (GTK_CONTAINER (table), 6); gtk_container_add (GTK_CONTAINER (frame), table); /* Sound XQF Start */ label = gtk_label_new (_("XQF Start")); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1, GTK_FILL, GTK_FILL, 0, 0); gtk_widget_show (label); sound_xqf_start_entry = gtk_entry_new (); if(sound_xqf_start) { gtk_entry_set_text (GTK_ENTRY (sound_xqf_start_entry), sound_xqf_start); gtk_entry_set_position (GTK_ENTRY (sound_xqf_start_entry), 0); } gtk_table_attach_defaults (GTK_TABLE (table), sound_xqf_start_entry, 1, 2, 0, 1); gtk_widget_show (sound_xqf_start_entry); // File selection dialog sound_xqf_start_file_dialog_button = gtk_button_new_with_label ("..."); gtk_signal_connect_object (GTK_OBJECT (sound_xqf_start_file_dialog_button), "clicked", GTK_SIGNAL_FUNC (sound_xqf_start_file_dialog), NULL); gtk_table_attach (GTK_TABLE (table), sound_xqf_start_file_dialog_button, 2, 3, 0, 1, 0, 0, 0, 0); gtk_widget_show (sound_xqf_start_file_dialog_button); // Test button sound_xqf_start_file_test_button = sound_test_button_new(); gtk_signal_connect_object (GTK_OBJECT (sound_xqf_start_file_test_button), "clicked", GTK_SIGNAL_FUNC (play_sound_pref), (gpointer)sound_xqf_start_entry); gtk_table_attach (GTK_TABLE (table), sound_xqf_start_file_test_button, 3, 4, 0, 1, 0, 0, 0, 0); gtk_widget_show (sound_xqf_start_file_test_button); /* Sound XQF Quit */ label = gtk_label_new (_("XQF Quit")); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_table_attach (GTK_TABLE (table), label, 0, 1, 1, 2, GTK_FILL, GTK_FILL, 0, 0); gtk_widget_show (label); sound_xqf_quit_entry = gtk_entry_new (); if(sound_xqf_quit) { gtk_entry_set_text (GTK_ENTRY (sound_xqf_quit_entry), sound_xqf_quit); gtk_entry_set_position (GTK_ENTRY (sound_xqf_quit_entry), 0); } gtk_table_attach_defaults (GTK_TABLE (table), sound_xqf_quit_entry, 1, 2, 1, 2); gtk_widget_show (sound_xqf_quit_entry); // File selection dialog sound_xqf_quit_file_dialog_button = gtk_button_new_with_label ("..."); gtk_signal_connect_object (GTK_OBJECT (sound_xqf_quit_file_dialog_button), "clicked", GTK_SIGNAL_FUNC (sound_xqf_quit_file_dialog), NULL); gtk_table_attach (GTK_TABLE (table), sound_xqf_quit_file_dialog_button, 2, 3, 1, 2, 0, 0, 0, 0); gtk_widget_show (sound_xqf_quit_file_dialog_button); // Test button sound_xqf_quit_file_test_button = sound_test_button_new(); gtk_signal_connect_object (GTK_OBJECT (sound_xqf_quit_file_test_button), "clicked", GTK_SIGNAL_FUNC (play_sound_pref), (gpointer)sound_xqf_quit_entry); gtk_table_attach (GTK_TABLE (table), sound_xqf_quit_file_test_button, 3, 4, 1, 2, 0, 0, 0, 0); gtk_widget_show (sound_xqf_quit_file_test_button); /* Sound Update Done */ label = gtk_label_new (_("Update Done")); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_table_attach (GTK_TABLE (table), label, 0, 1, 2, 3, GTK_FILL, GTK_FILL, 0, 0); gtk_widget_show (label); sound_update_done_entry = gtk_entry_new (); if(sound_update_done) { gtk_entry_set_text (GTK_ENTRY (sound_update_done_entry), sound_update_done); gtk_entry_set_position (GTK_ENTRY (sound_update_done_entry), 0); } gtk_table_attach_defaults (GTK_TABLE (table), sound_update_done_entry, 1, 2, 2, 3); gtk_widget_show (sound_update_done_entry); // File selection dialog sound_update_done_file_dialog_button = gtk_button_new_with_label ("..."); gtk_signal_connect_object (GTK_OBJECT (sound_update_done_file_dialog_button), "clicked", GTK_SIGNAL_FUNC (sound_update_done_file_dialog), NULL); gtk_table_attach (GTK_TABLE (table), sound_update_done_file_dialog_button, 2, 3, 2, 3, 0, 0, 0, 0); gtk_widget_show (sound_update_done_file_dialog_button); // Test button sound_update_done_file_test_button = sound_test_button_new(); gtk_signal_connect_object (GTK_OBJECT (sound_update_done_file_test_button), "clicked", GTK_SIGNAL_FUNC (play_sound_pref), (gpointer)sound_update_done_entry); gtk_table_attach (GTK_TABLE (table), sound_update_done_file_test_button, 3, 4, 2, 3, 0, 0, 0, 0); gtk_widget_show (sound_update_done_file_test_button); /* Sound Refresh Done */ label = gtk_label_new (_("Refresh Done")); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_table_attach (GTK_TABLE (table), label, 0, 1, 3, 4, GTK_FILL, GTK_FILL, 0, 0); gtk_widget_show (label); sound_refresh_done_entry = gtk_entry_new (); if(sound_refresh_done) { gtk_entry_set_text (GTK_ENTRY (sound_refresh_done_entry), sound_refresh_done); gtk_entry_set_position (GTK_ENTRY (sound_refresh_done_entry), 0); } gtk_table_attach_defaults (GTK_TABLE (table), sound_refresh_done_entry, 1, 2, 3, 4); gtk_widget_show (sound_refresh_done_entry); // File selection dialog sound_refresh_done_file_dialog_button = gtk_button_new_with_label ("..."); gtk_signal_connect_object (GTK_OBJECT (sound_refresh_done_file_dialog_button), "clicked", GTK_SIGNAL_FUNC (sound_refresh_done_file_dialog), NULL); gtk_table_attach (GTK_TABLE (table), sound_refresh_done_file_dialog_button, 2, 3, 3, 4, 0, 0, 0, 0); gtk_widget_show (sound_refresh_done_file_dialog_button); // Test button sound_refresh_done_file_test_button = sound_test_button_new(); gtk_signal_connect_object (GTK_OBJECT (sound_refresh_done_file_test_button), "clicked", GTK_SIGNAL_FUNC (play_sound_pref), (gpointer)sound_refresh_done_entry); gtk_table_attach (GTK_TABLE (table), sound_refresh_done_file_test_button, 3, 4, 3, 4, 0, 0, 0, 0); gtk_widget_show (sound_refresh_done_file_test_button); /* Sound Stop */ label = gtk_label_new (_("Stop")); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_table_attach (GTK_TABLE (table), label, 0, 1, 4, 5, GTK_FILL, GTK_FILL, 0, 0); gtk_widget_show (label); sound_stop_entry = gtk_entry_new (); if(sound_stop) { gtk_entry_set_text (GTK_ENTRY (sound_stop_entry), sound_stop); gtk_entry_set_position (GTK_ENTRY (sound_stop_entry), 0); } gtk_table_attach_defaults (GTK_TABLE (table), sound_stop_entry, 1, 2, 4, 5); gtk_widget_show (sound_stop_entry); // File selection dialog sound_stop_file_dialog_button = gtk_button_new_with_label ("..."); gtk_signal_connect_object (GTK_OBJECT (sound_stop_file_dialog_button), "clicked", GTK_SIGNAL_FUNC (sound_stop_file_dialog), NULL); gtk_table_attach (GTK_TABLE (table), sound_stop_file_dialog_button, 2, 3, 4, 5, 0, 0, 0, 0); gtk_widget_show (sound_stop_file_dialog_button); // Test button sound_stop_file_test_button = sound_test_button_new(); gtk_signal_connect_object (GTK_OBJECT (sound_stop_file_test_button), "clicked", GTK_SIGNAL_FUNC (play_sound_pref), (gpointer)sound_stop_entry); gtk_table_attach (GTK_TABLE (table), sound_stop_file_test_button, 3, 4, 4, 5, 0, 0, 0, 0); gtk_widget_show (sound_stop_file_test_button); /* Sound Server Connect */ label = gtk_label_new (_("Server Connect")); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_table_attach (GTK_TABLE (table), label, 0, 1, 5, 6, GTK_FILL, GTK_FILL, 0, 0); gtk_widget_show (label); sound_server_connect_entry = gtk_entry_new (); if(sound_server_connect) { gtk_entry_set_text (GTK_ENTRY (sound_server_connect_entry), sound_server_connect); gtk_entry_set_position (GTK_ENTRY (sound_server_connect_entry), 0); } gtk_table_attach_defaults (GTK_TABLE (table), sound_server_connect_entry, 1, 2, 5, 6); gtk_widget_show (sound_server_connect_entry); // File selection dialog sound_server_connect_file_dialog_button = gtk_button_new_with_label ("..."); gtk_signal_connect_object (GTK_OBJECT (sound_server_connect_file_dialog_button), "clicked", GTK_SIGNAL_FUNC (sound_server_connect_file_dialog), NULL); gtk_table_attach (GTK_TABLE (table), sound_server_connect_file_dialog_button, 2, 3, 5, 6, 0, 0, 0, 0); gtk_widget_show (sound_server_connect_file_dialog_button); // Test button sound_server_connect_file_test_button = sound_test_button_new(); gtk_signal_connect_object (GTK_OBJECT (sound_server_connect_file_test_button), "clicked", GTK_SIGNAL_FUNC (play_sound_pref), (gpointer)sound_server_connect_entry); gtk_table_attach (GTK_TABLE (table), sound_server_connect_file_test_button, 3, 4, 5, 6, 0, 0, 0, 0); gtk_widget_show (sound_server_connect_file_test_button); /* Sound Redial Success Start */ label = gtk_label_new (_("Redial Success")); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_table_attach (GTK_TABLE (table), label, 0, 1, 6, 7, GTK_FILL, GTK_FILL, 0, 0); gtk_widget_show (label); sound_redial_success_entry = gtk_entry_new (); if(sound_redial_success) { gtk_entry_set_text (GTK_ENTRY (sound_redial_success_entry), sound_redial_success); gtk_entry_set_position (GTK_ENTRY (sound_redial_success_entry), 0); } gtk_table_attach_defaults (GTK_TABLE (table), sound_redial_success_entry, 1, 2, 6, 7); gtk_widget_show (sound_redial_success_entry); // File selection dialog sound_redial_success_file_dialog_button = gtk_button_new_with_label ("..."); gtk_signal_connect_object (GTK_OBJECT (sound_redial_success_file_dialog_button), "clicked", GTK_SIGNAL_FUNC (sound_redial_success_file_dialog), NULL); gtk_table_attach (GTK_TABLE (table), sound_redial_success_file_dialog_button, 2, 3, 6, 7, 0, 0, 0, 0); gtk_widget_show (sound_redial_success_file_dialog_button); // Test button sound_redial_success_file_test_button = sound_test_button_new(); gtk_signal_connect_object (GTK_OBJECT (sound_redial_success_file_test_button), "clicked", GTK_SIGNAL_FUNC (play_sound_pref), (gpointer)sound_redial_success_entry); gtk_table_attach (GTK_TABLE (table), sound_redial_success_file_test_button, 3, 4, 6, 7, 0, 0, 0, 0); gtk_widget_show (sound_redial_success_file_test_button); /* */ sound_set_widgets_sensitive(sound_enable); gtk_widget_show (table); gtk_widget_show (frame); gtk_widget_show (page_vbox); return page_vbox; } // constructor for generic_prefs static struct generic_prefs* new_generic_prefs (void) { int i; struct generic_prefs* new_genprefs; new_genprefs = g_malloc0 (sizeof (struct generic_prefs) * GAMES_TOTAL); pref_q1_top_color = default_q1_top_color; pref_q1_bottom_color = default_q1_bottom_color; pref_qw_top_color = default_qw_top_color; pref_qw_bottom_color = default_qw_bottom_color; pref_b_switch = default_b_switch; pref_w_switch = default_w_switch; pref_qw_noskins = default_qw_noskins; pref_q2_noskins = default_q2_noskins; pref_qw_skin = g_strdup (default_qw_skin); pref_q2_skin = g_strdup (default_q2_skin); new_genprefs[Q1_SERVER].add_options_to_notebook = add_q1_options_to_notebook; new_genprefs[QW_SERVER].add_options_to_notebook = add_qw_options_to_notebook; new_genprefs[Q2_SERVER].add_options_to_notebook = add_q2_options_to_notebook; new_genprefs[Q3_SERVER].add_options_to_notebook = add_q3_options_to_notebook; new_genprefs[UN_SERVER].add_options_to_notebook = add_un_options_to_notebook; new_genprefs[UT2_SERVER].add_options_to_notebook = add_ut2_options_to_notebook; new_genprefs[WO_SERVER].add_options_to_notebook = add_q3_options_to_notebook; new_genprefs[WOET_SERVER].add_options_to_notebook = add_q3_options_to_notebook; new_genprefs[DOOM3_SERVER].add_options_to_notebook = add_q3_options_to_notebook; new_genprefs[Q4_SERVER].add_options_to_notebook = add_q3_options_to_notebook; new_genprefs[COD_SERVER].add_options_to_notebook = add_q3_options_to_notebook; new_genprefs[JK3_SERVER].add_options_to_notebook = add_q3_options_to_notebook; new_genprefs[SOF2S_SERVER].add_options_to_notebook = add_q3_options_to_notebook; new_genprefs[T2_SERVER].add_options_to_notebook = add_t2_options_to_notebook; new_genprefs[EF_SERVER].add_options_to_notebook = add_q3_options_to_notebook; new_genprefs[NEXUIZ_SERVER].add_options_to_notebook = add_q3_options_to_notebook; new_genprefs[WARSOW_SERVER].add_options_to_notebook = add_q3_options_to_notebook; new_genprefs[TREMULOUS_SERVER].add_options_to_notebook = add_q3_options_to_notebook; for (i = 0; i < GAMES_TOTAL; i++) { new_genprefs[i].pref_dir = g_strdup (games[i].dir); new_genprefs[i].real_dir = g_strdup (games[i].real_dir); g_datalist_init(&new_genprefs[i].games_data); } return new_genprefs; } static void generic_prefs_free(struct generic_prefs* prefs) { int i; if(!prefs) return; g_free(pref_qw_skin); g_free(pref_q2_skin); for (i = 0; i < GAMES_TOTAL; i++) { g_free(prefs[i].pref_dir); g_free(prefs[i].real_dir); g_datalist_clear(&prefs[i].games_data); } g_free(prefs); } void preferences_dialog (int page_num) { GtkWidget *vbox; GtkWidget *hbox; GtkWidget *label; GtkWidget *page; GtkWidget *button; GtkWidget *window; int game_num; int i; debug (5, "preferences_dialog()"); game_num = page_num / 256; page_num = page_num % 256; genprefs = new_generic_prefs (); window = dialog_create_modal_transient_window ( _("XQF: Preferences"), TRUE, FALSE, NULL); if (!GTK_WIDGET_REALIZED (window)) gtk_widget_realize (window); allocate_quake_player_colors (window->window); vbox = gtk_vbox_new (FALSE, 8); gtk_container_set_border_width (GTK_CONTAINER (vbox), 8); gtk_container_add (GTK_CONTAINER (window), vbox); /* * Notebook */ pref_notebook = gtk_notebook_new (); gtk_notebook_set_tab_pos (GTK_NOTEBOOK (pref_notebook), GTK_POS_TOP); gtk_notebook_set_tab_hborder (GTK_NOTEBOOK (pref_notebook), 4); gtk_box_pack_start (GTK_BOX (vbox), pref_notebook, FALSE, FALSE, 0); page = general_options_page (); label = gtk_label_new (_("General")); gtk_widget_show (label); gtk_notebook_append_page (GTK_NOTEBOOK (pref_notebook), page, label); /* page = player_profile_page (); label = gtk_label_new (_("Player Profile")); gtk_widget_show (label); gtk_notebook_append_page (GTK_NOTEBOOK (pref_notebook), page, label); */ page = games_config_page (game_num); label = gtk_label_new (_("Games")); gtk_widget_show (label); gtk_notebook_append_page (GTK_NOTEBOOK (pref_notebook), page, label); page = appearance_options_page (); label = gtk_label_new (_("Appearance")); gtk_widget_show (label); gtk_notebook_append_page (GTK_NOTEBOOK (pref_notebook), page, label); page = qstat_options_page (); label = gtk_label_new (_("QStat")); gtk_widget_show (label); gtk_notebook_append_page (GTK_NOTEBOOK (pref_notebook), page, label); page = sound_options_page (); label = gtk_label_new (_("Sounds")); gtk_widget_show (label); gtk_notebook_append_page (GTK_NOTEBOOK (pref_notebook), page, label); page = scripts_config_page (); label = gtk_label_new (_("Scripts")); gtk_widget_show (label); gtk_notebook_append_page (GTK_NOTEBOOK (pref_notebook), page, label); gtk_notebook_set_page (GTK_NOTEBOOK (pref_notebook), page_num); /* Initialize skins and custom cfgs */ q1_skin_is_valid = TRUE; update_q1_skin (); qw_skin_is_valid = TRUE; update_qw_skins (pref_qw_skin); q2_skin_is_valid = TRUE; update_q2_skins (pref_q2_skin); for (i = 0; i < GAMES_TOTAL; i++) { update_cfgs (i, genprefs[i].real_dir, games[i].game_cfg); } gtk_widget_show (pref_notebook); /* * Buttons at the bottom */ hbox = gtk_hbox_new (FALSE, 8); gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0); button = gtk_button_new_with_label (_("Cancel")); gtk_widget_set_usize (button, 80, -1); gtk_signal_connect_object (GTK_OBJECT (button), "clicked", GTK_SIGNAL_FUNC (gtk_widget_destroy), GTK_OBJECT (window)); gtk_box_pack_end (GTK_BOX (hbox), button, FALSE, FALSE, 0); GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); gtk_widget_show (button); button = gtk_button_new_with_label (_("OK")); gtk_widget_set_usize (button, 80, -1); gtk_signal_connect (GTK_OBJECT (button), "clicked", GTK_SIGNAL_FUNC (ok_callback), GTK_OBJECT(window)); gtk_box_pack_end (GTK_BOX (hbox), button, FALSE, FALSE, 0); GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); gtk_widget_grab_default (button); gtk_widget_show (button); gtk_widget_show (hbox); gtk_widget_show (vbox); gtk_widget_show (window); gtk_main (); unregister_window (window); /* clean up */ generic_prefs_free(genprefs); genprefs=NULL; if (color_menu) { gtk_widget_destroy (color_menu); color_menu = NULL; } qw_skin_preview = NULL; q2_skin_preview = NULL; if(q1_skin_data) { g_free(q1_skin_data); q1_skin_data=NULL; } if (qw_skin_data) { g_free (qw_skin_data); qw_skin_data = NULL; } if (q2_skin_data) { g_free (q2_skin_data); q2_skin_data = NULL; } } // set some defaults when xqf is called the first time static void user_fix_defaults (void) { char** files = NULL; char* suggested_file = NULL; char* guessed_dir = NULL; char str[256]; int i; int j = 0; debug(1, "Setting defaults"); for (i = 0; i < GAMES_TOTAL; i++) { files = games[i].command; if(!files) continue; suggested_file = find_file_in_path_list_relative(files); if(!suggested_file) continue; j++; g_snprintf (str, 256, "/" CONFIG_FILE "/Game: %s/cmd", type2id (games[i].type)); config_set_string (str, suggested_file); debug(1,"set command %s for %s",suggested_file,games[i].name); guessed_dir = resolve_path(suggested_file); if(!guessed_dir) continue; g_snprintf (str, 256, "/" CONFIG_FILE "/Game: %s/dir", type2id (games[i].type)); config_set_string (str, guessed_dir); debug(1,"set command %s for %s",guessed_dir,games[i].name); } if (j) { config_set_string ("/" CONFIG_FILE "/Appearance/show only configured games","true"); debug(2,"%d games found, set 'show only configured games' to true", j); } config_set_string ("/" CONFIG_FILE "/Games Config/player name", g_get_user_name ()); } int fix_qw_player_color (int color) { color = color % 16; if (color > 13) color = 13; return color; } int init_user_info (void) { if (!g_get_user_name () || !g_get_home_dir () || !g_get_tmp_dir ()) { xqf_error(_("Unable to get user name/home/tmpdir")); return FALSE; } user_rcdir = file_in_dir (g_get_home_dir (), RC_DIR); return TRUE; } void free_user_info (void) { if (user_rcdir) { g_free (user_rcdir); user_rcdir = NULL; } } #ifdef USE_GTK2 #define XQF_GTKRCNAME "gtkrc-2.0" #else #define XQF_GTKRCNAME "gtkrc" #endif static void set_style() { char path[PATH_MAX]; int deflt = 0; use_custom_gtkrc = config_get_bool_with_default("use custom gtkrc=true", &deflt); #ifndef USE_GTK2 if(use_custom_gtkrc) { GtkStyle* style; GtkWidget* w; w = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_widget_realize(w); style = gtk_widget_get_style(w); if(!style->engine) { gtk_rc_parse_string("style \"default\" { engine \"raleigh\" { } }"); } /* user did not specify whether he wants custom colors but since there is * an engine connected he probably already has a custom gtkrc. Don't apply * custom colors in this case */ else if(deflt) { use_custom_gtkrc = FALSE; } gtk_widget_destroy(w); } #else /** do not apply custom colors in GTK2 by default */ if(deflt) use_custom_gtkrc = FALSE; #endif if(use_custom_gtkrc) { if(default_icontheme) { snprintf(path, sizeof(path), "%s/%s/" XQF_GTKRCNAME, default_icontheme, xqf_PACKAGE_DATA_DIR); if(access(path, R_OK) != 0) path[0] = '\0'; } else path[0] = '\0'; if(!*path) snprintf(path, sizeof(path), "%s/default/" XQF_GTKRCNAME, xqf_PACKAGE_DATA_DIR); if(access(path, R_OK) == 0) gtk_rc_parse(path); } } static void prefs_load_for_game(enum server_type type) { char buf[256]; struct game *g = &games[type]; if(!g->prefs_load) return; g_snprintf (buf, sizeof(buf), "/" CONFIG_FILE "/Game: %s", type2id (type)); config_push_prefix (buf); g->prefs_load(g); config_pop_prefix (); } void q1_prefs_load(struct game* g) { default_q1_name = config_get_string ("player name"); default_q1_top_color = config_get_int ("top=0"); default_q1_bottom_color = config_get_int ("bottom=0"); } void qw_prefs_load(struct game* g) { default_qw_name = config_get_string ("player name"); default_qw_team = config_get_string ("team"); default_qw_skin = config_get_string ("skin"); default_qw_top_color = config_get_int ("top=0"); default_qw_bottom_color = config_get_int ("bottom=0"); default_qw_rate = config_get_int ("rate=2500"); default_qw_cl_nodelta = config_get_int ("cl_nodelta=0"); default_qw_cl_predict = config_get_int ("cl_predict=1"); default_qw_noskins = config_get_int ("noskins=0"); default_noaim = config_get_int ("noaim=0"); default_b_switch = config_get_int ("b_switch=0"); default_w_switch = config_get_int ("w_switch=0"); pushlatency_mode = config_get_int ("pushlatency mode=1"); pushlatency_value = config_get_int ("pushlatency value=-50"); } void q2_prefs_load(struct game* g) { default_q2_name = config_get_string ("player name"); default_q2_skin = config_get_string ("skin"); default_q2_rate = config_get_int ("rate=2500"); default_q2_cl_nodelta = config_get_int ("cl_nodelta=0"); default_q2_cl_predict = config_get_int ("cl_predict=1"); default_q2_noskins = config_get_int ("noskins=0"); } void q3_prefs_load_common(struct game* g) { char* tmp; enum server_type type = g->type; struct q3_common_prefs_s* w; char buf[256]; w = get_pref_widgets_for_game(type); g_return_if_fail(w->defproto != NULL); g_snprintf (buf, sizeof(buf), "protocol=%s", w->defproto); tmp = config_get_string (buf); if ( strlen( tmp ) == 0 ) { g_free(tmp); tmp = NULL; } game_set_attribute(type,"masterprotocol",tmp); if(w->flags & Q3_PREF_SETFS_GAME) game_set_attribute(type,"setfs_game",config_get_string ("setfs_game=true")); if(w->flags & Q3_PREF_PB) game_set_attribute(type,"set_punkbuster",config_get_string ("set_punkbuster=true")); if(w->flags & Q3_PREF_CONSOLE) game_set_attribute(type,"enable_console",config_get_string ("enable_console=true")); } void q3_prefs_load(struct game* g) { enum server_type type = g->type; q3_prefs_load_common(g); game_set_attribute(type,"pass_memory_options",config_get_string("pass_memory_options=false")); game_set_attribute(type,"com_hunkmegs",config_get_string("com_hunkmegs=54")); game_set_attribute(type,"com_zonemegs",config_get_string("com_zonemegs=16")); game_set_attribute(type,"com_soundmegs",config_get_string("com_soundmegs=8")); game_set_attribute(type,"cg_precachedmodels",config_get_string("cg_precachedmodels=3")); } void tribes2_prefs_load(struct game* g) { default_t2_name = config_get_string ("player name"); } int prefs_load (void) { char *oldversion; int i; int old_rc_loaded; int newversion = FALSE; oldversion = config_get_string ("/" CONFIG_FILE "/Program/version"); old_rc_loaded = rc_parse (); if (old_rc_loaded == 0) rc_save (); if (oldversion) { newversion = g_strcasecmp (oldversion, XQF_VERSION); g_free (oldversion); } else { newversion = TRUE; if (old_rc_loaded == -1) user_fix_defaults (); } do { int def = 0; struct rlimit rlim; char* coresize = NULL; if(getrlimit(RLIMIT_CORE, &rlim)) break; coresize = config_get_string_with_default ("/" CONFIG_FILE "/Program/coresize=0",&def); if(def || !coresize) break; if(!strcmp(coresize,"unlimited")) { rlim.rlim_cur = RLIM_INFINITY; } else { char* endptr = NULL; long int size = strtol(coresize,&endptr,10); if(endptr==coresize || size < 0) break; rlim.rlim_cur = size; } if(rlim.rlim_cur > rlim.rlim_max) rlim.rlim_max = rlim.rlim_cur; if(setrlimit(RLIMIT_CORE,&rlim)) xqf_warning("could not set core size %lu: %s",rlim.rlim_cur,strerror(errno)); } while(0); for (i = 0; i < GAMES_TOTAL; i++) prefs_load_for_game (i); config_push_prefix ("/" CONFIG_FILE "/Games Config"); default_nosound = config_get_bool ("nosound=false"); default_nocdaudio = config_get_bool ("nocdaudio=false"); config_pop_prefix (); config_push_prefix ("/" CONFIG_FILE "/Appearance"); show_hostnames = config_get_bool ("show hostnames=true"); show_default_port = config_get_bool ("show default port=true"); serverlist_countbots = config_get_bool ("count bots=true"); default_toolbar_style = config_get_int ("toolbar style=2"); default_toolbar_tips = config_get_bool ("toolbar tips=true"); default_refresh_sorts = config_get_bool ("sort on refresh=true"); default_refresh_on_update = config_get_bool ("refresh on update=true"); default_resolve_on_update = config_get_bool ("resolve on update=false"); default_show_only_configured_games = config_get_bool ("show only configured games=false"); default_icontheme = config_get_string ("icontheme"); set_style(); config_pop_prefix (); config_push_prefix ("/" CONFIG_FILE "/General"); default_terminate = config_get_bool ("terminate=false"); default_iconify = config_get_bool ("iconify=false"); default_launchinfo = config_get_bool ("launchinfo=true"); default_stopxmms = config_get_bool ("stopxmms=false"); default_prelaunchexec = config_get_bool ("prelaunchexec=false"); default_save_lists = config_get_bool ("save lists=true"); default_save_srvinfo = config_get_bool ("save srvinfo=true"); default_save_plrinfo = config_get_bool ("save players=false"); default_auto_favorites = config_get_bool ("refresh favorites=false"); default_show_splash = config_get_bool ("splash screen=true"); default_auto_maps = config_get_bool ("search maps=false"); default_show_tray_icon = config_get_bool ("showtray=false"); config_pop_prefix (); config_push_prefix ("/" CONFIG_FILE "/QStat"); maxretries = config_get_int ("maxretires=3"); maxsimultaneous = config_get_int ("maxsimultaneous=20"); qstat_srcport_low = config_get_int ("port_low=0"); qstat_srcport_high = config_get_int ("port_high=0"); qstat_srcport_changed = FALSE; qstat_srcip = config_get_string ("srcip"); qstat_srcip_changed = FALSE; config_pop_prefix (); config_push_prefix ("/" CONFIG_FILE "/Sounds"); sound_enable = config_get_bool ("sound_enable=false"); sound_player = config_get_string ("sound_player"); sound_xqf_start = config_get_string ("sound_xqf_start"); sound_xqf_quit = config_get_string ("sound_xqf_quit"); sound_update_done = config_get_string ("sound_update_done"); sound_refresh_done = config_get_string ("sound_refresh_done"); sound_stop = config_get_string ("sound_stop"); sound_server_connect = config_get_string ("sound_server_connect"); sound_redial_success = config_get_string ("sound_redial_success"); config_pop_prefix (); config_set_string ("/" CONFIG_FILE "/Program/version", XQF_VERSION); config_sync (); #ifdef DEBUG fprintf (stderr, "prefs_load(): program version %s\n", (newversion)? "changed" : "not changed"); #endif create_splashscreen (); /* Convert "dir" -> "real_dir" for all game types */ for (i = 0; i < GAMES_TOTAL; i++) { load_game_defaults (i); if(default_auto_maps && !skip_startup_mapscan) scan_maps_for(i); if(games[i].cmd_or_dir_changed) games[i].cmd_or_dir_changed(&games[i]); } return newversion; } static void scan_maps_for(enum server_type type) { // translator: %s = game name, e.g. Quake 3 Arena char* msg = g_strdup_printf(_("Searching for %s maps"),games[type].name); guint per = 100/GAMES_TOTAL; splash_increase_progress(msg,per); if(games[type].init_maps) { games[type].init_maps(games[type].type); } g_free(msg); } /* void prefs_save (void) { config_push_prefix ("/" CONFIG_FILE "/Preferences"); config_set_bool ("show hostnames", show_hostnames); config_set_bool ("show default port", show_default_port); config_pop_prefix (); config_sync (); } */ void game_file_dialog_ok_callback (GtkWidget *ok_button, gpointer data) { enum server_type type; const char *filename = NULL; GtkWidget* filesel = topmost_parent(ok_button); if(!filesel) return; type = (enum server_type) GPOINTER_TO_INT(data); if(type >= UNKNOWN_SERVER) return; filename = gtk_file_selection_get_filename (GTK_FILE_SELECTION (filesel)); if (filename) { gtk_entry_set_text (GTK_ENTRY (genprefs[type].cmd_entry), filename); pref_guess_dir (type, filename, TRUE); } } void game_file_activate_callback (enum server_type type) { const char* file = gtk_entry_get_text (GTK_ENTRY (genprefs[type].cmd_entry)); pref_guess_dir (type, file, TRUE); } void game_file_dialog(enum server_type type) { file_dialog(_("Game Command Selection"), GTK_SIGNAL_FUNC(game_file_dialog_ok_callback), GINT_TO_POINTER(type)); } void game_dir_dialog(enum server_type type) { if(type >= UNKNOWN_SERVER) return; file_dialog_textentry(_("Game Directory Selection"), genprefs[type].dir_entry); } void sound_player_file_dialog() { file_dialog_textentry(_("Sound Player Selection"), sound_player_entry); } void sound_xqf_start_file_dialog() { file_dialog_textentry(_("XQF Start Sound Selection"), sound_xqf_start_entry); } void sound_xqf_quit_file_dialog() { file_dialog_textentry(_("XQF Quit Sound Selection"), sound_xqf_quit_entry); } void sound_update_done_file_dialog() { file_dialog_textentry(_("Update Done Sound Selection"), sound_update_done_entry); } void sound_refresh_done_file_dialog() { file_dialog_textentry(_("Refresh Done Sound Selection"), sound_refresh_done_entry); } void sound_stop_file_dialog() { file_dialog_textentry(_("Stop Sound Selection"), sound_stop_entry); } void sound_server_connect_file_dialog() { file_dialog_textentry(_("Server Connect Sound Selection"), sound_server_connect_entry); } void sound_redial_success_file_dialog() { file_dialog_textentry(_("Redial Success Sound Selection"), sound_redial_success_entry); } /* void file_dialog_destroy_callback (GtkWidget *widget, gpointer data) { } */ void q1_cmd_or_dir_changed(struct game* g) { update_q1_skin(); } void qw_cmd_or_dir_changed(struct game* g) { update_qw_skins (NULL); } void q2_cmd_or_dir_changed(struct game* g) { update_q2_skins (NULL); } void ut2004_cmd_or_dir_changed(struct game* g) { ut2004_detect_cdkey(g); } void doom3_cmd_or_dir_changed(struct game* g) { doom3_detect_version(g); } void tremulous_cmd_or_dir_changed(struct game* g) { doom3_detect_version(g); } xqf-1.0.5/src/pref.h0000644002404400000620000001015210415666670011136 00000000000000/* XQF - Quake server browser and launcher * Copyright (C) 1998-2000 Roman Pozlevich * * 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 */ #ifndef __PREF_H__ #define __PREF_H__ #include #include "game.h" #ifndef PATH_MAX # ifdef MAXPATHLEN # define PATH_MAX MAXPATHLEN # else # define PATH_MAX 8192 # endif #endif enum { PREF_PAGE_GENERAL = 0, PREF_PAGE_GAMES, PREF_PAGE_APPEARANCE, PREF_PAGE_QSTAT, PREF_PAGE_SOUNDS, PREF_PAGE_SCRIPTS }; extern char *user_rcdir; extern char *default_q1_name; extern char *default_qw_name; extern char *default_q2_name; extern char *default_t2_name; extern char *default_qw_team; extern char *default_qw_skin; extern char *default_q2_skin; extern int default_q1_top_color; extern int default_q1_bottom_color; extern int default_qw_top_color; extern int default_qw_bottom_color; extern int default_qw_rate; extern int default_q2_rate; extern int default_qw_cl_nodelta; extern int default_q2_cl_nodelta; extern int default_qw_cl_predict; extern int default_q2_cl_predict; extern int default_noaim; extern int default_qw_noskins; extern int default_q2_noskins; extern int default_b_switch; extern int default_w_switch; extern int pushlatency_mode; extern int pushlatency_value; extern int default_qw_is_quakeforge; extern int default_nosound; extern int default_nocdaudio; extern int show_hostnames; extern int show_default_port; extern int serverlist_countbots; extern int default_terminate; extern int default_stopxmms; extern int default_iconify; extern int default_launchinfo; extern int default_prelaunchexec; extern int default_save_lists; extern int default_save_srvinfo; extern int default_save_plrinfo; extern int default_auto_favorites; extern int default_show_splash; extern int default_show_tray_icon; extern int default_always_resolve; extern int default_toolbar_style; extern int default_toolbar_tips; extern int default_refresh_sorts; extern int default_refresh_on_update; extern int default_resolve_on_update; extern int default_show_only_configured_games; extern char* default_icontheme; extern int maxretries; extern int maxsimultaneous; extern char* qstat_srcip; extern unsigned short qstat_srcport_low; extern unsigned short qstat_srcport_high; extern int sound_enable; extern char *sound_player; extern char *sound_xqf_start; extern char *sound_xqf_quit; extern char *sound_update_done; extern char *sound_refresh_done; extern char *sound_stop; extern char *sound_server_connect; extern char *sound_redial_success; extern int skip_startup_mapscan; void q1_prefs_load(struct game* g); void qw_prefs_load(struct game* g); void q2_prefs_load(struct game* g); void q3_prefs_load(struct game* g); void q3_prefs_load_common(struct game* g); void tribes2_prefs_load(struct game* g); void q1_update_prefs (struct game* g); void qw_update_prefs (struct game* g); void q2_update_prefs (struct game* g); void q3_update_prefs (struct game* g); void q3_update_prefs_common (struct game* g); void doom3_update_prefs (struct game* g); void quake4_update_prefs (struct game* g); void tremulous_update_prefs (struct game* g); void tribes2_update_prefs (struct game* g); void ut2004_update_prefs (struct game* g); extern int set_working_dir (char *dir); extern void preferences_dialog (int page_num); extern int fix_qw_player_color (int color); extern int init_user_info (void); extern void free_user_info (void); extern int prefs_load (void); #endif /* __PREF_H__ */ xqf-1.0.5/src/test_utils.c0000644002404400000620000001163710047424007012370 00000000000000/* XQF - Quake server browser and launcher * test utility functions * Copyright (C) 2004 Ludwig Nussel * * 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 */ #include "gnuconfig.h" #include #include #include #include #include #include #include #include #include "utils.h" #include "debug.h" #define PRINT(fmt,rest...) \ printf("%s: " fmt "\n", __FUNCTION__, ##rest) #define ERROR(fmt,rest...) \ PRINT(fmt ": %s", ##rest, strerror(errno)) typedef enum { tFile, tSymlink, tDirecory } FileType; typedef struct { FileType type; char name[PATH_MAX]; } File; enum { MaxFiles = 255 }; static File* tempfiles[MaxFiles] = {0}; static int currentFile = 0; #define BASEDIR "/tmp/xqf_test_util/" static void popFile(int nr) { for( ; nr > 0 && currentFile > 0 ; --nr) { File* entry = tempfiles[--currentFile]; if(!entry) continue; switch(entry->type) { case tFile: case tSymlink: if(unlink(entry->name) == -1) { ERROR("unlink %s", entry->name); } break; case tDirecory: if(rmdir(entry->name) == -1) { ERROR("rmdir %s", entry->name); } break; } g_free(entry); } if(currentFile < 0) currentFile = 0; } static void cleanup() { popFile(currentFile); } static const char* newFile(FileType type, const char* name) { File* f = NULL; if(currentFile >= MaxFiles) exit(1); f = tempfiles[currentFile] = g_malloc0(sizeof(File)); f->type = type; strcpy(f->name, BASEDIR); strcat(f->name, name); ++currentFile; return f->name; } static void doMkdir(const char* dir) { dir = newFile(tDirecory, dir); if(mkdir(dir, 0755) == -1) { ERROR("mkdir %s", dir); exit(1); } } static void doSymlink(const char* oldpath, const char* newpath) { newpath = newFile(tSymlink, newpath); if(symlink(oldpath, newpath) == -1) { ERROR("symlink %s -> %s", newpath, oldpath); exit(1); } } static void doFile(const char* name) { int fd = -1; name = newFile(tFile, name); if((fd = open(name, O_CREAT|O_EXCL|O_RDWR, 0755)) == -1) { ERROR("open %s", name); exit(1); } close(fd); } void test_find_game_dir() { const char* targets[] = { "westernq3", "WESTERNQ3", "triBALctf", "Q3UT2", "Q3UT3", "ABC", NULL }; char* result = NULL; int type = 0; int i = 0; doMkdir("westernq3"); doMkdir("WESTERNQ3"); doMkdir("tribalctf"); doMkdir("q3ut3"); doSymlink("q3ut2", "Q3UT2"); doSymlink("q3ut3", "Q3UT3"); for(; targets[i]; ++i) { result = find_game_dir(BASEDIR, targets[i], &type); PRINT("search %s, result %s, type %d", targets[i], result, type); g_free(result); } popFile(6); } void test_file_in_dir() { const char* dirs[] = { "/a", "b", "/a/", "b", "/a", "", "/a/", "", "/a", NULL, "/a/", NULL, "", "b", "/", "b", NULL, "b", NULL, NULL, }; int i = 0; for(; dirs[i] || dirs[i+1]; i+=2) { char* dir = file_in_dir(dirs[i], dirs[i+1]); PRINT("'%s' + '%s' = '%s'", dirs[i], dirs[i+1], dir); g_free(dir); } } void test_resolve_path() { char buf[PATH_MAX] = {0}; char* oldpath = NULL; const char* files[] = { "binarypath", // binary in $PATH "relative", // relative symlink "absolute", // absolute symlink "noexist", // not existing BASEDIR "bin/binarypath", BASEDIR "bin/relative", BASEDIR "bin/absolute", BASEDIR "bin/noexist", BASEDIR "game/binary", "~/bin/bla", "~/bin/q3", NULL }; int i = 0; doMkdir("game"); doMkdir("bin"); doFile("game/binary"); doFile("bin/binarypath"); doSymlink("../game/binary", "bin/relative"); doSymlink(BASEDIR "game/binary", "bin/absolute"); oldpath = getenv("PATH"); if(!oldpath) exit(1); snprintf(buf, sizeof(buf), "%s%s:%s", BASEDIR, "bin", oldpath); setenv("PATH", buf, 1); for(; files[i]; ++i) { char* path = resolve_path(files[i]); PRINT("'%s' -> '%s'", files[i], path); g_free(path); } setenv("PATH", oldpath, 1); } int main (int argc, char* argv[]) { atexit(cleanup); doMkdir(""); set_debug_level(0); test_find_game_dir(); test_file_in_dir(); test_resolve_path(); exit(0); } // vim: sw=4 xqf-1.0.5/src/rcon.c0000644002404400000620000004600110445246347011136 00000000000000/* XQF - Quake server browser and launcher * Copyright (C) 1998-2000 Roman Pozlevich * * 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 */ #include "gnuconfig.h" #include /* socket, send, bind, connect */ #include /* fprintf */ #include /* va_start, va_end */ #include /* socket, send, bind, connect */ #include /* sockaddr_in */ #include #include /* close */ #include /* memset, strcmp */ #include /* errno */ #include /* isprint */ #include // select #ifdef RCON_STANDALONE # ifdef ENABLE_NLS # include # endif #include #include #include #endif #include "i18n.h" #include "xqf.h" #include "utils.h" #ifndef RCON_STANDALONE #include "xqf-ui.h" #include "srv-prop.h" #include "srv-list.h" #include "game.h" #include "dialogs.h" #include "history.h" #include "config.h" #endif #include "rcon.h" enum { PACKET_MAXSIZE = (64 * 1024) }; static int rcon_fd = -1; static char *packet = NULL; static const char* rcon_password = NULL; static char* rcon_challenge = NULL; // halflife challenge static enum server_type rcon_servertype; #ifndef RCON_STANDALONE static struct history *rcon_history = NULL; static GtkWidget *rcon_combo = NULL; static GtkWidget *rcon_text = NULL; #endif static char* msg_terminate (char *msg, int size); static void rcon_print (char *fmt, ...); static int failed (char *name) { fprintf (stderr, "%s() failed: %s\n", name, g_strerror (errno)); rcon_print ("%s() failed: %s\n", name, g_strerror (errno)); return TRUE; } static void rcon_print (char *fmt, ...) { #ifndef RCON_STANDALONE char buf[2048]; va_list ap; if (fmt) { va_start (ap, fmt); g_vsnprintf (buf, sizeof(buf), fmt, ap); va_end (ap); gtk_text_freeze (GTK_TEXT (rcon_text)); gtk_text_insert (GTK_TEXT (rcon_text), NULL, NULL, NULL, buf, -1); gtk_text_thaw (GTK_TEXT (rcon_text)); gtk_adjustment_set_value (GTK_TEXT (rcon_text)->vadj, GTK_TEXT (rcon_text)->vadj->upper - GTK_TEXT (rcon_text)->vadj->page_size); } #endif } static int wait_read_timeout(int fd, long sec, long usec) { fd_set rfds; struct timeval tv; FD_ZERO(&rfds); FD_SET(fd, &rfds); tv.tv_sec = sec; tv.tv_usec = usec; return select(rcon_fd+1, &rfds, NULL, NULL, &tv); } static int open_connection (struct in_addr *ip, unsigned short port) { struct sockaddr_in addr; int fd; int res; if (!ip || !port) return -1; fd = socket (PF_INET, SOCK_DGRAM, 0); if (fd < 0) { failed ("socket"); return -1; } addr.sin_family = AF_INET; addr.sin_port = g_htons (0); addr.sin_addr.s_addr = g_htonl (INADDR_ANY); memset (&addr.sin_zero, 0, sizeof (addr.sin_zero)); res = bind (fd, (struct sockaddr *) &addr, sizeof (addr)); if (res < 0) { failed ("bind"); close (fd); return -1; } addr.sin_family = AF_INET; addr.sin_port = htons(port); addr.sin_addr.s_addr = ip->s_addr; memset (&addr.sin_zero, 0, sizeof (addr.sin_zero)); res = connect (fd, (struct sockaddr *) &addr, sizeof (addr)); if (res < 0) { failed ("connect"); close (fd); return -1; } return fd; } static int rcon_send(const char* cmd) { char* buf = NULL; size_t bufsize = 0; int ret = -1; if(rcon_servertype == HL_SERVER && rcon_challenge == NULL) { enum { cbufsize = 1024 }; char cbuf[cbufsize]; char* msg = NULL; char* mustresponse = "\377\377\377\377challenge rcon "; int size; buf = "\377\377\377\377challenge rcon"; bufsize = strlen(buf)+1; send (rcon_fd, buf, bufsize, 0); if (wait_read_timeout(rcon_fd, 5, 0) <= 0) { rcon_print ("*** timeout waiting for challenge\n"); errno = ETIMEDOUT; return -1; } size = recv (rcon_fd, cbuf, cbufsize, 0); if(size < 0) { rcon_print ("*** error in challenge response\n"); return -1; } msg = msg_terminate(cbuf, size); if(strlen(msg) < strlen(mustresponse) || strncmp(msg,mustresponse,strlen(mustresponse))) { rcon_print ("*** error in challenge response\n"); return -1; } rcon_challenge = g_strstrip(msg+strlen(mustresponse)); } if(rcon_servertype == HL_SERVER) { if(!rcon_challenge || !*rcon_challenge) { rcon_print ("*** invalid challenge\n"); return -1; } buf = g_strdup_printf("\377\377\377\377rcon %s %s %s",rcon_challenge, rcon_password, cmd); bufsize = strlen(buf)+1; } else if (rcon_servertype == DOOM3_SERVER || rcon_servertype == Q4_SERVER) { const char prefix[] = "\377\377rcon"; bufsize = sizeof(prefix) +strlen(rcon_password) +1 +strlen(cmd) +1; buf = g_new0(char, bufsize); strcpy(buf, prefix); strcpy(buf+sizeof(prefix), rcon_password); strcpy(buf+sizeof(prefix)+strlen(rcon_password)+1, cmd); } else { buf = g_strdup_printf("\377\377\377\377rcon %s %s",rcon_password, cmd); bufsize = strlen(buf)+1; } rcon_print ("RCON> %s\n", cmd); ret = send (rcon_fd, buf, bufsize, 0); g_free(buf); return ret; } #ifndef RCON_STANDALONE static void rcon_combo_activate_callback (GtkWidget *widget, gpointer data) { char *cmd; int res; cmd = strdup_strip ( gtk_entry_get_text (GTK_ENTRY (GTK_COMBO (rcon_combo)->entry))); if (cmd) { res = rcon_send(cmd); if (res < 0) { failed("send"); } history_add (rcon_history, cmd); combo_set_vals (rcon_combo, rcon_history->items, ""); g_free (cmd); } else { gtk_entry_set_text (GTK_ENTRY (GTK_COMBO (rcon_combo)->entry), ""); } } #endif /** ensure msg is terminated by \n\0. return string that fullfilles this criteria. returned string must be freed afterwards */ static char* msg_terminate (char *msg, int size) { char *newmsg = NULL; int newsize = size; enum { nothing = 0, append_0 = 1, append_nl = 2 } what = nothing; if (!msg || size <= 0) return g_strdup("\n"); if(size == 1) { if(msg[0] != '\0') what |= append_0; if(msg[0] != '\n') what |= append_nl; } else if(msg[size-1] != '\0') { // not null terminated, check for newline if(msg[size-1] != '\n') what |= append_nl; what |= append_0; } else if(msg[size-2] != '\n') { // null terminated but no newline what |= append_nl; } if( what & append_0 ) newsize++; if( what & append_nl ) newsize++; newmsg = (char*)g_malloc(newsize); newmsg = strncpy(newmsg,msg,size); if((what & append_0) || (what & append_nl) ) { newmsg[newsize-1] = '\0'; } if( what & append_nl ) { newmsg[newsize-2] = '\n'; } return newmsg; } static char* rcon_receive() { char *msg = "\n"; ssize_t t; ssize_t size; if (!packet) packet = g_malloc (PACKET_MAXSIZE); size = recv (rcon_fd, packet, PACKET_MAXSIZE, 0); if (size < 0) { if(errno != EWOULDBLOCK) failed("recv"); } else { switch (rcon_servertype) { case QW_SERVER: case HW_SERVER: case HL_SERVER: // "\377\377\377\377" msg = packet + 4 + 1; size = size - 4 - 1; for(t = 0; t < size && msg[t]; t++) // filter QW KTPRO status list { if((unsigned char)msg[t] == 141) msg[t] = '>'; msg[t]&=0x7f; if(msg[t] < 32) { if(msg[t] >= 0x12 && msg[t] <= 0x12 + 9) msg[t]+='0' - 0x12; // yellow numbers else if(msg[t] == 16) msg[t] = '['; else if(msg[t] == 17) msg[t] = ']'; else if(msg[t] != '\n' && msg[t] != '\r') msg[t] = '.'; // unprintable } } break; case DOOM3_SERVER: case Q4_SERVER: // "\377\377print\0????\0" if(size > 2+6+4+1) { char* ptr = msg = packet+2+6+4; while(ptr && ptr < packet + size - 1) { if(*ptr == '\n' || isprint(*ptr)) ++ptr; else { *ptr = '.'; ++ptr; } } } break; /* Q2, Q3 */ default: // "\377\377\377\377print\n" msg = packet + 4 + 6; size = size - 4 - 6; break; } msg = msg_terminate (msg, size); } return msg; } #ifndef RCON_STANDALONE static void rcon_input_callback (gpointer data, int fd, GdkInputCondition condition) { char* msg = rcon_receive(); gtk_text_freeze (GTK_TEXT (rcon_text)); gtk_text_insert (GTK_TEXT (rcon_text), NULL, NULL, NULL, msg, -1); gtk_text_thaw (GTK_TEXT (rcon_text)); gtk_adjustment_set_value (GTK_TEXT (rcon_text)->vadj, GTK_TEXT (rcon_text)->vadj->upper - GTK_TEXT (rcon_text)->vadj->page_size); g_free(msg); } #endif #ifndef RCON_STANDALONE static void rcon_status_button_clicked_callback (GtkWidget *w, gpointer data) { gtk_entry_set_text (GTK_ENTRY (GTK_COMBO (rcon_combo)->entry), "status"); rcon_combo_activate_callback (rcon_combo, data); } #endif #ifndef RCON_STANDALONE static void rcon_clear_button_clicked_callback (GtkWidget *w, gpointer data) { gtk_text_freeze (GTK_TEXT (rcon_text)); gtk_text_set_point (GTK_TEXT (rcon_text), 0); gtk_text_forward_delete (GTK_TEXT (rcon_text), gtk_text_get_length (GTK_TEXT (rcon_text))); gtk_text_thaw (GTK_TEXT (rcon_text)); } #endif #ifndef RCON_STANDALONE static void rcon_save_geometry (GtkWidget *window, gpointer data) { config_push_prefix ("/" CONFIG_FILE "/RCON Window Geometry/"); config_set_int ("height", window->allocation.height); config_set_int ("width", window->allocation.width); config_pop_prefix (); } #endif #ifndef RCON_STANDALONE static void rcon_restore_geometry (GtkWidget *window) { char buf[256]; int height, width; config_push_prefix ("/" CONFIG_FILE "/RCON Window Geometry/"); g_snprintf (buf, 256, "height=%d", 400); height = config_get_int (buf); g_snprintf (buf, 256, "width=%d", 460); width = config_get_int (buf); gtk_window_set_default_size (GTK_WINDOW (window), width, height); config_pop_prefix (); } #endif #ifndef RCON_STANDALONE void rcon_dialog (const struct server *s, const char *passwd) { GtkWidget *window; GtkWidget *main_vbox; GtkWidget *vbox; GtkWidget *hbox; GtkWidget *hbox2; GtkWidget *label; GtkWidget *pixmap; GtkWidget *button; GtkWidget *vscrollbar; GtkWidget *hseparator; char srv[256]; char buf[256]; int rcon_tag; if (!s || !passwd) return; if(rcon_challenge) g_free(rcon_challenge); rcon_challenge = NULL; rcon_password = passwd; rcon_servertype = s->type; rcon_fd = open_connection (&s->host->ip, s->port); if (rcon_fd < 0) return; if(set_nonblock(rcon_fd) == -1) failed("fcntl"); assemble_server_address (srv, 256, s); g_snprintf (buf, 256, "Remote Console [%s]", srv); window = dialog_create_modal_transient_window (buf, TRUE, TRUE, GTK_SIGNAL_FUNC(rcon_save_geometry)); gtk_window_set_policy (GTK_WINDOW (window), TRUE, TRUE, TRUE); rcon_restore_geometry (window); main_vbox = gtk_vbox_new (FALSE, 0); gtk_container_add (GTK_CONTAINER (window), main_vbox); vbox = gtk_vbox_new (FALSE, 8); gtk_container_set_border_width (GTK_CONTAINER (vbox), 8); gtk_box_pack_start (GTK_BOX (main_vbox), vbox, TRUE, TRUE, 0); /* Dialog Title */ hbox = gtk_hbox_new (TRUE, 4); gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0); hbox2 = gtk_hbox_new (FALSE, 4); gtk_box_pack_start (GTK_BOX (hbox), hbox2, FALSE, FALSE, 0); if (games[s->type].pix) { pixmap = gtk_pixmap_new (games[s->type].pix->pix, games[s->type].pix->mask); gtk_box_pack_start (GTK_BOX (hbox2), pixmap, FALSE, FALSE, 0); gtk_widget_show (pixmap); } label = gtk_label_new (buf); gtk_box_pack_start (GTK_BOX (hbox2), label, FALSE, FALSE, 0); gtk_widget_show (label); gtk_widget_show (hbox2); gtk_widget_show (hbox); /* Text */ hbox = gtk_hbox_new (FALSE, 0); gtk_box_pack_start (GTK_BOX (vbox), hbox, TRUE, TRUE, 0); rcon_text = gtk_text_new (NULL, NULL); gtk_text_set_editable (GTK_TEXT (rcon_text), FALSE); GTK_WIDGET_UNSET_FLAGS (rcon_text, GTK_CAN_FOCUS); gtk_box_pack_start (GTK_BOX (hbox), rcon_text, TRUE, TRUE, 0); gtk_widget_show (rcon_text); vscrollbar = gtk_vscrollbar_new (GTK_TEXT (rcon_text)->vadj); GTK_WIDGET_UNSET_FLAGS (vscrollbar, GTK_CAN_FOCUS); gtk_box_pack_start (GTK_BOX (hbox), vscrollbar, FALSE, FALSE, 0); gtk_widget_show (vscrollbar); gtk_widget_show (hbox); hbox = gtk_hbox_new (FALSE, 4); gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0); /* Message */ label = gtk_label_new (_("Cmd:")); gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); gtk_widget_show (label); /* Entry */ rcon_combo = gtk_combo_new (); gtk_entry_set_max_length (GTK_ENTRY (GTK_COMBO (rcon_combo)->entry), 256); gtk_combo_set_case_sensitive (GTK_COMBO (rcon_combo), TRUE); gtk_combo_set_use_arrows_always (GTK_COMBO (rcon_combo), TRUE); gtk_combo_disable_activate (GTK_COMBO (rcon_combo)); gtk_signal_connect (GTK_OBJECT (GTK_COMBO (rcon_combo)->entry), "activate", GTK_SIGNAL_FUNC (rcon_combo_activate_callback), NULL); GTK_WIDGET_SET_FLAGS (GTK_COMBO (rcon_combo)->entry, GTK_CAN_FOCUS); GTK_WIDGET_UNSET_FLAGS (GTK_COMBO (rcon_combo)->button, GTK_CAN_FOCUS); gtk_box_pack_start (GTK_BOX (hbox), rcon_combo, TRUE, TRUE, 0); gtk_widget_grab_focus (GTK_COMBO (rcon_combo)->entry); gtk_widget_show (rcon_combo); if (rcon_history->items) combo_set_vals (rcon_combo, rcon_history->items, ""); hbox2 = gtk_hbox_new (FALSE, 2); gtk_box_pack_end (GTK_BOX (hbox), hbox2, FALSE, FALSE, 0); /* Send Button */ button = gtk_button_new_with_label (_("Send")); gtk_signal_connect (GTK_OBJECT (button), "clicked", GTK_SIGNAL_FUNC (rcon_combo_activate_callback), NULL); GTK_WIDGET_UNSET_FLAGS (button, GTK_CAN_FOCUS); gtk_box_pack_start (GTK_BOX (hbox2), button, FALSE, FALSE, 0); gtk_widget_show (button); /* Status Button */ button = gtk_button_new_with_label (_("Status")); gtk_signal_connect (GTK_OBJECT (button), "clicked", GTK_SIGNAL_FUNC (rcon_status_button_clicked_callback), NULL); GTK_WIDGET_UNSET_FLAGS (button, GTK_CAN_FOCUS); gtk_box_pack_start (GTK_BOX (hbox2), button, FALSE, FALSE, 0); gtk_widget_show (button); /* Clear Button */ button = gtk_button_new_with_label (_("Clear")); gtk_signal_connect (GTK_OBJECT (button), "clicked", GTK_SIGNAL_FUNC (rcon_clear_button_clicked_callback), NULL); GTK_WIDGET_UNSET_FLAGS (button, GTK_CAN_FOCUS); gtk_box_pack_start (GTK_BOX (hbox2), button, FALSE, FALSE, 0); gtk_widget_show (button); gtk_widget_show (hbox2); gtk_widget_show (hbox); gtk_widget_show (vbox); hseparator = gtk_hseparator_new (); gtk_box_pack_start (GTK_BOX (main_vbox), hseparator, FALSE, FALSE, 0); gtk_widget_show (hseparator); /* Close Button */ hbox = gtk_hbox_new (FALSE, 8); gtk_container_set_border_width (GTK_CONTAINER (hbox), 8); gtk_box_pack_start (GTK_BOX (main_vbox), hbox, FALSE, FALSE, 0); button = gtk_button_new_with_label (_("Close")); gtk_box_pack_end (GTK_BOX (hbox), button, FALSE, FALSE, 0); gtk_widget_set_usize (button, 80, -1); gtk_signal_connect_object (GTK_OBJECT (button), "clicked", GTK_SIGNAL_FUNC (gtk_widget_destroy), GTK_OBJECT (window)); GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); gtk_widget_grab_default (button); gtk_widget_show (button); gtk_widget_show (hbox); gtk_widget_show (main_vbox); gtk_widget_show (window); rcon_tag = gdk_input_add (rcon_fd, GDK_INPUT_READ, (GdkInputFunction) rcon_input_callback, NULL); gtk_main (); gdk_input_remove (rcon_tag); close (rcon_fd); rcon_fd = -1; if (packet) { g_free (packet); packet = NULL; } g_free(rcon_challenge); rcon_challenge = NULL; unregister_window (window); } #endif void rcon_init (void) { #ifndef RCON_STANDALONE rcon_history = history_new ("RCON"); #endif } void rcon_done (void) { #ifndef RCON_STANDALONE if (rcon_history) { history_free (rcon_history); rcon_history = NULL; } #endif } #ifdef RCON_STANDALONE int main(int argc, char* argv[]) { struct in_addr ip; int argpos = 1; unsigned short port = 0; char* arg_ip = NULL; char* arg_port = NULL; char prompt[] = "RCON> "; char* buf = NULL; int res; #ifdef ENABLE_NLS setlocale(LC_ALL, ""); bindtextdomain(PACKAGE, LOCALEDIR); textdomain(PACKAGE); #endif rcon_servertype = Q3_SERVER; if(argc>1) { if(!strcmp(argv[argpos],"--qws")) { rcon_servertype = QW_SERVER; argpos++; } else if(!strcmp(argv[argpos],"--hls")) { rcon_servertype = HL_SERVER; argpos++; } else if(!strcmp(argv[argpos],"--hws")) { rcon_servertype = HW_SERVER; argpos++; } else if(!strcmp(argv[argpos],"--dm3s")) { rcon_servertype = DOOM3_SERVER; argpos++; } } if( argc-argpos<2 || !strcmp(argv[argpos],"--help")) { printf(_("Usage: %s [server type] \n"),argv[0]); printf(_(" server type is either --qws, --hws, --hls or --dm3s.\n")); printf(_(" If no server type is specified, Q3 style rcon is assumed.\n")); return 1; } arg_ip = argv[argpos++]; arg_port = argv[argpos++]; if(!inet_aton(arg_ip,&ip)) { printf("invalid ip: %s\n",arg_ip); return 1; } if((port = atoi(arg_port)) == 0) { printf("invalid port: %s\n",arg_port); return 1; } rcon_fd = open_connection(&ip,port); if(rcon_fd < 0) { return 1; } if(set_nonblock(rcon_fd) == -1) failed("fcntl"); if(getenv("XQF_RCON_PASSWORD")) { rcon_password = g_strdup(getenv("XQF_RCON_PASSWORD")); } else { while(!buf || !*buf) { // translator: readline prompt buf = readline(_("Password: ")); } rcon_password = g_strdup(buf); } buf = readline(prompt); while(buf) { res = rcon_send(buf); if (res < 0) { failed("send"); } else { if (wait_read_timeout(rcon_fd, 5, 0) <= 0) { printf ("*** timeout waiting for reply\n"); } else { char* msg; /* see if more packets arrive within a short interval */ while(wait_read_timeout(rcon_fd, 0, 50000) > 0) { msg = rcon_receive(); printf("%s", msg); g_free(msg); } } } if(*buf) add_history(buf); free(buf); buf = readline(prompt); } return 0; } #endif xqf-1.0.5/src/rcon.h0000644002404400000620000000202007536355470011141 00000000000000/* XQF - Quake server browser and launcher * Copyright (C) 1998-2000 Roman Pozlevich * * 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 */ #ifndef __RCON_H__ #define __RCON_H__ #include "xqf.h" extern void rcon_dialog (const struct server *s, const char *passwd); extern void rcon_init (void); extern void rcon_done (void); #endif /* __RCON_H__ */ xqf-1.0.5/src/skin.c0000644002404400000620000002344710275434302011141 00000000000000/* XQF - Quake server browser and launcher * Copyright (C) 1998-2000 Roman Pozlevich * * 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 */ #include #include /* strlen, strcpy, strncpy, strcmp, strncmp, memset */ #include /* stat */ #include /* stat */ #include #include "xqf-ui.h" #include "pref.h" #include "utils.h" #include "pixmaps.h" #include "dialogs.h" #include "skin.h" #include "skin_pcx.h" #define NOSKIN_BCOLOR 0x80 #define NOSKIN_WCOLOR 0xC0 static guchar quake_pallete[768] = { #include "quake_pal.h" }; static guchar quake2_pallete[768] = { #include "quake2_pal.h" }; static GdkColor pcolors[14]; static int pcolors_allocated = FALSE; static char *dir_qw_skin_filter (const char *dir, const char *str) { int len; char *res; if (!str) return NULL; len = strlen (str); if (len <= 4 || strcmp (str + len - 4, ".pcx")) return NULL; len -= 4; res = g_malloc (len + 1); strncpy (res, str, len); res[len] = '\0'; return res; } static char *dir_q2_skin_filter (const char *dir, const char *str) { int len; char *res; if (!str) return NULL; len = strlen (str); if (len <= 6 || strcmp (str + len - 6, "_i.pcx")) return NULL; len -= 6; res = g_malloc (len + 1); strncpy (res, str, len); res[len] = '\0'; return res; } GList *get_qw_skin_list (const char *dir) { GList *list; char *path; path = file_in_dir (dir, "qw/skins"); list = dir_to_list (path, dir_qw_skin_filter); g_free (path); return list; } static char *dir_alldirs_filter (const char *dir, const char *str) { struct stat st_buf; int res; char *file; if (!str || str[0] == '.') return NULL; file = file_in_dir (dir, str); res = stat (file, &st_buf); g_free (file); if (res == 0 && S_ISDIR (st_buf.st_mode)) return g_strdup (str); return NULL; } GList *get_q2_skin_list (const char *dir) { GList *list = NULL; GList *dirs; GList *tmp; GList *skins; GList *skin; char *path; char *skin_dir; char *skin_str; path = file_in_dir (dir, "baseq2/players"); dirs = dir_to_list (path, dir_alldirs_filter); for (tmp = dirs; tmp; tmp = tmp->next) { skin_dir = file_in_dir (path, (char *) tmp->data); skins = dir_to_list (skin_dir, dir_q2_skin_filter); g_free (skin_dir); for (skin = skins; skin; skin = skin->next) { skin_str = file_in_dir ((char *) tmp->data, (char *) skin->data); list = g_list_prepend (list, skin_str); } } g_free (path); list = g_list_reverse (list); return list; } void draw_qw_skin (GtkWidget *preview, guchar *data, int top, int bottom) { guchar buf[320*3]; guchar colormap[256]; guchar *ptr; int i, j, k; int fixed_top_color = fix_qw_player_color (top); int fixed_bottom_color = fix_qw_player_color (bottom); if (data) { for (i = 0; i < 256; i++) colormap[i] = i; if (fixed_top_color != 1) { for (i = 0; i<16; i++) colormap[16*1 + i] = fixed_top_color*16 + ((fixed_top_color <= 7)? i : 15 - i); } if (fixed_bottom_color != 6) { for (i = 0; i<16; i++) colormap[16*6 + i] = fixed_bottom_color*16 + ((fixed_bottom_color <= 7)? i : 15 - i); } for (i = 0; i < 200; i++) { ptr = buf; for (j = 0; j < 320; j++) { *ptr++ = quake_pallete[colormap[*data] * 3 + 0]; *ptr++ = quake_pallete[colormap[*data] * 3 + 1]; *ptr++ = quake_pallete[colormap[*data] * 3 + 2]; data++; } gtk_preview_draw_row (GTK_PREVIEW (preview), buf, 0, i, 320); } } else { for (j = 0, k = NOSKIN_WCOLOR; j < 200; j += 40) { i = k; for (ptr = buf; ptr < buf+320*3; ptr += 40*3) { memset (ptr, i, 40*3); i = (NOSKIN_WCOLOR + NOSKIN_BCOLOR) - i; } for (i = 0; i < 40; i++) { gtk_preview_draw_row (GTK_PREVIEW (preview), buf, 0, j+i, 320); } k = (NOSKIN_WCOLOR + NOSKIN_BCOLOR) - k; } } gtk_widget_draw (preview, NULL); } void draw_q2_skin (GtkWidget *preview, guchar *data, int scale) { guchar *buf; guchar *ptr; int i, j, k; buf = g_malloc (32*scale*3); if (data) { for (i = 0; i < 32*scale; ) { ptr = buf; for (j = 0; j < 32; j++) { for (k = 0; k < scale; k++) { *ptr++ = quake2_pallete[*data * 3 + 0]; *ptr++ = quake2_pallete[*data * 3 + 1]; *ptr++ = quake2_pallete[*data * 3 + 2]; } data++; } for (k = 0; k < scale; k++) { gtk_preview_draw_row (GTK_PREVIEW (preview), buf, 0, i++, 32*scale); } } } else { for (j = 0, k = NOSKIN_WCOLOR; j < 32*scale; j += 32) { i = k; for (ptr = buf; ptr < buf+32*scale*3; ptr += 32*3) { memset (ptr, i, 32*3); i = (NOSKIN_WCOLOR + NOSKIN_BCOLOR) - i; } for (i = 0; i < 32; i++) { gtk_preview_draw_row (GTK_PREVIEW (preview), buf, 0, j+i, 32*scale); } k = (NOSKIN_WCOLOR + NOSKIN_BCOLOR) - k; } } g_free (buf); gtk_widget_draw (preview, NULL); } static char *skin_filename (char *skin, char *subdir, char *ext) { char *filename; char *ptr; filename = g_malloc (strlen (subdir) + strlen (skin) + strlen (ext) + 1); ptr = filename; strcpy (ptr, subdir); ptr += strlen (subdir); strcpy (ptr, skin); ptr += strlen (skin); strcpy (ptr, ext); return filename; } guchar *get_qw_skin (char *skin, char *path) { char *filename; char *skinsdir; guchar *pcx; int skinlen; if (!skin || skin[0] == '\0') skin = "base.pcx"; skinsdir = file_in_dir (path, "qw/skins/"); skinlen = strlen (skin); if (skinlen > 4 && g_strcasecmp (skin + skinlen - 4, ".pcx") == 0) filename = file_in_dir (skinsdir, skin); else filename = skin_filename (skin, skinsdir, ".pcx"); pcx = read_skin_pcx (filename, FALSE); #ifdef DEBUG if (!pcx) fprintf (stderr, "cannot load QW skin %s\n", filename); #endif g_free (filename); g_free (skinsdir); return pcx; } guchar *get_q2_skin (char *skin, char *path) { char *skinsdir; char *filename; guchar *pcx; int skinlen; if (!skin || skin[0] == '\0') return NULL; skinsdir = file_in_dir (path, "baseq2/players/"); skinlen = strlen (skin); filename = skin_filename (skin, skinsdir, "_i.pcx"); pcx = read_skin_pcx (filename, TRUE); #ifdef DEBUG if (!pcx) fprintf (stderr, "cannot load Q2 skin %s\n", filename); #endif g_free (filename); g_free (skinsdir); return pcx; } static gushort convert_color (unsigned c) { c *= 257; /* scale from char to short */ c = c + c/3 + 0x2800; /* add brightness */ return (c > 0xffff)? 0xffff : c; } void allocate_quake_player_colors (GdkWindow *window) { GdkColormap *colormap; int i, j; if (!pcolors_allocated) { colormap = gdk_window_get_colormap (window); for (i = 0; i < 14; i++) { j = (i<8)? 11 : 15 - 11; pcolors[i].pixel = 0; pcolors[i].red = convert_color (quake_pallete [(i*16 + j)*3 + 0]); pcolors[i].green = convert_color (quake_pallete [(i*16 + j)*3 + 1]); pcolors[i].blue = convert_color (quake_pallete [(i*16 + j)*3 + 2]); if (!gdk_color_alloc (colormap, &pcolors[i])) { g_warning ("unable to allocate color: ( %d %d %d )", pcolors[i].red, pcolors[i].green, pcolors[i].blue); } } pcolors_allocated = TRUE; } } void set_bg_color (GtkWidget *widget, int color) { GtkStyle *style; style = gtk_style_copy (widget->style); style->bg [GTK_STATE_NORMAL] = pcolors [color]; style->bg [GTK_STATE_ACTIVE] = pcolors [color]; style->bg [GTK_STATE_PRELIGHT] = pcolors [color]; style->bg [GTK_STATE_SELECTED] = pcolors [color]; style->bg [GTK_STATE_INSENSITIVE] = pcolors [color]; gtk_widget_set_style (widget, style); } GtkWidget *create_color_menu (void (*callback) (GtkWidget*, int)) { GtkWidget *menu; GtkWidget *menu_item; GtkWidget *button; int i; menu = gtk_menu_new (); for (i = 0; i < 14; i++) { /* ugly, ugly, ugly... */ button = gtk_button_new_with_label (" "); gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_HALF); gtk_widget_set_sensitive (button, FALSE); gtk_widget_set_usize (button, 40, -1); gtk_widget_show (button); menu_item = gtk_menu_item_new (); gtk_container_add (GTK_CONTAINER (menu_item), button); gtk_menu_append (GTK_MENU (menu), menu_item); gtk_signal_connect (GTK_OBJECT (menu_item), "activate", GTK_SIGNAL_FUNC (callback), GINT_TO_POINTER(i)); gtk_widget_show (menu_item); set_bg_color (menu_item, i); set_bg_color (button, i); } return menu; } GdkPixmap *qw_colors_pixmap_create (GtkWidget *window, unsigned char top, unsigned char bottom, GSList **cache) { GdkPixmap *pixmap; unsigned key; int w, h; key = (top << 8) + bottom; if (cache) { pixmap_cache_lookup (*cache, &pixmap, NULL, key); if (pixmap) return pixmap; } if (!GTK_WIDGET_REALIZED (window)) gtk_widget_realize (window); h = player_clist->row_height - 2; w = h * 3 / 2; pixmap = two_colors_pixmap (window->window, w, h, &pcolors[top], &pcolors[bottom]); if (cache) pixmap_cache_add (cache, pixmap, NULL, key); return pixmap; } xqf-1.0.5/src/skin.h0000644002404400000620000000325107201342721011133 00000000000000/* XQF - Quake server browser and launcher * Copyright (C) 1998-2000 Roman Pozlevich * * 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 */ #ifndef __SKIN_H__ #define __SKIN_H__ #include #define Q2_SKIN_SCALE 3 extern GList *get_qw_skin_list (const char *dir); extern GList *get_q2_skin_list (const char *dir); extern void draw_qw_skin (GtkWidget *preview, guchar *data, int top, int bottom); extern void draw_q2_skin (GtkWidget *preview, guchar *data, int scale); extern guchar *get_qw_skin (char *filename, char *path); extern guchar *get_q2_skin (char *skin, char *path); extern void allocate_quake_player_colors (GdkWindow *window); extern void set_bg_color (GtkWidget *widget, int color); extern GtkWidget *create_color_menu (void (*callback) (GtkWidget*, int)); extern GdkPixmap *qw_colors_pixmap_create (GtkWidget *window, unsigned char top, unsigned char bottom, GSList **cache); #endif /* __SKIN_H__ */ xqf-1.0.5/src/pixmaps.c0000644002404400000620000003563010415666670011666 00000000000000/* XQF - Quake server browser and launcher * Copyright (C) 1998-2000 Roman Pozlevich * * 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 */ #include "gnuconfig.h" #include #include "utils.h" #include "pixmaps.h" #include "game.h" #include "loadpixmap.h" // hack to make dlsym work #define static #include "xpm/update.xpm" #include "xpm/refresh.xpm" #include "xpm/refrsel.xpm" #include "xpm/stop.xpm" #include "xpm/connect.xpm" #include "xpm/observe.xpm" #include "xpm/record.xpm" #include "xpm/sfilter.xpm" #include "xpm/sfilter-cfg.xpm" #include "xpm/pfilter.xpm" #include "xpm/pfilter-cfg.xpm" #include "xpm/q.xpm" #include "xpm/q1.xpm" #include "xpm/q2.xpm" #include "xpm/q3.xpm" #include "xpm/q4.xpm" #include "xpm/wo.xpm" #include "xpm/et.xpm" #include "xpm/stvef.xpm" #include "xpm/hex.xpm" #include "xpm/hw.xpm" #include "xpm/sn.xpm" #include "xpm/hl.xpm" #include "xpm/hl2.xpm" #include "xpm/kp.xpm" #include "xpm/sfs.xpm" #include "xpm/sof2s.xpm" #include "xpm/t2.xpm" #include "xpm/hr2.xpm" #include "xpm/un.xpm" #include "xpm/postal2.xpm" #include "xpm/aao.xpm" #include "xpm/rune.xpm" #include "xpm/descent3.xpm" #include "xpm/ut2.xpm" #include "xpm/ut2004.xpm" #include "xpm/netp.xpm" #include "xpm/nexuiz.xpm" #include "xpm/warsow.xpm" #include "xpm/tremulous.xpm" #include "xpm/gamespy3d.xpm" #include "xpm/ssam.xpm" #include "xpm/mohaa.xpm" #include "xpm/savage.xpm" #include "xpm/cod.xpm" #include "xpm/bf1942.xpm" #include "xpm/jk3.xpm" #include "xpm/doom3.xpm" #include "xpm/green-plus.xpm" #include "xpm/red-minus.xpm" #include "xpm/man-black.xpm" #include "xpm/man-red.xpm" #include "xpm/man-yellow.xpm" #include "xpm/group-red.xpm" #include "xpm/group-green.xpm" #include "xpm/group-blue.xpm" #include "xpm/buddy-red.xpm" #include "xpm/buddy-green.xpm" #include "xpm/buddy-blue.xpm" #include "xpm/error.xpm" #include "xpm/delete.xpm" #include "xpm/server-na.xpm" #include "xpm/server-up.xpm" #include "xpm/server-down.xpm" #include "xpm/server-to.xpm" #include "xpm/server-error.xpm" #include "xpm/locked.xpm" #include "xpm/punkbuster.xpm" #include "xpm/locked_punkbuster.xpm" #undef static struct pixmap update_pix; struct pixmap refresh_pix; struct pixmap refrsel_pix; struct pixmap stop_pix; struct pixmap connect_pix; struct pixmap observe_pix; struct pixmap record_pix; struct pixmap sfilter_pix; struct pixmap sfilter_cfg_pix; struct pixmap pfilter_pix; struct pixmap pfilter_cfg_pix; struct pixmap gplus_pix; struct pixmap rminus_pix; struct pixmap man_black_pix; struct pixmap man_red_pix; struct pixmap man_yellow_pix; struct pixmap group_pix[3]; struct pixmap buddy_pix[9]; struct pixmap error_pix; struct pixmap delete_pix; struct pixmap server_status[5]; struct pixmap locked_pix; struct pixmap punkbuster_pix; struct pixmap locked_punkbuster_pix; static GdkGC *pixmaps_gc; static GdkGC *masks_gc; static GdkColor mask_pattern; int pixmap_height (GdkPixmap *pixmap) { int height, width; if (!pixmap) return 0; gdk_window_get_size (pixmap, &width, &height); return height; } int pixmap_width (GdkPixmap *pixmap) { int height, width; if (!pixmap) return 0; gdk_window_get_size (pixmap, &width, &height); return width; } void free_pixmap (struct pixmap *pixmap) { if (!pixmap) return; if (pixmap->pix) { gdk_pixmap_unref (pixmap->pix); pixmap->pix = NULL; } if (pixmap->mask) { gdk_bitmap_unref (pixmap->mask); pixmap->mask = NULL; } } static void create_pixmap (GtkWidget *widget, const char* file, struct pixmap *pix) { load_pixmap_as_pixmap(widget, file, pix); if(!pix->pix) { pix->pix = error_pix.pix; pix->mask = error_pix.mask; gdk_pixmap_ref(pix->pix); gdk_bitmap_ref(pix->mask); } } void free_pixmaps (void) { unsigned i; free_pixmap (&update_pix); free_pixmap (&refresh_pix); free_pixmap (&refrsel_pix); free_pixmap (&stop_pix); free_pixmap (&connect_pix); free_pixmap (&observe_pix); free_pixmap (&record_pix); free_pixmap (&sfilter_pix); free_pixmap (&sfilter_cfg_pix); free_pixmap (&pfilter_pix); free_pixmap (&pfilter_cfg_pix); free_pixmap (&gplus_pix); free_pixmap (&rminus_pix); free_pixmap (&man_black_pix); free_pixmap (&man_red_pix); free_pixmap (&man_yellow_pix); // He's actually green for (i = 0; i < 3; i++) free_pixmap (&group_pix[i]); for (i = 0; i < 9; i++) free_pixmap (&buddy_pix[i]); free_pixmap (&error_pix); free_pixmap (&delete_pix); for (i = 0; i < 5; i++) free_pixmap (&server_status[i]); free_pixmap (&locked_pix); free_pixmap (&punkbuster_pix); free_pixmap (&locked_punkbuster_pix); for (i = 0; i < GAMES_TOTAL; i++) { free_pixmap(games[i].pix); g_free(games[i].pix); games[i].pix = NULL; } if (pixmaps_gc) { gdk_gc_destroy (pixmaps_gc); pixmaps_gc = NULL; } if (masks_gc) { gdk_gc_destroy (masks_gc); masks_gc = NULL; } } /** \brief concatenate two pixmaps * * horizontal concatenation * @param window * @param dest destination pixmap * @param s1 first pixmap * @param s2 second pixmap * @returns dest for convenience */ struct pixmap* cat_pixmaps (GtkWidget *window, struct pixmap *dest, struct pixmap* s1, struct pixmap* s2) { GdkGC *white_gc; int h1, w1, h2, w2; if (!GTK_WIDGET_REALIZED (window)) gtk_widget_realize (window); gdk_window_get_size (s1->pix, &w1, &h1); gdk_window_get_size (s2->pix, &w2, &h2); dest->pix = gdk_pixmap_new (window->window, w1 + w2, MAX (h1, h2), -1); dest->mask = gdk_pixmap_new (window->window, w1 + w2, MAX (h1, h2), 1); white_gc = window->style->base_gc[GTK_STATE_NORMAL]; if (!masks_gc) { masks_gc = gdk_gc_new (dest->mask); gdk_gc_set_exposures (masks_gc, FALSE); } mask_pattern.pixel = 0; gdk_gc_set_foreground (masks_gc, &mask_pattern); gdk_draw_rectangle (dest->mask, masks_gc, TRUE, 0, 0, -1, -1); mask_pattern.pixel = 1; gdk_gc_set_foreground (masks_gc, &mask_pattern); gdk_gc_set_clip_origin (white_gc, 0, 0); gdk_gc_set_clip_mask (white_gc, s1->mask); gdk_draw_pixmap (dest->pix, white_gc, s1->pix, 0, 0, 0, 0, w1, h1); gdk_draw_pixmap (dest->mask, masks_gc, s1->mask, 0, 0, 0, 0, w1, h1); gdk_gc_set_clip_origin (white_gc, w1, 0); gdk_gc_set_clip_mask (white_gc, s2->mask); gdk_draw_pixmap (dest->pix, white_gc, s2->pix, 0, 0, w1, 0, w2, h2); gdk_draw_pixmap (dest->mask, masks_gc, s2->mask, 0, 0, w1, 0, w2, h2); gdk_gc_set_clip_origin (white_gc, 0, 0); gdk_gc_set_clip_mask (white_gc, NULL); return dest; } void init_pixmaps (GtkWidget *window) { unsigned i = 0; free_pixmaps (); if (!GTK_WIDGET_REALIZED (window)) gtk_widget_realize (window); create_pixmap (window, "update.xpm", &update_pix); create_pixmap (window, "refresh.xpm", &refresh_pix); create_pixmap (window, "refrsel.xpm", &refrsel_pix); create_pixmap (window, "stop.xpm", &stop_pix); create_pixmap (window, "connect.xpm", &connect_pix); create_pixmap (window, "observe.xpm", &observe_pix); create_pixmap (window, "record.xpm", &record_pix); create_pixmap (window, "sfilter.xpm", &sfilter_pix); create_pixmap (window, "sfilter_cfg.xpm", &sfilter_cfg_pix); create_pixmap (window, "pfilter.xpm", &pfilter_pix); create_pixmap (window, "pfilter_cfg.xpm", &pfilter_cfg_pix); create_pixmap (window, "green_plus.xpm", &gplus_pix); create_pixmap (window, "red_minus.xpm", &rminus_pix); create_pixmap (window, "man_black.xpm", &man_black_pix); create_pixmap (window, "man_red.xpm", &man_red_pix); create_pixmap (window, "man_yellow.xpm", &man_yellow_pix); create_pixmap (window, "group_red.xpm", &group_pix[0]); create_pixmap (window, "group_green.xpm", &group_pix[1]); create_pixmap (window, "group_blue.xpm", &group_pix[2]); create_pixmap (window, "buddy_red.xpm", &buddy_pix[1]); create_pixmap (window, "buddy_green.xpm", &buddy_pix[2]); create_pixmap (window, "buddy_blue.xpm", &buddy_pix[4]); create_pixmap (window, "server_na.xpm", &server_status[0]); create_pixmap (window, "server_up.xpm", &server_status[1]); create_pixmap (window, "server_down.xpm", &server_status[2]); create_pixmap (window, "server_to.xpm", &server_status[3]); create_pixmap (window, "server_error.xpm", &server_status[4]); create_pixmap (window, "error.xpm", &error_pix); create_pixmap (window, "delete.xpm", &delete_pix); create_pixmap (window, "locked.xpm", &locked_pix); create_pixmap (window, "punkbuster.xpm", &punkbuster_pix); cat_pixmaps(window, &locked_punkbuster_pix, &punkbuster_pix, &locked_pix); for (i = 0; i < GAMES_TOTAL; i++) { struct pixmap* pix = NULL; pix = g_malloc0(sizeof(struct pixmap)); if(games[i].icon) { create_pixmap(window, games[i].icon, pix); } games[i].pix = pix; } } void ensure_buddy_pix (GtkWidget *window, int n) { int width, height; GdkGC *white_gc; int pri; int sec; if (!buddy_pix[1].pix) /* not initialized */ return; if (n < 0 || n > 9 || buddy_pix[n].pix) return; sec = ((n & 0x04) != 0)? 0x04 : 0x02; pri = n & ~sec; ensure_buddy_pix (window, pri); if (!pri || !sec) return; if (!GTK_WIDGET_REALIZED (window)) gtk_widget_realize (window); gdk_window_get_size (buddy_pix[1].pix, &width, &height); buddy_pix[n].pix = gdk_pixmap_new (window->window, width, height, -1); buddy_pix[n].mask = gdk_pixmap_new (window->window, width, height, 1); white_gc = window->style->white_gc; if (!masks_gc) { masks_gc = gdk_gc_new (buddy_pix[n].mask); gdk_gc_set_exposures (masks_gc, FALSE); } gdk_gc_set_foreground (masks_gc, &window->style->white); gdk_draw_pixmap (buddy_pix[n].pix, white_gc, buddy_pix[pri].pix, 0, 0, 0, 0, width, height); gdk_draw_pixmap (buddy_pix[n].mask, masks_gc, buddy_pix[pri].mask, 0, 0, 0, 0, width, height); gdk_gc_set_clip_mask (white_gc, buddy_pix[sec].mask); gdk_draw_pixmap (buddy_pix[n].pix, white_gc, buddy_pix[sec].pix, 0, 0, 0, 0, width, height); gdk_gc_set_clip_mask (white_gc, NULL); gdk_gc_set_clip_mask (masks_gc, buddy_pix[sec].mask); gdk_draw_rectangle (buddy_pix[n].mask, masks_gc, TRUE, 0, 0, width, height); gdk_gc_set_clip_mask (masks_gc, NULL); } GdkPixmap *two_colors_pixmap (GdkWindow *window, int width, int height, GdkColor *top, GdkColor *bottom) { GdkPixmap *pixmap; pixmap = gdk_pixmap_new (window, width, height, -1); if (!pixmaps_gc) pixmaps_gc = gdk_gc_new (window); gdk_gc_set_foreground (pixmaps_gc, top); gdk_draw_rectangle (pixmap, pixmaps_gc, TRUE, 0, 0, width, height/2); gdk_gc_set_foreground (pixmaps_gc, bottom); gdk_draw_rectangle (pixmap, pixmaps_gc, TRUE, 0, height/2, width, height - height/2); return pixmap; } void create_server_pixmap (GtkWidget *window, struct pixmap *stype, int n, GdkPixmap **pix, GdkBitmap **mask) { GdkGC *white_gc; int hb, wb, hs, ws; if (!GTK_WIDGET_REALIZED (window)) gtk_widget_realize (window); gdk_window_get_size (buddy_pix[1].pix, &wb, &hb); gdk_window_get_size (stype->pix, &ws, &hs); *pix = gdk_pixmap_new (window->window, wb + ws, MAX (hs, hb), -1); *mask = gdk_pixmap_new (window->window, wb + ws, MAX (hs, hb), 1); white_gc = window->style->base_gc[GTK_STATE_NORMAL]; if (!masks_gc) { masks_gc = gdk_gc_new (*mask); gdk_gc_set_exposures (masks_gc, FALSE); } mask_pattern.pixel = 0; gdk_gc_set_foreground (masks_gc, &mask_pattern); gdk_draw_rectangle (*mask, masks_gc, TRUE, 0, 0, -1, -1); mask_pattern.pixel = 1; gdk_gc_set_foreground (masks_gc, &mask_pattern); if (n) { ensure_buddy_pix (window, n); gdk_gc_set_clip_origin (white_gc, 0, 0); gdk_gc_set_clip_mask (white_gc, buddy_pix[n].mask); gdk_draw_pixmap (*pix, white_gc, buddy_pix[n].pix, 0, 0, 0, 0, wb, hb); gdk_draw_pixmap (*mask, masks_gc, buddy_pix[n].mask, 0, 0, 0, 0, wb, hb); } gdk_gc_set_clip_origin (white_gc, wb, 0); gdk_gc_set_clip_mask (white_gc, stype->mask); gdk_draw_pixmap (*pix, white_gc, stype->pix, 0, 0, wb, 0, ws, hs); gdk_draw_pixmap (*mask, masks_gc, stype->mask, 0, 0, wb, 0, ws, hs); gdk_gc_set_clip_origin (white_gc, 0, 0); gdk_gc_set_clip_mask (white_gc, NULL); } void pixmap_cache_lookup (GSList *cache, GdkPixmap **pix, GdkBitmap **mask, unsigned key) { struct cached_pixmap *cp; GdkPixmap *res_pix = NULL; GdkBitmap *res_mask = NULL; if (!pix) return; while (cache) { cp = (struct cached_pixmap *) cache->data; if (cp->key == key) { cp->weight += 2; res_pix = cp->pix; res_mask = cp->mask; break; } cache = cache->next; } *pix = res_pix; if (res_pix) gdk_pixmap_ref (res_pix); if (mask) { *mask = res_mask; if (res_mask) gdk_bitmap_ref (res_mask); } } void pixmap_cache_add (GSList **cache, GdkPixmap *pix, GdkBitmap *mask, unsigned key) { struct cached_pixmap *cp; if (pix && cache) { cp = g_malloc0 (sizeof (struct cached_pixmap)); cp->pix = pix; gdk_pixmap_ref (pix); if (mask) { cp->mask = mask; gdk_bitmap_ref (mask); } cp->key = key; cp->weight = 10; *cache = g_slist_prepend (*cache, cp); } } static int cached_pixmap_cmp (const struct cached_pixmap *a, const struct cached_pixmap *b) { return b->weight - a->weight; /* descending order */ } static void free_cached_pixmap (struct cached_pixmap *cp) { gdk_pixmap_unref (cp->pix); if (cp->mask) gdk_bitmap_unref (cp->mask); g_free (cp); } void pixmap_cache_clear (GSList **cache, int maxitems) { GSList *tmp = NULL; GSList *last = NULL; struct cached_pixmap *cp; if (cache && *cache) { if (maxitems > 0) { *cache = g_slist_sort (*cache, (GCompareFunc) cached_pixmap_cmp); for (tmp = *cache; (maxitems-- > 0) && tmp; tmp = tmp->next) { cp = (struct cached_pixmap *) tmp->data; cp->weight /= 2; last = tmp; } if (last) last->next = NULL; } else { tmp = *cache; *cache = NULL; } g_slist_foreach (tmp, (GFunc) free_cached_pixmap, NULL); g_slist_free (tmp); } } xqf-1.0.5/src/pixmaps.h0000644002404400000620000000613710275437460011670 00000000000000/* XQF - Quake server browser and launcher * Copyright (C) 1998-2000 Roman Pozlevich * * 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 */ #ifndef __PIXMAPS_H__ #define __PIXMAPS_H__ #include struct pixmap { GdkPixmap *pix; GdkBitmap *mask; }; struct cached_pixmap { unsigned key; GdkPixmap *pix; GdkBitmap *mask; int weight; }; extern struct pixmap update_pix; extern struct pixmap refresh_pix; extern struct pixmap refrsel_pix; extern struct pixmap stop_pix; extern struct pixmap connect_pix; extern struct pixmap observe_pix; extern struct pixmap record_pix; extern struct pixmap sfilter_pix; extern struct pixmap sfilter_cfg_pix; extern struct pixmap pfilter_pix; extern struct pixmap pfilter_cfg_pix; extern struct pixmap gplus_pix; extern struct pixmap rminus_pix; extern struct pixmap man_black_pix; extern struct pixmap man_red_pix; extern struct pixmap man_yellow_pix; extern struct pixmap group_pix[]; extern struct pixmap buddy_pix[]; extern struct pixmap error_pix; extern struct pixmap delete_pix; extern struct pixmap server_status[]; extern struct pixmap locked_pix; extern struct pixmap punkbuster_pix; extern struct pixmap locked_punkbuster_pix; extern int pixmap_height (GdkPixmap *pixmap); extern int pixmap_width (GdkPixmap *pixmap); extern void free_pixmap (struct pixmap *pixmap); extern void free_pixmaps (void); extern void init_pixmaps (GtkWidget *window); extern void ensure_buddy_pix (GtkWidget *window, int n); extern GdkPixmap *two_colors_pixmap (GdkWindow *window, int width, int height, GdkColor *top, GdkColor *bottom); extern void create_server_pixmap (GtkWidget *window, struct pixmap *stype, int n, GdkPixmap **pix, GdkBitmap **mask); extern void pixmap_cache_lookup (GSList *cache, GdkPixmap **pix, GdkBitmap **mask, unsigned key); extern void pixmap_cache_add (GSList **cache, GdkPixmap *pix, GdkBitmap *mask, unsigned key); extern void pixmap_cache_clear (GSList **cache, int maxitems); /** \brief concatenate two pixmaps * * horizontal concatenation * @param window * @param dest destination pixmap * @param s1 first pixmap * @param s2 second pixmap * @returns dest for convenience */ struct pixmap* cat_pixmaps (GtkWidget *window, struct pixmap *dest, struct pixmap* s1, struct pixmap* s2); #endif /* __PIXMAPS_H__ */ xqf-1.0.5/src/statistics.c0000644002404400000620000006035010324675127012370 00000000000000/* XQF - Quake server browser and launcher * Copyright (C) 1998-2000 Roman Pozlevich * * 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 */ #include "gnuconfig.h" #include #include #include #include /* memset, strcmp */ #include /* inet_ntoa */ #include /* inet_ntoa */ #include /* inet_ntoa */ #include "i18n.h" #include "xqf-ui.h" #include "game.h" #include "pref.h" #include "server.h" #include "host.h" #include "source.h" #include "dialogs.h" #include "utils.h" #include "config.h" #include "statistics.h" #include "country-filter.h" #include "debug.h" #define PERCENTS(A,B) ((B)? (A)/((B)/100.0) : 0) #define OS_NUM 5 #define CPU_NUM 6 enum OS { OS_WINDOWS = 0, OS_LINUX, OS_SOLARIS, OS_MACOS, OS_UNKNOWN }; enum CPU { CPU_X86 = 0, CPU_X86_64, CPU_SPARC, CPU_AXP, CPU_PPC, CPU_UNKNOWN }; struct server_stats { int players; int servers; int ok; int down; int timeout; int na; }; struct arch_stats { int oscpu[OS_NUM][CPU_NUM]; int count; int notebookpage; // page in notebook }; struct country_num { int c; int n; }; struct country_stats { unsigned nonzero; int notebookpage; // page in notebook struct country_num* country; }; static const char *srv_headers[6] = { //The space behind up and down is to make the strings different from //those in flt-player.c because their meaning is different in german N_("Servers"), N_("Up "), N_("Timeout"), N_("Down "), N_("Info n/a"), N_("Players") }; static const char *os_names[OS_NUM] = { "Windows", "Linux", "Solaris", "MacOS", N_("unknown") }; static const char *cpu_names[CPU_NUM] = { "i386", "x86_64", "sparc", "alpha", "ppc", N_("unknown") }; const char *srv_label = N_("Servers"); const char *arch_label = N_("OS/CPU"); const char *country_label = N_("Country"); static struct server_stats *srv_stats; static struct arch_stats *srv_archs; #ifdef USE_GEOIP static struct country_stats *srv_countries; #endif struct players_s { int on_os[OS_NUM]; int total; }; static struct players_s* players; static int servers_count; static int players_count; #ifdef USE_GEOIP static GtkWidget *country_notebook; #endif static GtkWidget *stat_notebook; static GtkWidget *arch_notebook; static enum server_type selected_type; static enum server_type selected_country; static void server_stats_create (void) { #ifdef USE_GEOIP unsigned g; // position GAMES_TOTAL is used for total number of all games unsigned i = (sizeof(struct country_stats) + geoip_num_countries()*sizeof(struct country_num)) * (GAMES_TOTAL+1); srv_countries = g_malloc0 (i); for(g = 0; g < GAMES_TOTAL+1; ++g) { srv_countries[g].country = (struct country_num*)((void*)srv_countries + sizeof(struct country_stats)*(GAMES_TOTAL+1) + g*geoip_num_countries()*sizeof(struct country_num)); } #endif // position GAMES_TOTAL is used for total number of all games srv_stats = g_malloc0 (sizeof (struct server_stats) * (GAMES_TOTAL+1)); srv_archs = g_malloc0 (sizeof (struct arch_stats) * GAMES_TOTAL); players = g_malloc0 (sizeof (struct arch_stats) * GAMES_TOTAL); servers_count = 0; players_count = 0; } static void server_stats_destroy (void) { g_free (srv_stats); srv_stats = NULL; g_free (srv_archs); srv_archs = NULL; #ifdef USE_GEOIP g_free(srv_countries); srv_countries = NULL; #endif } enum CPU identify_cpu (struct server *s, const char *versionstr) { enum CPU cpu = CPU_UNKNOWN; char *str; if (!(str = g_strdup(versionstr))) return CPU_UNKNOWN; g_strdown(str); if (strstr (str, "x86_64") || strstr (str, "amd64") || strstr(str, "x64")) cpu = CPU_X86_64; else if (strstr (str, "x86") || strstr (str, "i386")) cpu = CPU_X86; else if (strstr (str, "sparc")) cpu = CPU_SPARC; else if (strstr (str, "axp")) cpu = CPU_AXP; else if (strstr (str, "ppc")) cpu = CPU_PPC; else { debug (3, "identify_cpu() -- [%s %s:%d] Unknown CPU: %s\n", type2id(s->type), inet_ntoa (s->host->ip), s->port, versionstr); } g_free(str); return cpu; } enum OS identify_os (struct server *s, char *versionstr) { enum OS os = OS_UNKNOWN; char *str; if (!(str = g_strdup(versionstr))) return CPU_UNKNOWN; g_strdown(str); if (strstr (str, "win")) os = OS_WINDOWS; else if (strstr (str, "linux")) os = OS_LINUX; else if (strstr (str, "solaris")) os = OS_SOLARIS; else if (strstr (str, "macos")) os = OS_MACOS; else { debug (3, "identify_os() -- [%s %s:%d] Unknown OS: %s\n", type2id(s->type), inet_ntoa (s->host->ip), s->port, versionstr); } g_free(str); return os; } enum OS t2_identify_os (struct server *s, char *versionstr) { if (!strcmp(versionstr,"1")) return OS_LINUX; return OS_WINDOWS; } #ifdef USE_GEOIP static int country_stat_compare_func(const void* va, const void* vb) { const struct country_num* a = va; const struct country_num* b = vb; if(a->n > b->n) return -1; else if(a->n == b->n) return 0; else return 1; } #endif static void collect_statistics (void) { GSList *servers; GSList *tmp; struct server *s; char **info; enum OS os; enum CPU cpu; int countthisserver; servers = all_servers (); /* Free at end of this function */ if (servers) { for (tmp = servers; tmp; tmp = tmp->next) { s = (struct server *) tmp->data; info = s->info; cpu = CPU_UNKNOWN; os = OS_UNKNOWN; countthisserver=0; servers_count++; srv_stats[s->type].servers++; srv_stats[s->type].players += s->curplayers; players_count += s->curplayers; if (s->ping < MAX_PING) { if (s->ping >= 0) { srv_stats[s->type].ok++; countthisserver=1; } else srv_stats[s->type].na++; } else { if (s->ping == MAX_PING) srv_stats[s->type].timeout++; else srv_stats[s->type].down++; } #ifdef USE_GEOIP if(s->country_id >= 0 && s->country_id < geoip_num_countries()) { if(++srv_countries[s->type].country[s->country_id].n == 1) { srv_countries[s->type].country[s->country_id].c = s->country_id; ++srv_countries[s->type].nonzero; } if(++srv_countries[GAMES_TOTAL].country[s->country_id].n == 1) { srv_countries[GAMES_TOTAL].country[s->country_id].c = s->country_id; ++srv_countries[GAMES_TOTAL].nonzero; } } #endif if (info && games[s->type].arch_identifier) { while (info[0]) { if (g_strcasecmp (info[0], games[s->type].arch_identifier) == 0) { if (!info[1]) break; if (games[s->type].identify_cpu) cpu = games[s->type].identify_cpu(s, info[1]); else cpu = CPU_UNKNOWN; if (games[s->type].identify_os) os = games[s->type].identify_os(s, info[1]); else os = OS_UNKNOWN; break; } info += 2; } if(countthisserver) { srv_archs[s->type].oscpu[os][cpu]++; srv_archs[s->type].count++; players[s->type].on_os[os] += s->curplayers; players[s->type].total += s->curplayers; } } } server_list_free (servers); } #ifdef USE_GEOIP { unsigned g; for(g = 0; g < GAMES_TOTAL+1; ++g) { qsort(srv_countries[g].country, geoip_num_countries(), sizeof(struct country_num), country_stat_compare_func); } } #endif } static void put_label_to_table (GtkWidget *table, const char *str, float justify, int col, int row) { GtkWidget *label; if (str) { label = gtk_label_new (str); gtk_misc_set_alignment (GTK_MISC (label), justify, 0.5); gtk_table_attach_defaults (GTK_TABLE (table), label, col, col + 1, row, row + 1); gtk_widget_show (label); } } static void put_server_stats (GtkWidget *table, int num, int row) { char buf1[16], buf2[16], buf3[16], buf4[16], buf5[16], buf6[16]; const char *strings[6]; int i; strings[0] = buf1; strings[1] = buf2; strings[2] = buf3; strings[3] = buf4; strings[4] = buf5; strings[5] = buf6; g_snprintf (buf1, 16, "%d (%.2f%%)", srv_stats[num].servers, PERCENTS (srv_stats[num].servers, servers_count)); g_snprintf (buf2, 16, "%d (%.2f%%)", srv_stats[num].ok, PERCENTS (srv_stats[num].ok, srv_stats[num].servers)); g_snprintf (buf3, 16, "%d (%.2f%%)", srv_stats[num].timeout, PERCENTS (srv_stats[num].timeout, srv_stats[num].servers)); g_snprintf (buf4, 16, "%d (%.2f%%)", srv_stats[num].down, PERCENTS (srv_stats[num].down, srv_stats[num].servers)); g_snprintf (buf5, 16, "%d (%.2f%%)", srv_stats[num].na, PERCENTS (srv_stats[num].na, srv_stats[num].servers)); g_snprintf (buf6, 16, "%d (%.2f%%)", srv_stats[num].players, PERCENTS (srv_stats[num].players, players_count)); for (i = 0; i < 6; i++) put_label_to_table (table, strings[i], 1.0, i + 1, row); } static GtkWidget *server_stats_page (void) { GtkWidget *page_vbox; GtkWidget *alignment; GtkWidget *table; GtkWidget *game_label; GtkWidget *scrollwin; int i; int row = 0; page_vbox = gtk_vbox_new (FALSE, 4); gtk_container_set_border_width (GTK_CONTAINER (page_vbox), 8); scrollwin = gtk_scrolled_window_new (NULL, NULL); gtk_box_pack_start (GTK_BOX (page_vbox), scrollwin, TRUE, TRUE, 0); alignment = gtk_alignment_new (0.5, 0.5, 0.0, 0.0); gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(scrollwin), alignment); table = gtk_table_new (GAMES_TOTAL + 2, 7, FALSE); gtk_container_add (GTK_CONTAINER (alignment), table); gtk_container_set_border_width (GTK_CONTAINER (table), 6); gtk_table_set_row_spacings (GTK_TABLE (table), 4); gtk_table_set_col_spacings (GTK_TABLE (table), 8); gtk_table_set_col_spacing (GTK_TABLE (table), 0, 20); gtk_table_set_col_spacing (GTK_TABLE (table), 1, 20); gtk_table_set_col_spacing (GTK_TABLE (table), 5, 20); gtk_table_set_row_spacing (GTK_TABLE (table), 0, 12); gtk_table_set_row_spacing (GTK_TABLE (table), GAMES_TOTAL, 12); for (i = 0; i < 6; i++) put_label_to_table (table, _(srv_headers[i]), 1.0, i + 1, 0); for (i = 0, row = 1; i < GAMES_TOTAL; i++) { // Skip a game if it's not configured and show only configured is enabled if (!games[i].cmd && default_show_only_configured_games) continue; game_label = game_pixmap_with_label (i); gtk_table_attach_defaults (GTK_TABLE (table), game_label, 0, 1, row, row+1); put_server_stats (table, i, row); { srv_stats[GAMES_TOTAL].servers += srv_stats[i].servers; srv_stats[GAMES_TOTAL].ok += srv_stats[i].ok; srv_stats[GAMES_TOTAL].timeout += srv_stats[i].timeout; srv_stats[GAMES_TOTAL].down += srv_stats[i].down; srv_stats[GAMES_TOTAL].na += srv_stats[i].na; srv_stats[GAMES_TOTAL].players += srv_stats[i].players; } row++; } put_label_to_table (table, _("Total"), 0.0, 0, row + 1); put_server_stats (table, GAMES_TOTAL, row + 1); gtk_widget_show (table); gtk_widget_show (scrollwin); gtk_widget_show (alignment); gtk_widget_show (page_vbox); return page_vbox; } static void put_arch_stats (GtkWidget *table, int val, int total, int row, int col) { char buf[16]; g_snprintf (buf, 16, "%d (%.2f%%)", val, PERCENTS (val, total)); put_label_to_table (table, buf, 1.0, row, col); } static void arch_notebook_page (GtkWidget *notebook, enum server_type type, struct arch_stats *arch) { GtkWidget *table; int i, j; int cpu_total; table = gtk_table_new (CPU_NUM + 2, OS_NUM + 3, FALSE); gtk_notebook_append_page (GTK_NOTEBOOK (notebook), table, NULL); gtk_container_set_border_width (GTK_CONTAINER (table), 6); gtk_table_set_row_spacings (GTK_TABLE (table), 4); gtk_table_set_col_spacings (GTK_TABLE (table), 8); gtk_table_set_col_spacing (GTK_TABLE (table), 0, 20); gtk_table_set_row_spacing (GTK_TABLE (table), 0, 12); gtk_table_set_col_spacing (GTK_TABLE (table), OS_NUM, 20); gtk_table_set_row_spacing (GTK_TABLE (table), CPU_NUM, 12); gtk_table_set_row_spacing (GTK_TABLE (table), CPU_NUM+1, 12); put_label_to_table (table, _("CPU \\ OS"), 0.5, 0, 0); for (i = 0; i < OS_NUM; i++) { put_label_to_table (table, _(os_names[i]), 1.0, i + 1, 0); } put_label_to_table (table, _("Total"), 1.0, OS_NUM + 1, 0); for (i = 0; i < CPU_NUM; i++) { put_label_to_table (table, _(cpu_names[i]), 0.0, 0, i + 1); } put_label_to_table (table, _("Total"), 0.0, 0, CPU_NUM + 1); put_label_to_table (table, _("Players"), 0.0, 0, CPU_NUM + 2); for (j = 0; j < CPU_NUM; j++) { cpu_total = 0; for (i = 0; i < OS_NUM; i++) { put_arch_stats (table, arch->oscpu[i][j], arch->count, i + 1, j + 1); cpu_total += arch->oscpu[i][j]; if (j > 0) arch->oscpu[i][0] += arch->oscpu[i][j]; } put_arch_stats (table, cpu_total, arch->count, OS_NUM + 1, j + 1); } for (i = 0; i < OS_NUM; i++) { put_arch_stats (table, arch->oscpu[i][0], arch->count, i + 1, CPU_NUM + 1); put_arch_stats (table, players[type].on_os[i], players[type].total, i + 1, CPU_NUM + 2); } put_arch_stats (table, arch->count, arch->count, OS_NUM + 1, CPU_NUM + 1); put_arch_stats (table, srv_stats[type].players, players_count, OS_NUM + 1, CPU_NUM + 2); gtk_widget_show (table); } gboolean create_server_type_menu_filter_hasharch(enum server_type type) { if ((!games[type].cmd && default_show_only_configured_games) || !games[type].arch_identifier) return FALSE; else return TRUE; } static void select_server_type_callback(GtkWidget *widget, enum server_type type) { gtk_notebook_set_page (GTK_NOTEBOOK (arch_notebook), srv_archs[type].notebookpage ); selected_type = type; } static GtkWidget *archs_stats_page (void) { GtkWidget *page_vbox; GtkWidget *alignment; GtkWidget *option_menu; GtkWidget *hbox; int pagenum = 0; enum server_type type = Q2_SERVER; enum server_type to_activate = UNKNOWN_SERVER; page_vbox = gtk_vbox_new (FALSE, 4); gtk_container_set_border_width (GTK_CONTAINER (page_vbox), 8); alignment = gtk_alignment_new (0.5, 0.5, 0.0, 0.0); arch_notebook = gtk_notebook_new (); gtk_notebook_set_show_tabs (GTK_NOTEBOOK (arch_notebook), FALSE); gtk_notebook_set_tab_pos (GTK_NOTEBOOK (arch_notebook), GTK_POS_TOP); gtk_notebook_set_tab_hborder (GTK_NOTEBOOK (arch_notebook), 4); gtk_notebook_set_show_border(GTK_NOTEBOOK(arch_notebook), FALSE); gtk_container_add (GTK_CONTAINER (alignment), arch_notebook); to_activate = config_get_int("/" CONFIG_FILE "/Statistics/game"); for (type = 0; type < GAMES_TOTAL; ++type) { if(!create_server_type_menu_filter_hasharch(type)) continue; srv_archs[type].notebookpage=pagenum++; arch_notebook_page (arch_notebook, type, &srv_archs[type]); } // the notebook must exist to allow activate events of the menu hbox = gtk_hbox_new(FALSE,0); gtk_box_pack_start (GTK_BOX (page_vbox), hbox, FALSE, TRUE, 0); option_menu = create_server_type_menu (to_activate, create_server_type_menu_filter_hasharch, GTK_SIGNAL_FUNC(select_server_type_callback)); gtk_box_pack_start (GTK_BOX (hbox), option_menu, TRUE, FALSE, 0); gtk_widget_show (option_menu); gtk_widget_show(hbox); gtk_box_pack_start (GTK_BOX (page_vbox), alignment, TRUE, TRUE, 0); gtk_widget_show (arch_notebook); gtk_widget_show (alignment); gtk_widget_show (page_vbox); return page_vbox; } #ifdef USE_GEOIP static gboolean create_server_type_menu_filter_hascountries(enum server_type type) { return (srv_countries[type].nonzero != 0); } static void country_notebook_page (GtkWidget *notebook, enum server_type type, struct country_stats *stats) { GtkWidget *table; GtkWidget *scrollwin; GtkWidget *alignment; unsigned c; char buf[16] = {0}; scrollwin = gtk_scrolled_window_new (NULL, NULL); alignment = gtk_alignment_new (0.5, 0.5, 0.0, 0.0); gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(scrollwin), alignment); table = gtk_table_new (stats->nonzero+2, 2, FALSE); gtk_container_set_border_width (GTK_CONTAINER (table), 6); gtk_table_set_row_spacings (GTK_TABLE (table), 4); gtk_table_set_col_spacings (GTK_TABLE (table), 8); gtk_container_add (GTK_CONTAINER (alignment), table); gtk_container_set_border_width (GTK_CONTAINER (table), 6); gtk_notebook_append_page (GTK_NOTEBOOK (notebook), scrollwin, NULL); for(c = 0; c < stats->nonzero; ++c) { int id; unsigned numservers; id = stats->country[c].c; if(type == UNKNOWN_SERVER) { numservers = servers_count; } else { numservers = srv_stats[type].ok; } snprintf(buf, sizeof(buf), "%u (%.2f%%)", stats->country[c].n, PERCENTS(stats->country[c].n, numservers)); put_label_to_table (table, buf , 1.0, 0, c); { GtkWidget* label; GtkWidget* hbox = gtk_hbox_new (FALSE, 4); struct pixmap* pix = get_pixmap_for_country_with_fallback(id); if(pix) { GtkWidget *pixmap = gtk_pixmap_new(pix->pix,pix->mask); gtk_box_pack_start (GTK_BOX (hbox), pixmap, FALSE, FALSE, 0); gtk_widget_show (pixmap); } label = gtk_label_new (geoip_name_by_id(id)); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); gtk_widget_show (label); gtk_table_attach_defaults (GTK_TABLE (table), hbox, 1, 2, c, c+1); gtk_widget_show (hbox); } } gtk_widget_show(table); gtk_widget_show(scrollwin); gtk_widget_show(alignment); } static void select_country_server_type_callback(GtkWidget *widget, enum server_type type) { gtk_notebook_set_page (GTK_NOTEBOOK (country_notebook), srv_countries[type].notebookpage ); selected_country = type; } static GtkWidget *country_stats_page (void) { GtkWidget *page_vbox; GtkWidget *option_menu; GtkWidget *hbox; int pagenum = 0; enum server_type type = Q2_SERVER; enum server_type to_activate = UNKNOWN_SERVER; page_vbox = gtk_vbox_new (FALSE, 4); gtk_container_set_border_width (GTK_CONTAINER (page_vbox), 8); country_notebook = gtk_notebook_new (); gtk_notebook_set_show_tabs (GTK_NOTEBOOK (country_notebook), FALSE); gtk_notebook_set_tab_pos (GTK_NOTEBOOK (country_notebook), GTK_POS_TOP); gtk_notebook_set_tab_hborder (GTK_NOTEBOOK (country_notebook), 4); gtk_notebook_set_show_border(GTK_NOTEBOOK(country_notebook), FALSE); selected_country = to_activate = config_get_int("/" CONFIG_FILE "/Statistics/country"); for (type = 0; type <= GAMES_TOTAL; ++type) { if(!srv_countries[type].nonzero) continue; srv_countries[type].notebookpage=pagenum++; country_notebook_page (country_notebook, type, &srv_countries[type]); } // the notebook must exist to allow activate events of the menu hbox = gtk_hbox_new(FALSE,0); gtk_box_pack_start (GTK_BOX (page_vbox), hbox, FALSE, TRUE, 0); option_menu = create_server_type_menu (to_activate==GAMES_TOTAL?-1:to_activate, create_server_type_menu_filter_hascountries, GTK_SIGNAL_FUNC(select_country_server_type_callback)); { GtkWidget* menu_item = gtk_menu_item_new (); GtkWidget* label = gtk_label_new(_("All Games")); GtkWidget* menu = gtk_option_menu_get_menu(GTK_OPTION_MENU(option_menu)); // separator gtk_widget_set_sensitive (menu_item, FALSE); gtk_menu_prepend (GTK_MENU (menu), menu_item); gtk_widget_show (menu_item); menu_item = gtk_menu_item_new (); gtk_menu_prepend (GTK_MENU (menu), menu_item); gtk_container_add (GTK_CONTAINER (menu_item), label); gtk_signal_connect (GTK_OBJECT (menu_item), "activate", GTK_SIGNAL_FUNC (select_country_server_type_callback), (gpointer)GAMES_TOTAL); gtk_widget_show (menu_item); gtk_widget_show (label); if(to_activate == GAMES_TOTAL) { gtk_menu_item_activate (GTK_MENU_ITEM (menu_item)); gtk_option_menu_set_history (GTK_OPTION_MENU (option_menu), 0); } } gtk_box_pack_start (GTK_BOX (hbox), option_menu, TRUE, FALSE, 0); gtk_widget_show (option_menu); gtk_widget_show(hbox); gtk_box_pack_start (GTK_BOX (page_vbox), country_notebook, TRUE, TRUE, 0); gtk_widget_show (country_notebook); gtk_widget_show (page_vbox); return page_vbox; } #endif static void grab_defaults (GtkWidget *w, gpointer data) { config_set_int ("/" CONFIG_FILE "/Statistics/country", selected_country); config_set_int ("/" CONFIG_FILE "/Statistics/game", selected_type); config_set_int ("/" CONFIG_FILE "/Statistics/page", gtk_notebook_get_current_page (GTK_NOTEBOOK (stat_notebook))); } static void statistics_save_geometry (GtkWidget *window, gpointer data) { config_push_prefix ("/" CONFIG_FILE "/Statistics Window Geometry/"); config_set_int ("height", window->allocation.height); config_set_int ("width", window->allocation.width); config_pop_prefix (); } static void statistics_restore_geometry (GtkWidget *window) { int height, width; config_push_prefix ("/" CONFIG_FILE "/Statistics Window Geometry/"); height = config_get_int ("height"); width = config_get_int ("width"); if(!width || !height) return; gtk_window_set_default_size (GTK_WINDOW (window), width, height); config_pop_prefix (); } void statistics_dialog (void) { GtkWidget *window; GtkWidget *main_vbox; GtkWidget *page; GtkWidget *hbox; GtkWidget *label; GtkWidget *button; int page_num = 0; server_stats_create (); collect_statistics (); window = dialog_create_modal_transient_window (_("Statistics"), TRUE, TRUE, GTK_SIGNAL_FUNC(statistics_save_geometry)); statistics_restore_geometry(window); main_vbox = gtk_vbox_new (FALSE, 8); gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 8); gtk_container_add (GTK_CONTAINER (window), main_vbox); label = gtk_label_new (_("Statistics")); gtk_box_pack_start (GTK_BOX (main_vbox), label, FALSE, FALSE, 8); gtk_widget_show (label); stat_notebook = gtk_notebook_new (); gtk_notebook_set_tab_pos (GTK_NOTEBOOK (stat_notebook), GTK_POS_TOP); gtk_notebook_set_tab_hborder (GTK_NOTEBOOK (stat_notebook), 4); gtk_box_pack_start (GTK_BOX (main_vbox), stat_notebook, TRUE, TRUE, 0); page = server_stats_page (); label = gtk_label_new (_(srv_label)); gtk_widget_show (label); gtk_notebook_append_page (GTK_NOTEBOOK (stat_notebook), page, label); page = archs_stats_page (); label = gtk_label_new (_(arch_label)); gtk_widget_show (label); gtk_notebook_append_page (GTK_NOTEBOOK (stat_notebook), page, label); #ifdef USE_GEOIP page = country_stats_page (); label = gtk_label_new (_(country_label)); gtk_widget_show (label); gtk_notebook_append_page (GTK_NOTEBOOK (stat_notebook), page, label); #endif page_num = config_get_int ("/" CONFIG_FILE "/Statistics/page"); gtk_notebook_set_page (GTK_NOTEBOOK (stat_notebook), page_num); gtk_widget_show (stat_notebook); /* Close Button */ hbox = gtk_hbox_new (FALSE, 8); gtk_box_pack_start (GTK_BOX (main_vbox), hbox, FALSE, FALSE, 0); button = gtk_button_new_with_label (_("Close")); gtk_box_pack_end (GTK_BOX (hbox), button, FALSE, FALSE, 0); gtk_widget_set_usize (button, 80, -1); gtk_signal_connect (GTK_OBJECT (button), "clicked", GTK_SIGNAL_FUNC (grab_defaults), NULL); gtk_signal_connect_object (GTK_OBJECT (button), "clicked", GTK_SIGNAL_FUNC (gtk_widget_destroy), GTK_OBJECT (window)); GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); gtk_widget_grab_default (button); gtk_widget_show (button); gtk_widget_show (hbox); gtk_widget_show (main_vbox); gtk_widget_show (window); gtk_main (); unregister_window (window); server_stats_destroy (); } xqf-1.0.5/src/statistics.h0000644002404400000620000000220307412664023012363 00000000000000/* XQF - Quake server browser and launcher * Copyright (C) 1998-2000 Roman Pozlevich * * 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 */ #ifndef __STATISTICS_H__ #define __STATISTICS_H__ extern void statistics_dialog (void); extern enum CPU identify_cpu (struct server *s, const char *versionstr); extern enum OS identify_os (struct server *s, char *versionstr); extern enum OS t2_identify_os (struct server *s, char *versionstr); #endif /* __STATISTICS_H__ */ xqf-1.0.5/src/sort.c0000644002404400000620000001306510275430446011164 00000000000000/* XQF - Quake server browser and launcher * Copyright (C) 1998-2000 Roman Pozlevich * * 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 */ #include #include /* strcmp */ #include #include "xqf.h" #include "xqf-ui.h" /* for deprecated functions */ #include "pref.h" #include "utils.h" #include "server.h" #include "host.h" #include "sort.h" #include "country-filter.h" static inline int compare_strings (const char *str1, const char *str2) { int res; if (str1) { if (str2) { res = g_strcasecmp (str1, str2); if (!res) res = strcmp (str1, str2); } else { res = 1; } } else { res = (str2)? -1 : 0; } return res; } static inline int compare_server_ping(const struct server* s1, const struct server* s2) { int res = 0; if (s1->ping >= 0) { if (s2->ping >= 0) { res = s1->ping - s2->ping; if (!res) res = s1->retries - s2->retries; } else { res = -1; } } else { res = (s2->ping >= 0)? 1 : 0; } return res; } int compare_servers (const struct server *s1, const struct server *s2, enum ssort_mode mode) { int res; if(!s1) return 0; if(!s2) return 0; switch (mode) { case SORT_SERVER_NAME: res = compare_strings (s1->name, s2->name); break; case SORT_SERVER_ADDRESS: if (show_hostnames) { if (s1->host->name && !s2->host->name) { res = -1; break; } if (s2->host->name && !s1->host->name) { res = 1; break; } if (s1->host->name && s2->host->name) { res = compare_strings (s1->host->name, s2->host->name); if (res == 0) res = s1->port - s2->port; break; } } if (s1->host->ip.s_addr == s2->host->ip.s_addr) { res = s1->port - s2->port; } else { res = (g_ntohl (s1->host->ip.s_addr) > g_ntohl (s2->host->ip.s_addr))? 1 : -1; } break; case SORT_SERVER_MAP: res = compare_strings (s1->map, s2->map); break; case SORT_SERVER_GAME: res = compare_strings (s1->game, s2->game); break; case SORT_SERVER_GAMETYPE: res = compare_strings (s1->gametype, s2->gametype); break; case SORT_SERVER_PRIVATE: if( (s1->flags & SERVER_PASSWORD ) && ( s2->flags & SERVER_PASSWORD )) res = 0; else if (s1->flags & SERVER_PASSWORD ) res = 1; else if (s2->flags & SERVER_PASSWORD ) res = -1; else res = 0; break; case SORT_SERVER_ANTICHEAT: if( (s1->flags & SERVER_PUNKBUSTER ) && ( s2->flags & SERVER_PUNKBUSTER )) res = 0; else if (s1->flags & SERVER_PUNKBUSTER ) res = 1; else if (s2->flags & SERVER_PUNKBUSTER ) res = -1; else res = 0; break; case SORT_SERVER_PLAYERS: res = s1->curplayers - s2->curplayers; if (!res) { res = s1->maxplayers - s2->maxplayers; } break; case SORT_SERVER_MAXPLAYERS: res = s1->maxplayers - s2->maxplayers; if (!res) { res = s1->curplayers - s2->curplayers; } break; case SORT_SERVER_PING: res = compare_server_ping(s1, s2); break; case SORT_SERVER_TO: if (s1->retries >= 0) { if (s2->retries >= 0) { res = s1->retries - s2->retries; if (!res) res = s1->ping - s2->ping; } else { res = -1; } } else { res = (s2->retries >= 0)? 1 : 0; } break; case SORT_SERVER_COUNTRY: #ifdef USE_GEOIP res = compare_strings (geoip_code_by_id(s1->country_id), geoip_code_by_id(s2->country_id)); break; #endif case SORT_SERVER_TYPE: if(s1->type > s2->type) res = 1; else if(s1->type == s2->type) res = 0; else res = -1; break; default: res = 0; break; } return res; } int compare_players (const struct player *p1, const struct player *p2, enum psort_mode mode) { int res; if(!p1) return 0; if(!p2) return 0; switch (mode) { case SORT_PLAYER_FRAGS: res = p1->frags - p2->frags; break; case SORT_PLAYER_NAME: res = compare_strings (p1->name, p2->name); break; case SORT_PLAYER_TIME: res = p1->time - p2->time; break; case SORT_PLAYER_COLOR: res = p1->pants - p2->pants; if (!res) { res = p1->shirt - p2->shirt; } break; case SORT_PLAYER_PING: res = p1->ping - p2->ping; break; case SORT_PLAYER_SKIN: res = compare_strings (p1->skin, p2->skin); break; default: res = 0; break; } return res; } int compare_srvinfo (const char **i1, const char **i2, enum isort_mode mode) { int res; if(!i1) return 0; if(!i2) return 0; switch (mode) { case SORT_INFO_RULE: res = compare_strings (i1[0], i2[0]); break; case SORT_INFO_VALUE: res = compare_strings (i1[1], i2[1]); break; default: res = 0; break; } return res; } xqf-1.0.5/src/sort.h0000644002404400000620000000353010275430447011166 00000000000000/* XQF - Quake server browser and launcher * Copyright (C) 1998-2000 Roman Pozlevich * * 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 */ #ifndef __SORT_H__ #define __SORT_H__ #include "xqf.h" enum ssort_mode { SORT_SERVER_NAME = 0, SORT_SERVER_ADDRESS, SORT_SERVER_PING, SORT_SERVER_TO, SORT_SERVER_PRIVATE, SORT_SERVER_ANTICHEAT, SORT_SERVER_PLAYERS, SORT_SERVER_MAXPLAYERS, SORT_SERVER_MAP, SORT_SERVER_GAME, SORT_SERVER_GAMETYPE, SORT_SERVER_COUNTRY, SORT_SERVER_TYPE, }; enum psort_mode { SORT_PLAYER_NAME = 0, SORT_PLAYER_FRAGS, SORT_PLAYER_COLOR, SORT_PLAYER_SKIN, SORT_PLAYER_PING, SORT_PLAYER_TIME }; enum isort_mode { SORT_INFO_RULE = 0, SORT_INFO_VALUE }; extern int compare_servers (const struct server *a, const struct server *b, enum ssort_mode mode); extern int compare_players (const struct player *a, const struct player *b, enum psort_mode mode); extern int compare_srvinfo (const char **i1, const char **i2, enum isort_mode mode); #endif /* __SORT_H__ */ xqf-1.0.5/src/stat.c0000644002404400000620000014735110436307137011155 00000000000000/* XQF - Quake server browser and launcher * Copyright (C) 1998-2000 Roman Pozlevich * * 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 */ #include "gnuconfig.h" #include /* kill */ #include /* FILE, fopen, fclose, fprintf, ... */ #include /* strchr, strcmp, strlen, strcpy, memchr, strtok */ #include /* strtol */ #include /* read, close, fork, pipe, exec, fcntl, _exit */ /* getpid, unlink, write */ #include /* fcntl */ #include /* errno */ #include /* kill, signal... */ #include /* time */ #include /* inet_ntoa */ #include /* inet_ntoa */ #include /* inet_ntoa */ #include #include "i18n.h" #include "xqf.h" #include "game.h" #include "pref.h" #include "stat.h" #include "utils.h" #include "server.h" #include "source.h" #include "filter.h" #include "dialogs.h" #include "host.h" #include "dns.h" #include "debug.h" static const char savage_master_header[5] = { 0x7E, 0x41, 0x03, 0x00, 0x00 }; static void stat_next (struct stat_job *job); static void parse_qstat_record (struct stat_conn *conn); typedef void (*server_unref_void)(void*); typedef void (*userver_unref_void)(void*); static int failed (char *name, char *arg) { fprintf (stderr, "%s(%s) failed: %s\n", name, (arg)? arg : "", g_strerror (errno)); xqf_error("%s(%s) failed: %s\n", name, (arg)? arg : "", g_strerror (errno)); return TRUE; } static void stat_free_conn (struct stat_conn *conn) { struct stat_job *job; if (!conn || !conn->job) return; debug (3, "stat_free_conn() -- Conn %lx", conn); job = conn->job; job->cons = g_slist_remove (job->cons, conn); if (conn->fd >= 0) { gdk_input_remove (conn->tag); close (conn->fd); } if (conn->pid > 0) kill (conn->pid, SIGTERM); if (conn->tmpfile) { unlink (conn->tmpfile); g_free (conn->tmpfile); } if (conn->buf) g_free (conn->buf); if (conn->strings) g_slist_free (conn->strings); if (conn->servers) server_list_free (conn->servers); if (conn->uservers) userver_list_free (conn->uservers); g_free (conn); } static void stat_update_masters (struct stat_job *job); static void stat_master_update_done (struct stat_conn *conn, struct stat_job *job, struct master *m, enum master_state state); // check if master output is in savage format, if yes parse it and return true. // otherwise return false so the normal parse function can do the work static gboolean parse_savage_master_output (struct stat_conn *conn) { int res; struct stat_job *job = conn->job; conn->bufsize = 17; debug(3,"conn->first %d",conn->first); // check the signature of the first five bytes if(conn->first) { res = read (conn->fd, conn->buf + conn->pos, 5 - conn->pos); if (res < 0) { if (errno == EAGAIN || errno == EWOULDBLOCK) { return TRUE; } failed ("read", NULL); stat_master_update_done (conn, job, conn->master, SOURCE_ERROR); stat_update_masters (job); return TRUE; } if (res == 0) { /* EOF */ stat_master_update_done (conn, job, conn->master, SOURCE_UP); stat_update_masters (job); return TRUE; } conn->pos += res; if(conn->pos < 5) // we need five bytes return TRUE; conn->first = 0; // we know we have five bytes, reset buffer for further processing conn->pos = 0; if(!memcmp(conn->buf,savage_master_header,5)) { debug(3,"detected savage format"); conn->is_savage = TRUE; } else return FALSE; } else if(!conn->is_savage) return FALSE; while(1) { size_t off = 0; res = read (conn->fd, conn->buf + conn->pos, conn->bufsize - conn->pos); if (res < 0) { if (errno == EAGAIN || errno == EWOULDBLOCK) { return TRUE; } failed ("read", NULL); stat_master_update_done (conn, job, conn->master, SOURCE_ERROR); stat_update_masters (job); return TRUE; } if (res == 0) { /* EOF */ stat_master_update_done (conn, job, conn->master, SOURCE_UP); stat_update_masters (job); return TRUE; } conn->pos += res; // we always need six bytes for(off=0; off + 6 <= conn->pos; off+=6 ) { struct server *s; struct host *h; enum server_type type = UNKNOWN_SERVER; unsigned char* ip = conn->buf+off; unsigned port = 0; struct in_addr in; port = (ip[5]<<8)+ip[4]; if(!port) continue; if(!ip[0]) continue; debug(5,"%hhu.%hhu.%hhu.%hhu:%u",ip[0],ip[1],ip[2],ip[3],port); in.s_addr = 0; memcpy(&in.s_addr,ip,4); if(conn->master) { type = conn->master->type; } h = host_add_in (in); if (h) { /* IP address */ host_ref (h); if ((s = server_add (h, port, type)) != NULL) { if(s->type != type ) { server_free_info(s); s->type = type; } conn->servers = g_slist_prepend (conn->servers, s); server_ref(s); } host_unref (h); } } if(off >= conn->pos) { conn->pos=0; } else { memmove (conn->buf, conn->buf + conn->pos - conn->pos%6, conn->pos%6); conn->pos = conn->pos%6; } } } /** parse qstat output line str, in ip:port format. return true if successful, FALSE if server is down or timed out str will be modified!! */ static int parse_master_output (char *str, struct stat_conn *conn) { char *token[8] = {0}; int n = 0; char *endptr = NULL; enum server_type type = UNKNOWN_SERVER; char *addr = NULL; unsigned short port; struct server *s = NULL; struct userver *us = NULL; struct host *h = NULL; debug (6, "parse_master_output(%s,%p)",str,conn); n = tokenize_bychar (str, token, 8, QSTAT_DELIM); // UGLY HACK UGLY HACK UGLY HACK UGLY HACK // output from UT 2003 http server is formatted as // ip port gamespy_port // not the standard ip:port // If the master type is http and there are three columns // then it merges ip and port into one so it is handled // like other http master servers. // This is done by modifying token[0] which points somewhere // inside str so malloc/free is not necessary. It is guaranteed // that token[0] has enough space as there is at least a // whitespace character where the colon is placed now. if(conn->master->type == UT2_SERVER && conn->master->master_type == MASTER_HTTP && n == 3) { int off = strlen(token[0]); token[0][off]=':'; strcpy(token[0]+off+1,token[1]); n=1; } // output from broadcast, last line contains // // this line is skipped by n <= 3 if(conn->master->master_type == MASTER_LAN) { if( n <= 3 ) return TRUE; type = id2type (token[0]); n = 2; // we only need type and ip } else if (n >= 3) { /* Master address/status */ strtol (token[2], &endptr, 10); /* Is it a decimal number? */ if (endptr == token[2]) { if (strcmp (token[2], "DOWN") == 0) conn->master->state = SOURCE_DOWN; else if (strcmp (token[2], "TIMEOUT") == 0) conn->master->state = SOURCE_TIMEOUT; else conn->master->state = SOURCE_ERROR; return FALSE; } } else if (n == 1) { n = tokenize_bychar (str, token, 8, QSTAT_MASTER_DELIM); switch (n) { case 1: type = conn->master->type; break; case 2: type = id2type (token[0]); break; default: return TRUE; } } else { debug(3,"parse_master_output() -- unkown string %s",str); return TRUE; } /* server address is in token[n - 1] */ g_strchomp (token[n-1]); if (type != UNKNOWN_SERVER && parse_address (token[n - 1], &addr, &port)) { port += conn->master->options.portadjust; h = host_add (addr); if (h) { /* IP address */ host_ref (h); if ((s = server_add (h, port, type)) != NULL) { // doesn't make any sense, doesn't it? -- ln #if 0 if (conn->master && conn->master->type != UNKNOWN_SERVER && s->type != conn->master->type) { s->type = conn->master->type; server_free_info (s); } #else if(s->type != type ) { server_free_info(s); s->type = type; } #endif /* o When the "conn" is freed, it will call the function to free the list returned here */ //XXX // conn->servers = server_list_prepend (conn->servers, s); conn->servers = g_slist_prepend (conn->servers, s); server_ref(s); } host_unref (h); } else { /* hostname */ g_strdown (addr); port += conn->master->options.portadjust; if ((us = userver_add (addr, port, type)) != NULL) { // conn->uservers = userver_list_add (conn->uservers, us); conn->uservers = g_slist_prepend (conn->uservers, us); userver_ref(us); } } g_free (addr); } return TRUE; } static void stat_master_input_callback (struct stat_conn *conn, int fd, GdkInputCondition condition) { struct stat_job *job = conn->job; int first_used = 0; char *tmp; int res; #warning ugly hack for savage, make master handling more generic! if(conn->master->type == SAS_SERVER && conn->master->master_type == MASTER_HTTP && parse_savage_master_output(conn)) { return; } debug_increase_indent(); debug(3,"stat_master_input_callback(%p,%d,...)",conn,fd); while (1) { first_used = 0; if (conn->pos >= conn->bufsize - 1) { xqf_error ("server address string is too long\n"); stat_master_update_done (conn, job, conn->master, SOURCE_ERROR); stat_update_masters (job); debug_decrease_indent(); return; } res = read (fd, conn->buf + conn->pos, conn->bufsize - conn->pos); if (res < 0) { if (errno == EAGAIN || errno == EWOULDBLOCK) { debug_decrease_indent(); return; } failed ("read", NULL); stat_master_update_done (conn, job, conn->master, SOURCE_ERROR); stat_update_masters (job); debug_decrease_indent(); return; } if (res == 0) { /* EOF */ debug(3,"stat_master_input_callback -- eof"); stat_master_update_done (conn, job, conn->master, SOURCE_UP); stat_update_masters (job); debug_decrease_indent(); return; } tmp = conn->buf + conn->pos; conn->pos += res; while (res && (tmp = memchr (tmp, '\n', res)) != NULL) { *tmp++ = '\0'; // debug(0,"%s",conn->buf + first_used); if (!parse_master_output (conn->buf + first_used, conn)) { stat_master_update_done (conn, job, conn->master, conn->master->state); stat_update_masters (job); debug_decrease_indent(); return; } first_used = tmp - conn->buf; res = conn->buf + conn->pos - tmp; } if (first_used > 0) { if (first_used != conn->pos) { memmove (conn->buf, conn->buf + first_used, conn->pos - first_used); } conn->pos = conn->pos - first_used; } } debug_decrease_indent(); } static char **parse_serverinfo (char *token[], int n) { char **info; int size = 0; int i, j; char *ptr, *info_ptr; if (n == 0) return NULL; for (size = 0, i = 0; i < n; i++) { size += strlen (token[i]) + 1; } info = g_malloc (sizeof (char *) * (n + 1) * 2 + size); info_ptr = (char *) info + sizeof (char *) * (n + 1) * 2; for (i = 0, j = 0; i < n; i++) { ptr = strchr (token[i], '='); if (ptr) *ptr++ = '\0'; info [j++] = strcpy (info_ptr, token[i]); info_ptr += strlen (token[i]) + 1; if (ptr) { info [j++] = strcpy (info_ptr, ptr); info_ptr += strlen (ptr) + 1; } else { info [j++] = NULL; } } info [j + 1] = info [j] = NULL; return info; } static struct server *parse_server (char *token[], int n, time_t refreshed, int saved) { struct host *h; struct server *server; enum server_type type; char *addr; unsigned short port; if (n < 3) return NULL; type = id2type (token[0]); if (type == UNKNOWN_SERVER) return NULL; if (!parse_address (token[1], &addr, &port)) return NULL; h = host_add (addr); g_free (addr); if (!h) return NULL; server = server_add (h, port, type); debug (6, "server %lx retreived", server); server->flt_mask &= ~FILTER_SERVER_MASK; server->refreshed = refreshed; if (n == 3) { if (strcmp (token[2], "DOWN") == 0) { server->retries = MAX_RETRIES; server->ping = MAX_PING + 1; /* DOWN */ } else { server->retries = MAX_RETRIES; server->ping = MAX_PING; /* TIMEOUT */ } if (server->players) { g_slist_foreach (server->players, (GFunc) g_free, NULL); g_slist_free (server->players); server->players = NULL; server->flags &= ~PLAYER_GROUP_MASK; server->flt_mask &= ~FILTER_PLAYER_MASK; } server->curplayers = 0; server->curbots = 0; } else { /* We did get some information */ if (server->type == QW_SERVER || type == QW_SERVER) server->type = type; /* the real type of server (QW <-> Q2) */ if (games[server->type].parse_server) { /* We have a function to parse the server information, so first we free all of the data elements of this structure but not the structure its self. This is because the *_analyse functions should assign values to each of the elemets. */ server_free_info (server); server->retries = MAX_RETRIES; server->ping = MAX_PING; /* TIMEOUT */ /* Actually parse the info with the given function. The mapping and functions are in game.c */ (*games[server->type].parse_server) (token, n, server); if (server->ping > MAX_PING) { if (!saved || server->ping != MAX_PING + 1) server->ping = MAX_PING; } if (server->retries > maxretries) server->retries = maxretries; } #ifdef USE_GTK2 if(server->name && !g_utf8_validate(server->name,-1,NULL)) { // don't care about conversion errors char* convd = g_convert(server->name,-1,"UTF-8","iso-8859-1",NULL,NULL,NULL); if(convd) { g_free(server->name); server->name = convd; } } #endif } if(!saved && server->pinglast_answer = server->refreshed; } return server; } /** teamnames must be static storage, pointers to it will not be freed */ static void q3parseteams(struct server* s, const unsigned numteams, char** playerteamrules,// which rule holds the numbers that indicate which player is in what team char** teamnames, // default names for team char** teamnamesrules) // which rules hold the team names { // bitmask of players for each team long* teams = NULL; char **info_ptr = NULL; unsigned i = 0, n = 0; unsigned team = numteams; GSList *plist = NULL; struct player *p = NULL; char** teamnames_fromrules = NULL; if(!s || !playerteamrules || numteams<2) return; teams = g_malloc0(sizeof(long)*numteams); if(!teams) return; teamnames_fromrules = g_malloc0(sizeof(char*)*numteams); if(!teamnames_fromrules) return; for (info_ptr = s->info; info_ptr && *info_ptr; info_ptr += 2) { for(i = 0; i < numteams; ++i) { if (strcmp (*info_ptr, playerteamrules[i]) == 0) { team = i; break; } if (teamnamesrules && teamnamesrules[i] &&strcmp (*info_ptr, teamnamesrules[i]) == 0) { teamnames_fromrules[i]=info_ptr[1]; } } if(team != numteams ) { char* e = NULL; char* p = info_ptr[1]; for(;; p = e, e = NULL) { long pnr = strtol(p,&e,10); if(p == e || (e && !*e)) break; if(pnr != LONG_MIN && pnr != LONG_MAX && pnr <= (long)(sizeof(teams[team])*8) && pnr > 0) { teams[team] |= 2<<(pnr-1); } } team = numteams; } } for(plist = s->players, n = 0 ; plist ; plist=plist->next, ++n) { for(team=0;team != numteams; ++team) { if(teams[team]&(2<data; if(teamnames_fromrules[team]) p->model = teamnames_fromrules[team]; else p->model = teamnames[team]; } } } g_free(teams); g_free(teamnames_fromrules); } static void parse_qstat_record_part2 (GSList *strings, struct server *s) { int n; char *token[256]; struct player *p; GSList *plist = NULL; if (!strings) { if (games[s->type].analyze_serverinfo) (*games[s->type].analyze_serverinfo) (s); return; } n = tokenize_bychar ((char *) strings->data, token, 256, QSTAT_DELIM); if (n == 0) return; s->info = parse_serverinfo (token, n); strings = strings->next; if (strings && games[s->type].parse_player) { while (strings) { n = tokenize_bychar ((char *) strings->data, token, 256, QSTAT_DELIM); p = (*games[s->type].parse_player) (token, n, s); if (!p) /* error, try to recover */ return; plist = g_slist_prepend (plist, p); strings = strings->next; } s->players = g_slist_reverse (plist); } if (games[s->type].analyze_serverinfo) (*games[s->type].analyze_serverinfo) (s); if(s->type == WO_SERVER || s->type == WOET_SERVER) { static char* teamnames[2] = { N_("Allies"), N_("Axis") }; static char* playerteamrules[2] = { "Players_Allies", "Players_Axis" }; q3parseteams(s,2,playerteamrules,teamnames,NULL); } else if(s->type == Q3_SERVER) { static char* teamnames[2] = { N_("Red"), N_("Blue") }; static char* playerteamrules[2] = { "Players_Red", "Players_Blue" }; static char* teamnamesrules[2] = { "g_TeamRed", "g_TeamBlue" }; q3parseteams(s,2,playerteamrules,teamnames,teamnamesrules); } } static void parse_qstat_record (struct stat_conn *conn) { struct server *server; char *token[16]; int n; GSList *list; struct stat_job *job; if (!conn || !conn->strings) return; /* error, try to recover */ job = conn->job; /* Debug before tokenizing. */ debug (4, "parse_qstat_record() -- Conn %lx: %s", conn, conn->strings->data); n = tokenize_bychar ((char *) conn->strings->data, token, 16, QSTAT_DELIM); if (n < 3) return; /* error, try to recover */ server = parse_server (token, n, time (NULL), FALSE); if (server) { job->need_redraw = TRUE; /* o The list here is freed when the job is freed. o The parse_server call above increments the ref count as does the prepend below. So we need to decrement it one just for fun. */ job->delayed.queued_servers = server_list_prepend (job->delayed.queued_servers, server); job->progress.done++; server_unref (server); debug (6, "Server %lx in delayed list %lx.", server, job->delayed.queued_servers); parse_qstat_record_part2 (conn->strings->next, server); for (list = job->server_handlers; list; list = list->next) (* (server_func) list->data) (job, server); } } void parse_saved_server (GSList *strings) { struct server *server; char *token[16]; int n; time_t refreshed = 0; time_t last_answer = 0; char *endptr; char** refreshdata = NULL; if (!strings || !strings->next) return; // first line contains seconds of last refresh and last answer refreshdata = g_strsplit(strings->data," ",2); if(!refreshdata || !refreshdata[0]) { debug(0,"refreshdata empty"); return; } refreshed = strtoul (refreshdata[0], &endptr, 10); if (endptr == refreshdata[0]) /* It's not a number */ return; if(refreshdata[1]) // post 0.9.10 format { last_answer = strtoul (refreshdata[1], &endptr, 10); if (endptr == refreshdata[1]) /* It's not a number */ return; } g_strfreev(refreshdata); refreshdata = NULL; strings = strings->next; if(!strings) return; n = tokenize_bychar ((char *) strings->data, token, 16, QSTAT_DELIM); if (n < 3) return; server = parse_server (token, n, refreshed, TRUE); // unref newly created server since it is already referenced once // if it was in lists.gz. If it was not already referenced it will // be freed and does not stay stay around in memory. This way old // servers will not pile up in srvinfo.gz server = server_unref(server); if (server) { server_ref (server); parse_qstat_record_part2 (strings->next, server); server->last_answer=last_answer; server_unref (server); } } static void adjust_pointers (GSList *list, gpointer new, gpointer old) { while (list) { list->data = (gpointer) ((char *)new + ((char *)list->data - (char *)old)); list = list->next; } } static void stat_servers_update_done (struct stat_conn *conn) { debug (3, "stat_servers_update_done() -- Conn %lx server list %lx", conn, conn->job->servers); server_list_free (conn->job->servers); conn->job->servers = NULL; stat_free_conn (conn); } /* stat_server_input_callback -- as data is returned from the qstat process, this gets called. Sometimes there are multiple lines so the results have to be looped over. */ static void stat_servers_input_callback (struct stat_conn *conn, int fd, GdkInputCondition condition) { struct stat_job *job = conn->job; int first_used = 0; int blocked = FALSE; char *tmp; int res; /* debug (3, "stat_servers_input_callback() -- Conn %lx", conn); */ while (1) { first_used = 0; blocked = FALSE; if (conn->bufsize - conn->pos < BUFFER_TRESHOLD) { if (conn->bufsize >= BUFFER_MAXSIZE) { fprintf (stderr, "server record is too large\n"); stat_servers_update_done (conn); stat_next (job); return; } conn->bufsize += conn->bufsize; tmp = conn->buf; conn->buf = g_realloc (conn->buf, conn->bufsize); adjust_pointers (conn->strings, conn->buf, tmp); } res = read (fd, conn->buf + conn->pos, conn->bufsize - conn->pos); if (res < 0) { if (errno == EAGAIN || errno == EWOULDBLOCK) return; failed ("read", NULL); stat_servers_update_done (conn); stat_next (job); return; } if (res == 0) { /* EOF */ debug (3, "Conn %ld Sub Process Done with server list %lx", conn, conn->job->servers); stat_servers_update_done (conn); stat_next (job); return; } tmp = conn->buf + conn->pos; conn->pos += res; while (res && (tmp = memchr (tmp, '\n', res)) != NULL) { *tmp++ = '\0'; if (conn->buf[conn->lastnl] == '\0') { blocked = TRUE; gdk_input_remove (conn->tag); parse_qstat_record (conn); g_slist_free (conn->strings); conn->strings = NULL; first_used = conn->lastnl + 1; } else { conn->strings = g_slist_append (conn->strings, conn->buf + conn->lastnl); } conn->lastnl = tmp - conn->buf; res = conn->buf + conn->pos - tmp; } if (first_used) { if (first_used == conn->pos) { conn->pos = 0; conn->lastnl = 0; } else { tmp = conn->buf + first_used; g_memmove (conn->buf, conn->buf + first_used, conn->pos - first_used); conn->pos -= first_used; conn->lastnl -= first_used; adjust_pointers (conn->strings, conn->buf, tmp); } } if (blocked) { conn->tag = gdk_input_add (conn->fd, GDK_INPUT_READ | GDK_INPUT_EXCEPTION, conn->input_callback, conn); } } } /** return connection to local file */ static struct stat_conn *new_file_conn (struct stat_job *job, const char* file, GdkInputFunction input_callback, struct master *m) { struct stat_conn *conn; char *file2; int fd = -1; file2 = expand_tilde(file); fd = open(file2,O_RDONLY); if(fd == -1) { perror(__FUNCTION__); return NULL; } conn = g_malloc (sizeof (struct stat_conn)); if(!conn) return NULL; conn->buf = g_malloc (BUFFER_MINSIZE); conn->bufsize = BUFFER_MINSIZE; conn->tmpfile = NULL; conn->pid = 0; conn->fd = fd; conn->pos = 0; conn->lastnl = 0; conn->first = TRUE; conn->is_savage = FALSE; conn->strings = NULL; conn->servers = NULL; conn->uservers = NULL; conn->master = m; conn->job = job; job->cons = g_slist_prepend (job->cons, conn); conn->tag = gdk_input_add (conn->fd, GDK_INPUT_READ | GDK_INPUT_EXCEPTION, (GdkInputFunction) input_callback, conn); conn->input_callback = (GdkInputFunction) input_callback; if (file2) g_free(file2); return conn; } /* start_qstat -- Fork and run qstat with the given command line options. Returns a "conn?" */ static struct stat_conn *start_qstat (struct stat_job *job, char *argv[], GdkInputFunction input_callback, struct master *m) { struct stat_conn *conn; pid_t pid; int pipefds[2]; const char error_msg[] = QSTAT_DELIM_STR QSTAT_DELIM_STR "ERROR" QSTAT_DELIM_STR "command not found\n"; debug (3, "start_qstat() -- Job %lx Setting up/forking pipes to qstat", job); debug_cmd (3, argv, "start_qstat() -- Job %lx", job); if (pipe (pipefds) < 0) { failed ("pipe", NULL); return NULL; } pid = fork (); if (pid < (pid_t) 0) { failed ("fork", NULL); return NULL; } if (pid) { /* parent */ close (pipefds[1]); if(set_nonblock (pipefds[0]) == -1) failed("fcntl", NULL); conn = g_malloc (sizeof (struct stat_conn)); conn->buf = g_malloc (BUFFER_MINSIZE); conn->bufsize = BUFFER_MINSIZE; conn->tmpfile = NULL; conn->pid = pid; conn->fd = pipefds[0]; conn->pos = 0; conn->lastnl = 0; conn->first = TRUE; conn->is_savage = FALSE; conn->strings = NULL; conn->servers = NULL; conn->uservers = NULL; conn->master = m; conn->job = job; job->cons = g_slist_prepend (job->cons, conn); conn->tag = gdk_input_add (conn->fd, GDK_INPUT_READ | GDK_INPUT_EXCEPTION, (GdkInputFunction) input_callback, conn); conn->input_callback = (GdkInputFunction) input_callback; } else { /* child */ close (pipefds[0]); dup2 (pipefds[1], 1); close (pipefds[1]); execvp (argv[0], argv); failed ("execvp", argv[0]); write (1, error_msg, sizeof (error_msg) - 1); _exit (1); } return conn; } static void stat_close (struct stat_job *job, int killed) { GSList *tmp; dns_set_callback (NULL, NULL); dns_cancel_requests (); debug (3, "stat_close() -- Job %lx Killed? %d", job, killed); while (job->cons) stat_free_conn ((struct stat_conn *) job->cons->data); if (job->delayed.refresh_handler) gtk_timeout_remove (job->delayed.timeout_id); for (tmp = job->close_handlers; tmp; tmp = tmp->next) (* (close_func) tmp->data) (job, killed); stat_job_free (job); if(event_type == EVENT_REFRESH_SELECTED) { debug (1, "refresh selected done\n"); } if(event_type == EVENT_REFRESH) { debug (1, "refresh done.\n"); play_sound(sound_refresh_done, 0); } if(event_type == EVENT_UPDATE) { debug (1, "update done.\n"); play_sound(sound_update_done, 0); } event_type=0; } static const char delim[] = " \t\n\r"; static struct stat_conn *stat_update_master_qstat (struct stat_job *job, struct master *m) { char *argv[16]; int argi = 0; char buf1[64]; char* arg_type = NULL; char buf3[64]; char buf_rawarg[] = { QSTAT_DELIM, '\0' }; struct stat_conn *conn = NULL; char *cmd = NULL; char *file = NULL; char srcport[12] = {0}; short startprog = 1; debug (3, "stat_update_master_qstat(%p,%p)", job, m); if (!m) return NULL; if (m->url) { if(m->master_type == MASTER_GSLIST) { int ret = 0; startprog = 1; while(current_server_filter > 0 && (cur_filter & FILTER_SERVER_MASK)) { struct server_filter_vars* filter = g_array_index (server_filters, struct server_filter_vars*, current_server_filter-1); size_t bufsize = 2048; char* pos; if(!filter) { xqf_error("filter is NULL"); return NULL; } pos = arg_type = g_new0(char, bufsize); if(filter->game_contains&&*filter->game_contains) { ret = snprintf(pos, bufsize,"(gametype LIKE '%%%s%%')", filter->game_contains); if(ret == -1) break; pos += ret; bufsize -= ret; } if(filter->map_contains&&*filter->map_contains) { if(pos != arg_type) { ret = snprintf(pos, bufsize," AND "); if(ret == -1) break; pos += ret; bufsize -= ret; } ret = snprintf(pos, bufsize,"(mapname LIKE '%%%s%%')", filter->map_contains); if(ret == -1) break; pos += ret; bufsize -= ret; } if(filter->server_name_contains&&*filter->server_name_contains) { if(pos != arg_type) { ret = snprintf(pos, bufsize," AND "); if(ret == -1) break; pos += ret; bufsize -= ret; } ret = snprintf(pos, bufsize,"(hostname LIKE '%%%s%%')", filter->server_name_contains); if(ret == -1) break; pos += ret; bufsize -= ret; } if(filter->filter_not_empty) { if(pos != arg_type) { ret = snprintf(pos, bufsize," AND "); if(ret == -1) break; pos += ret; bufsize -= ret; } ret = snprintf(pos, bufsize,"(numplayers > 0)"); if(ret == -1) break; pos += ret; bufsize -= ret; } if(filter->filter_not_full) { if(pos != arg_type) { ret = snprintf(pos, bufsize," AND "); if(ret == -1) break; pos += ret; bufsize -= ret; } ret = snprintf(pos, bufsize,"(numplayers < maxplayers)"); if(ret == -1) break; pos += ret; bufsize -= ret; } break; } if(ret == -1) { g_free(arg_type); arg_type = NULL; } argv[argi++] = "gslist"; argv[argi++] = "-q"; argv[argi++] = "-o"; argv[argi++] = "5"; if(arg_type) { argv[argi++] = "-f"; argv[argi++] = arg_type; debug(3, "%s", arg_type); } argv[argi++] = "-N"; argv[argi++] = m->options.gsmtype; argv[argi] = NULL; } else if(!strncmp(m->url,master_prefixes[MASTER_FILE],strlen(master_prefixes[MASTER_FILE]))) { startprog = 0; file=strdup_strip(m->url + strlen(master_prefixes[MASTER_FILE])); } else { cmd = strdup_strip (HTTP_HELPER); argv[argi++] = strtok (cmd, delim); while ((argv[argi] = strtok (NULL, delim)) != NULL) argi++; argv[argi++] = m->url; argv[argi] = NULL; } } else { if (m->master_type!=MASTER_LAN && m->master_type != MASTER_GAMESPY && !master_qstat_option(m)) return NULL; argv[argi++] = QSTAT_EXEC; argv[argi++] = "-errors"; if( access(qstat_configfile, R_OK) == 0 ) { argv[argi++] = "-cfg"; argv[argi++] = qstat_configfile; } if(qstat_srcport_low) { snprintf(srcport, sizeof(srcport), "%hu-%hu", qstat_srcport_low, qstat_srcport_high); argv[argi++] = "-srcport"; argv[argi++] = srcport; } if(qstat_srcip) { argv[argi++] = "-srcip"; argv[argi++] = qstat_srcip; } argv[argi++] = "-raw"; argv[argi++] = buf_rawarg; argv[argi++] = "-retry"; argv[argi++] = buf1; g_snprintf (buf1, 64, "%d", maxretries + 2); if(m->master_type==MASTER_LAN) { debug (3, "stat_update_master_qstat() -- MASTER_LAN"); arg_type = g_strdup_printf("%s,outfile", games[m->type].qstat_option); } else if (m->master_type == MASTER_GAMESPY && !master_qstat_option(m)) { arg_type = g_strdup_printf("-gsm,%s,outfile", games[m->type].qstat_str); } // add master arguments else if( games[m->type].flags & GAME_QUAKE3_MASTERPROTOCOL ) { // TODO: master protocol should be server specific const char* masterprotocol = game_get_attribute(m->type,"masterprotocol"); if(masterprotocol && !strcmp(masterprotocol, "auto")) masterprotocol = game_get_attribute(m->type, "_masterprotocol"); if(masterprotocol) arg_type = g_strdup_printf("%s,%s,outfile", master_qstat_option(m),masterprotocol); else { xqf_warning("GAME_QUAKE3_MASTERPROTOCOL flag set, but no protocol specified"); arg_type = g_strdup_printf("%s,outfile", master_qstat_option(m)); } } else if( (games[m->type].flags & GAME_MASTER_STEAM) && current_server_filter > 0 && (cur_filter & FILTER_SERVER_MASK)) { struct server_filter_vars* filter = g_array_index (server_filters, struct server_filter_vars*, current_server_filter-1); if(!filter) { xqf_error("filter is NULL"); return NULL; } arg_type = g_strconcat( master_qstat_option(m), ",outfile", (filter->game_contains&&*filter->game_contains)?",game=":"", (filter->game_contains&&*filter->game_contains)?filter->game_contains:"", (filter->map_contains&&*filter->map_contains)?",map=":"", (filter->map_contains&&*filter->map_contains)?filter->map_contains:"", (filter->filter_not_empty||filter->filter_not_full)?",status=":"", filter->filter_not_empty?"notempty":"", (filter->filter_not_empty&&filter->filter_not_full)?":":"", filter->filter_not_full?"notfull":"", NULL); } else if( m->type == UT2004_SERVER ) { GString* str = NULL; const char* cdkey = game_get_attribute(m->type,"cdkey"); if(!cdkey) { xqf_error(_("UT2004 CD Key not found, cannot query master '%s'.\n" "Make sure the working directory is set correctly."), m->name); goto out; } str = g_string_new(NULL); g_string_sprintf(str, "%s,outfile,cdkey=%s", master_qstat_option(m), cdkey); if(current_server_filter > 0 && (cur_filter & FILTER_SERVER_MASK)) { struct server_filter_vars* filter = g_array_index (server_filters, struct server_filter_vars*, current_server_filter-1); if(filter) { GString* status = g_string_new(NULL); if(filter->filter_not_empty) status = g_string_append(status, "notempty"); if(filter->filter_not_full) status = g_string_append(status, "notfull"); if(filter->filter_no_password) status = g_string_append(status, "nopassword"); if(filter->game_contains&&*filter->game_contains) { g_string_sprintfa(str, ",gametype=%s", filter->game_contains); } if(status->str && *status->str) { g_string_sprintfa(str, ",status=%s", status->str); } g_string_free(status, TRUE); } } else { str = g_string_append(str, ",status=nostandard"); } arg_type = str->str; g_string_free(str, FALSE); } else { arg_type = g_strdup_printf ("%s,outfile", master_qstat_option(m)); } argv[argi++] = arg_type; argv[argi++] = buf3; g_snprintf (buf3, 64, "%s%s:%d,-", m->master_type==MASTER_LAN?"+":"" ,inet_ntoa (m->host->ip), m->port); argv[argi] = NULL; } /* if (m->url) */ if(argi >= sizeof(argv)) xqf_error("FIXME: argi too big, stack corrupt"); if(startprog) { if (get_debug_level() > 3){ char **argptr = argv; fprintf (stderr, "stat_update_master_qstat: EXEC> "); while (*argptr) fprintf (stderr, "%s ", *argptr++); fprintf (stderr, "\n"); } conn = start_qstat (job, argv, (GdkInputFunction) stat_master_input_callback, m); } else if(file) { conn = new_file_conn (job, file, (GdkInputFunction) stat_master_input_callback, m); g_free (file); } out: g_free (cmd); g_free (arg_type); return conn; } #define MAX_SERVERS_IN_CMDLINE 8 static struct stat_conn *stat_open_conn_qstat (struct stat_job *job) { struct server *s = NULL; char *argv[16 + MAX_SERVERS_IN_CMDLINE*2]; int argi = 0; char buf[64 + MAX_SERVERS_IN_CMDLINE*64]; int bufi = 0; char *fn = NULL; GSList *tmp; struct stat_conn *conn; char srcport[12] = {0}; if (!job->servers) return NULL; /* The g_slist_reverse does not allocate any new lists or memory. However, it means that job->servers will point to a different member. */ debug (6, "stat_open_conn_qstat() -- server list was %lx", job->servers ); job->servers = g_slist_reverse (job->servers); debug (6, "stat_open_conn_qstat() -- server list now %lx", job->servers ); argv[argi++] = QSTAT_EXEC; argv[argi++] = "-errors"; if( access(qstat_configfile, R_OK) == 0 ) { argv[argi++] = "-cfg"; argv[argi++] = qstat_configfile; } if(qstat_srcport_low) { snprintf(srcport, sizeof(srcport), "%hu-%hu", qstat_srcport_low, qstat_srcport_high); argv[argi++] = "-srcport"; argv[argi++] = srcport; } if(qstat_srcip) { argv[argi++] = "-srcip"; argv[argi++] = qstat_srcip; } argv[argi++] = "-maxsimultaneous"; argv[argi++] = &buf[bufi]; bufi += 1 + g_snprintf (&buf[bufi], sizeof (buf) - bufi, "%d", maxsimultaneous); argv[argi++] = "-retry"; argv[argi++] = &buf[bufi]; bufi += 1 + g_snprintf (&buf[bufi], sizeof (buf) - bufi, "%d", maxretries); argv[argi++] = "-raw"; argv[argi++] = &buf[bufi]; bufi += 1 + g_snprintf (&buf[bufi], sizeof (buf) - bufi, "%c", QSTAT_DELIM); argv[argi++] = "-R"; argv[argi++] = "-P"; argv[argi++] = "-carets"; if (g_slist_length (job->servers) <= MAX_SERVERS_IN_CMDLINE) { for (tmp = job->servers; tmp; tmp = tmp->next) { s = (struct server *) tmp->data; if (games[s->type].qstat_option) argv[argi++] = games[s->type].qstat_option; argv[argi++] = &buf[bufi]; bufi += 1 + g_snprintf (&buf[bufi], sizeof (buf) - bufi, "%s:%d", inet_ntoa (s->host->ip), s->port); } } else { int fd = -1; FILE* f = NULL; argv[argi++] = "-f"; fn = &buf[bufi]; bufi += 1 + g_snprintf(fn, sizeof (buf) - bufi, "%s/xqf-qstat.XXXXXX", g_get_tmp_dir ()); argv[argi++] = fn; fd = mkstemp(fn); if (fd < 0 || !(f = fdopen(fd, "w"))) { dialog_ok (NULL, _("Failed to create a temporary file %s: %s"), fn, strerror(errno)); return NULL; } for (tmp =job-> servers; tmp; tmp = tmp->next) { s = (struct server *) tmp->data; fprintf (f, "%s %s:%d\n", games[s->type].qstat_str, inet_ntoa (s->host->ip), s->port); } fclose (f); } argv[argi] = NULL; if(argi >= sizeof(argv)) xqf_error("FIXME: argi too big, stack corrupt"); conn = start_qstat (job, argv, (GdkInputFunction) stat_servers_input_callback, NULL); if (conn && fn) conn->tmpfile = g_strdup (fn); return conn; } // compare pointers static gint compare_ptr (gconstpointer s1, gconstpointer s2) { if(s1==s2) return 0; else if(s1state = state; debug (1, "stat_master_update_done(%s) -- status %d\n", (conn)? conn->master->name : "(null)", state); if (state == SOURCE_UP && conn) { debug (3, "stat_master_update_done -- state == SOURCE_UP && conn"); server_list_free (m->servers); // m->servers = g_slist_reverse (conn->servers); m->servers = slist_sort_remove_dups(conn->servers,compare_ptr,(server_unref_void)server_unref); conn->servers = NULL; userver_list_free (m->uservers); // m->uservers = g_slist_reverse (conn->uservers); m->uservers = slist_sort_remove_dups(conn->uservers,compare_ptr,(userver_unref_void)userver_unref); conn->uservers = NULL; if (default_refresh_on_update) job->need_refresh = TRUE; } if (conn) stat_free_conn (conn); job->need_redraw = TRUE; /* job->delayed.queued_servers = server_list_append_list ( job->delayed.queued_servers, m->servers, UNKNOWN_SERVER); job->servers = server_list_append_list (job->servers, m->servers, UNKNOWN_SERVER); job->names = userver_list_append_list (job->names, m->uservers, UNKNOWN_SERVER); */ for (tmp = m->servers; tmp; tmp = tmp->next) { struct server* s = tmp->data; job->delayed.queued_servers = g_slist_prepend(job->delayed.queued_servers, s); job->servers = g_slist_prepend(job->servers, s); server_ref(s); server_ref(s); } for (tmp = m->uservers; tmp; tmp = tmp->next) { struct userver *us = tmp->data; job->names = g_slist_prepend(job->names,us); userver_ref(us); } job->delayed.queued_servers = slist_sort_remove_dups(job->delayed.queued_servers, compare_ptr,(server_unref_void)server_unref); job->servers = slist_sort_remove_dups(job->servers,compare_ptr,(server_unref_void)server_unref); job->names = slist_sort_remove_dups(job->names,compare_ptr,(userver_unref_void)userver_unref); debug (3, "stat_master_update_done -- job->master_handlers = %p",job->master_handlers); for (tmp = job->master_handlers; tmp; tmp = tmp->next) (* (master_func) tmp->data) (job, m); job->progress.done++; if (m->type == Q2_SERVER && !m->url) job->q2_masters--; } static void stat_update_masters (struct stat_job *job) { struct master *m; GSList *tmp; int freecons; freecons = maxsimultaneous - job->masters_to_resolve - g_slist_length (job->cons); debug (3, "stat_update_masters(%p) -- freecons: %d", job,freecons); tmp = job->masters; while (tmp && freecons > 0) { m = (struct master *) tmp->data; if (m->host || m->url) { if (m->type == Q2_SERVER && !m->url) { /* * QStat binds himself to fixed port (26500) to access Q2 masters. * It's impossible to run several QStat programs concurently for * Q2 masters. */ if (job->q2_masters > 0) { tmp = tmp->next; continue; } job->q2_masters++; } tmp = job->masters = g_slist_remove (job->masters, m); if (!stat_update_master_qstat (job, m)) stat_master_update_done (NULL, job, m, SOURCE_ERROR); else freecons--; continue; } tmp = tmp->next; } if (job->masters == NULL && job->cons == NULL) stat_next (job); } static void stat_master_resolved_callback (char *id, struct host *h, enum dns_status status, void *data) { struct stat_job *job = (struct stat_job *) data; struct master *m; GSList *list; enum master_state state; debug (3, "stat_master_resolved_callback(%s,%p,%d,%p)", id, h,status,data); if (!job || !id) return; job->masters_to_resolve--; job->progress.done++; list = job->masters; while (list) { m = (struct master *) list->data; if (m->host == NULL && m->hostname && strcmp (m->hostname, id) == 0) { if (h) { m->host = h; host_ref (h); } else { list = job->masters = g_slist_remove (job->masters, m); if (status == DNS_STATUS_TIMEOUT || status == DNS_STATUS_ERROR) state = SOURCE_TIMEOUT; else /* DNS_STATUS_NOTFOUND, etc... */ state = SOURCE_ERROR; stat_master_update_done (NULL, job, m, state); continue; } } list = list->next; } stat_update_masters (job); } // ip for hostname resolved static void stat_name_resolved_callback (char *id, struct host *h, enum dns_status status, void *data) { struct stat_job *job = (struct stat_job *) data; struct userver *us; GSList *list; GSList *tmp; debug (6, "%s,%p,%d,%p",id,h,status,data); if (!job || !id) return; list = job->names; while (list) { us = (struct userver *) list->data; if (strcmp (us->hostname, id) == 0) { if (h) userver_set_host (us, h); /* automatically add it to the list of servers to refresh */ if (us->s) { if (us->s->type != us->type) { us->s->type = us->type; server_free_info (us->s); } /* o When the job is freed, the list will be freed as well. This will take care of the reference counting. */ job->servers = server_list_prepend (job->servers, us->s); } for (tmp = job->name_handlers; tmp; tmp = tmp->next) (* (name_func) tmp->data) (job, us, status); // TODO optimizable, no need to start from start of list. on the other // hand, it's unlikely that the list is big anyway... list = job->names = g_slist_remove (job->names, us); userver_unref (us); continue; } list = list->next; } if (job->names == NULL) { dns_set_callback (NULL, NULL); stat_next (job); } } static void stat_host_resolved_callback (char *id, struct host *h, enum dns_status status, void *data) { struct stat_job *job = (struct stat_job *) data; GSList *tmp; if (!job || !id || !h) return; if (status == DNS_STATUS_OK) { job->need_redraw = TRUE; job->delayed.queued_hosts = host_list_add (job->delayed.queued_hosts, h); job->progress.done++; } for (tmp = job->host_handlers; tmp; tmp = tmp->next) (* (host_func) tmp->data) (job, h, status); job->hosts = g_slist_remove (job->hosts, h); host_unref (h); if (job->hosts == NULL) { dns_set_callback (NULL, NULL); stat_next (job); } } static void change_state (struct stat_job *job, enum stat_state state) { GSList *tmp; for (tmp = job->state_handlers; tmp; tmp = tmp->next) (* (state_func) tmp->data) (job, state); } static void move_q2masters_to_top (GSList **list) { GSList *q2masters = NULL; GSList *tmp = *list; struct master *m; while (tmp) { m = (struct master *) tmp->data; tmp = tmp->next; if (!m->url && m->type == Q2_SERVER) { *list = g_slist_remove (*list, m); q2masters = g_slist_append (q2masters, m); } } *list = g_slist_concat (q2masters, *list); } static void stat_next_masters (struct stat_job *job) { GSList *list = NULL; GSList *tmp = NULL; GSList *hostnames = NULL; struct master *m = NULL; debug_increase_indent(); debug (3, "Job %lx Have job->masters", job ); job->state = STAT_UPDATE_SOURCE; move_q2masters_to_top (&job->masters); // store all unresolved hostnames in hostnames for (list = job->masters; list; list = list->next) { m = (struct master *) list->data; if (!m->host && m->hostname) { for (tmp = hostnames; tmp; tmp = tmp->next) { if (strcmp (tmp->data, m->hostname) == 0) break; } if (tmp == NULL) { hostnames = g_slist_prepend (hostnames, m->hostname); } } } job->masters_to_resolve = g_slist_length (hostnames); job->progress.tasks = -1; change_state (job, STAT_UPDATE_SOURCE); if (hostnames) { dns_set_callback (stat_master_resolved_callback, job); for (list = hostnames; list; list = list->next) dns_lookup ((char *) list->data); g_slist_free (hostnames); hostnames = NULL; } stat_update_masters (job); debug_decrease_indent(); return; } static void stat_next_names (struct stat_job *job) { GSList *list = NULL; GSList *tmp = NULL; GSList *hostnames = NULL; struct userver *us = NULL; debug (3, "Job %lx job->names", job ); job->state = STAT_RESOLVE_NAMES; for (list = job->names; list; list = list->next) { us = (struct userver *) list->data; for (tmp = hostnames; tmp; tmp = tmp->next) { if (strcmp (tmp->data, us->hostname) == 0) break; } if (tmp == NULL) { hostnames = g_slist_prepend (hostnames, us->hostname); } } dns_set_callback (stat_name_resolved_callback, job); job->progress.tasks = g_slist_length (hostnames); change_state (job, STAT_RESOLVE_NAMES); for (list = hostnames; list; list = list->next) dns_lookup ((char *) list->data); g_slist_free (hostnames); hostnames = NULL; return; } static void stat_next_servers (struct stat_job *job) { debug (3, "Servers: Job %lx server list %lx", job, job->servers ); if (!job->need_refresh) { stat_close (job, FALSE); return; } job->state = STAT_REFRESH_SERVERS; if (default_resolve_on_update) job->hosts = merge_hosts_to_resolve (job->hosts, job->servers); job->progress.tasks = g_slist_length (job->servers); change_state (job, STAT_REFRESH_SERVERS); if (!stat_open_conn_qstat (job)) { /* It's very bad, stop everything. */ xqf_error ("Error! Could not stat_open_conn_qstat()"); stat_close (job, TRUE); } return; } static void stat_next_hosts (struct stat_job *job) { GSList *list = NULL; struct host *h = NULL; debug (3, "Job %p job->hosts", job); job->state = STAT_RESOLVE_HOSTS; dns_set_callback (stat_host_resolved_callback, job); job->progress.tasks = g_slist_length (job->hosts); change_state (job, STAT_RESOLVE_HOSTS); for (list = job->hosts; list; list = list->next) { h = (struct host *) list->data; if (h) dns_lookup (inet_ntoa (h->ip)); } return; } static void stat_next (struct stat_job *job) { debug_increase_indent(); debug (3, "Job %p",job); job->progress.done = 0; if (job->masters) { stat_next_masters(job); } else if (job->names) { stat_next_names(job); } else if (job->servers) { stat_next_servers(job); } else if (job->hosts) { stat_next_hosts(job); } else { debug (3, "Job %p Done, Closing the job...", job); stat_close (job, FALSE); } debug_decrease_indent(); } void stat_start (struct stat_job *job) { debug_increase_indent(); debug (3, "Job %p", job); if (job->delayed.refresh_handler) { job->delayed.timeout_id = gtk_timeout_add (1000, job->delayed.refresh_handler, job); } stat_next (job); debug_decrease_indent(); } void stat_stop (struct stat_job *job) { debug (3, "Job %lx", job); stat_close (job, TRUE); } struct stat_job *stat_job_create (GSList *masters, GSList *names, GSList *servers, GSList *hosts) { struct stat_job *job; job = g_malloc (sizeof (struct stat_job)); debug (3, "New Job %lx Server List %lx", job, servers); job->masters = masters; job->hosts = hosts; job->servers = servers; job->names = names; job->cons = NULL; job->master_handlers = NULL; job->server_handlers = NULL; job->host_handlers = NULL; job->name_handlers = NULL; job->state_handlers = NULL; job->close_handlers = NULL; job->delayed.queued_servers = NULL; job->delayed.queued_hosts = NULL; job->delayed.refresh_handler = NULL; job->delayed.timeout_id = 0; job->progress.tasks = -1; job->progress.done = 0; job->need_refresh = (masters && default_refresh_on_update) || (!masters && (servers || names)); job->need_redraw = FALSE; job->masters_to_resolve = 0; job->q2_masters = 0; job->data = NULL; return job; } void stat_job_free (struct stat_job *job) { debug (3, "Job %lx server list %lx", job, job->servers); if (job->masters) g_slist_free (job->masters); if (job->servers) server_list_free (job->servers); if (job->hosts) host_list_free (job->hosts); if (job->names) userver_list_free (job->names); g_slist_free (job->master_handlers); g_slist_free (job->server_handlers); g_slist_free (job->host_handlers); g_slist_free (job->name_handlers); g_slist_free (job->state_handlers); g_slist_free (job->close_handlers); if (job->delayed.queued_servers) server_list_free (job->delayed.queued_servers); if (job->delayed.queued_hosts) host_list_free (job->delayed.queued_hosts); #ifdef DEBUG if (job->data) { fprintf (stderr, "stat.c: stat_job_free() -- \'data\' must be NULL!\n"); } #endif g_free (job); } xqf-1.0.5/src/stat.h0000644002404400000620000000725507742777136011200 00000000000000/* XQF - Quake server browser and launcher * Copyright (C) 1998-2000 Roman Pozlevich * * 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 */ #ifndef __QSTAT_H__ #define __QSTAT_H__ #include /* pid_t */ #include #include "xqf.h" #include "dns.h" #ifndef HTTP_HELPER # define HTTP_HELPER "wget -t 1 -T 20 -q -e robots=off --user-agent=XQF/" VERSION " -O -" #endif #define QSTAT_DELIM '\t' #define QSTAT_DELIM_STR "\t" #define QSTAT_MASTER_DELIM ' ' #define BUFFER_MINSIZE 1024 #define BUFFER_MAXSIZE (128*1024) #define BUFFER_TRESHOLD 64 // EVENT_* used to decide what sound to play #define EVENT_REFRESH_SELECTED 1 #define EVENT_REFRESH 2 #define EVENT_UPDATE 3 struct stat_job; struct stat_conn { pid_t pid; int fd; int tag; GdkInputFunction input_callback; char *buf; int bufsize; int pos; int lastnl; GSList *strings; /* a list of strings in `buf' */ GSList *servers; GSList *uservers; struct master *master; struct stat_job *job; char *tmpfile; // UGLY HACKS gboolean first; // marker for savage check header gboolean is_savage; // true if file is in savage format }; struct delayed_refresh { GSList *queued_servers; GSList *queued_hosts; GtkFunction refresh_handler; unsigned timeout_id; }; struct stat_progress { int tasks; int done; }; enum stat_state { STAT_RESOLVE_NAMES, STAT_UPDATE_SOURCE, STAT_REFRESH_SERVERS, STAT_RESOLVE_HOSTS }; typedef void (*master_func) (struct stat_job *job, struct master *m); typedef void (*server_func) (struct stat_job *job, struct server *s); typedef void (*host_func) (struct stat_job *job, struct host *h, enum dns_status status); typedef void (*name_func) (struct stat_job *job, struct userver *us, enum dns_status status); typedef void (*state_func) (struct stat_job *job, enum stat_state state); typedef void (*close_func) (struct stat_job *job, int killed); struct stat_job { GSList *masters; /* GSList */ GSList *servers; /* GSList */ GSList *hosts; /* GSList */ GSList *names; /* GSList */ GSList *cons; /* open connections */ GSList *master_handlers; GSList *server_handlers; GSList *host_handlers; GSList *name_handlers; GSList *state_handlers; GSList *close_handlers; struct delayed_refresh delayed; struct stat_progress progress; int need_refresh; int need_redraw; int masters_to_resolve; int q2_masters; enum stat_state state; gpointer data; /* arbitrary data */ }; extern void parse_saved_server (GSList *strings); extern void stat_start (struct stat_job *job); extern void stat_stop (struct stat_job *job); extern struct stat_job *stat_job_create (GSList *masters, GSList *names, GSList *servers, GSList *hosts); extern void stat_job_free (struct stat_job *job); #endif /* __QSTAT_H__ */ xqf-1.0.5/src/libxqf_dummy_GeoIP_stubs.c0000644002404400000620000000210010174271152015117 00000000000000/* XQF - Quake server browser and launcher * Dummy functions for GeoIP * Copyright (C) 2005 Ludwig Nussel * * 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 */ #include const char GeoIP_country_code[247][3]; const char * GeoIP_country_name[247]; GEOIP_API GeoIP* GeoIP_new(int flags) { return 0; } GEOIP_API GeoIP* GeoIP_open(const char * filename, int flags) { return 0; } xqf-1.0.5/src/utils.c0000644002404400000620000005714510445245312011337 00000000000000/* XQF - Quake server browser and launcher * Copyright (C) 1998-2000 Roman Pozlevich * * 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 */ #include "gnuconfig.h" #include /* getpwnam, readdir, dirent */ #include /* FILE, putc */ #include /* strlen, strncpy, strcmp, strspn, strcspn, strchr */ #include /* isspace */ #include /* getpwnam */ #include /* strtol */ #include /* readdir, dirent */ #include /* sigaction, sigemptyset */ #include /* tolower */ #include /* stat */ #include /* access */ #include /* fcntl */ #include #include #include #include #include "utils.h" #include "debug.h" #include "i18n.h" static char* _find_file_in_path(const char* files, gboolean relative); static char* _find_file_in_path_list(char** binaries, gboolean relative); short strtosh (const char *str) { long tmp; tmp = strtol (str, NULL, 10); return CLAMP (tmp, G_MINSHORT, G_MAXSHORT); } unsigned short strtoush (const char *str) { long tmp; tmp = strtol (str, NULL, 10); return CLAMP (tmp + G_MINSHORT, G_MINSHORT, G_MAXSHORT) - G_MINSHORT; } char *strdup_strip (const char *str) { const char *start; const char *end; char *res; if (!str) return NULL; for (start = str; *start && isspace (*start); start++); if (!strlen(str)) return NULL; for (end = str + strlen (str) - 1; end >= start && isspace (*end); end--); if (start > end) return NULL; res = g_malloc (end - start + 1 + 1); strncpy (res, start, end - start + 1); res[end - start + 1] = '\0'; return res; } // concatenate dir and file, insert slash if necessary // returned string must be freed manually char *file_in_dir (const char *dir, const char *file) { char *res, *tmp; int need_slash = 0; if (!dir || dir[0] == '\0') /* dir "" is current dir */ return (file)? g_strdup (file) : NULL; if (!file) return g_strdup (dir); if (dir[strlen (dir) - 1] != G_DIR_SEPARATOR) need_slash = 1; tmp = res = g_malloc0 (strlen (dir) + strlen (file) + need_slash + 1); strcpy (tmp, dir); tmp += strlen (dir); if (need_slash) *tmp++ = G_DIR_SEPARATOR; strcpy (tmp, file); return res; } int str_isempty (const char *str) { if (!str) return TRUE; for (; *str; str++) if (!isspace (*str)) return FALSE; return TRUE; } #define MAXNAMELEN 256 char *expand_tilde (const char *path) { char *res = NULL; char *slash; char name[MAXNAMELEN]; int namelen; struct passwd *pwd; if (path) { if (path[0] == '~') { if (path[1] == '\0') { res = g_strdup (g_get_home_dir ()); } else if (path[1] == G_DIR_SEPARATOR) { res = file_in_dir (g_get_home_dir (), path + 2); } else { slash = strchr (&path[1], G_DIR_SEPARATOR); if (slash) namelen = slash - &path[1]; else namelen = strlen (&path[1]); if (namelen > MAXNAMELEN) namelen = MAXNAMELEN - 1; strncpy (name, &path[1], namelen); name[namelen] = '\0'; pwd = getpwnam (name); if (pwd) res = file_in_dir (pwd->pw_dir, path + 2 + namelen); else res = g_strdup (path); } } else { res = g_strdup (path); } } #ifdef DEBUG fprintf (stderr, "Tilde expansion: %s -> %s\n", path, res); #endif return res; } /* * Directory Scaning */ GList *dir_to_list (const char *dirname, char * (*filter) (const char *, const char *)) { DIR *directory; struct dirent *dirent_ptr; GList *list = NULL; char *str; if(!dirname) return NULL; directory = opendir (dirname); if (directory == NULL) return NULL; while ((dirent_ptr = readdir (directory)) != NULL) { if (filter) str = filter (dirname, dirent_ptr->d_name); else str = g_strdup (dirent_ptr->d_name); if (str) list = g_list_prepend (list, str); } closedir (directory); return g_list_sort (list, (GCompareFunc) strcmp); } /* * Lists */ GList *merge_sorted_string_lists (GList *list1, GList *list2) { GList *res = NULL; GList *ptr1; GList *ptr2; int cmpres; ptr1 = list1; ptr2 = list2; while (ptr1 && ptr2) { cmpres = strcmp ((char *) ptr1->data, (char *) ptr2->data); if (cmpres == 0) { res = g_list_prepend (res, ptr1->data); g_free (ptr2->data); ptr1 = ptr1->next; ptr2 = ptr2->next; } else { if (cmpres < 0) { res = g_list_prepend (res, ptr1->data); ptr1 = ptr1->next; } else { res = g_list_prepend (res, ptr2->data); ptr2 = ptr2->next; } } } while (ptr1) { res = g_list_prepend (res, ptr1->data); ptr1 = ptr1->next; } while (ptr2) { res = g_list_prepend (res, ptr2->data); ptr2 = ptr2->next; } res = g_list_reverse (res); g_list_free (list1); g_list_free (list2); return res; } GSList *unique_strings (GSList *strings) { GSList *result = NULL; GSList *tmp; while (strings) { for (tmp = result; tmp; tmp = tmp->next) { if (strcmp ((char *) tmp->data, (char *) strings->data)) result = g_slist_prepend (result, strings->data); } strings = strings->next; } return result; } // build GList from array of char* GList* createGListfromchar(char* strings[]) { GList *list = NULL; char** ptr = NULL; for(ptr=strings;ptr&&*ptr;ptr++) { list = g_list_append (list, *ptr); } return list; } /* * Signals */ void on_sig (int signum, void (*func) (int signum)) { struct sigaction action; action.sa_handler = func; sigemptyset (&action.sa_mask); action.sa_flags = (signum == SIGCHLD)? SA_RESTART | SA_NOCLDSTOP : SA_RESTART; sigaction (signum, &action, NULL); } void ignore_sigpipe (void) { on_sig (SIGPIPE, SIG_IGN); } /* * String Output */ void print_dq_string (FILE *f, const unsigned char *ptr) { if (!f) return; putc ('\"', f); while (ptr && *ptr) { switch (*ptr) { case '\n': putc ('\\', f); putc ('n', f); break; case '\t': putc ('\\', f); putc ('t', f); break; case '\r': putc ('\\', f); putc ('r', f); break; case '\b': putc ('\\', f); putc ('b', f); break; case '\f': putc ('\\', f); putc ('f', f); break; case '\\': case '\'': case '\"': putc ('\\', f); putc (*ptr, f); break; default: if (*ptr >= 0x20 && *ptr != 0x7F) putc (*ptr, f); else fprintf (f, "\\%03o", *ptr); break; } ptr++; } putc ('\"', f); } char *lowcasestrstr (const char *str, const char *substr) { int slen; int sublen; const char *end; int i; if (!str || !substr) return NULL; slen = strlen (str); sublen = strlen (substr); if (slen < sublen) return NULL; end = &str[slen - sublen + 1]; while (str < end) { for (i = 0; i < sublen; i++) { if (tolower (substr[i]) != tolower (str[i])) goto loop; } return (char *) str; loop: str++; } return NULL; } /* * Parse string to tokens */ int tokenize (char *str, char *token[], int max, const char *dlm) { int num = 0; while (str && num < max) { str += strspn (str, dlm); if (*str == '\0') break; token[num++] = str; if (num == max) break; str += strcspn (str, dlm); if (*str == '\0') break; *str++ = '\0'; } return num; } int safe_tokenize (const char *str, char *token[], int max, const char *dlm) { int num = 0; while (str && num < max) { str += strspn (str, dlm); if (*str == '\0') break; token[num++] = (char *) str; str += strcspn (str, dlm); } return num; } int tokenize_bychar (char *str, char *token[], int max, char dlm) { int num = 0; if (!str || str[0] == '\0') return 0; while (str && num < max) { token[num++] = str; str = strchr (str, dlm); if (str) *str++ = '\0'; } return num; } int hostname_is_valid (const char *hostname) { const char *ptr; if (!hostname) return FALSE; for (ptr = hostname; *ptr; ptr++) { if (*ptr != '.' && *ptr != '-' && (*ptr < '0' || *ptr > '9') && (*ptr < 'a' || *ptr > 'z') && (*ptr < 'A' || *ptr > 'Z')) { #ifdef DEBUG fprintf (stderr, "Host name is not valid: %s\n", hostname); #endif return FALSE; } } return TRUE; } char* find_server_setting_for_key (char *key, char **info_ptr){ char **ptr; if (key == NULL || info_ptr == NULL) return (NULL); for (ptr = info_ptr; ptr && *ptr; ptr += 2) { if( strcasecmp (*ptr, key) == 0){ debug( 3, "find_server_setting_for_key() -- Found key '%s' with value '%s'", key, *(ptr+1) ); return (*(ptr+1)); } else { debug( 8, "Key '%s' w/val '%s' did not match '%s'", *ptr, *(ptr+1), key); } } return (NULL); } // returns true if str is "true", false otherwise int str2bool(const char* str) { if(!str) return FALSE; if(!strcasecmp(str,"true")) { return TRUE; } return FALSE; } // return "false" if i == 0, "true" otherwise const char* bool2str(int i) { if(!i) { return "false"; } return "true"; } /** find executable file in $PATH. file is a colon seperated list of * executables to search for. return name of first found file, NULL otherwise * must be freed manually */ char* find_file_in_path(const char* files) { return _find_file_in_path(files, FALSE); } char* find_file_in_path_relative(const char* files) { return _find_file_in_path(files, TRUE); } char* find_file_in_path_list(char** files) { return _find_file_in_path_list(files, FALSE); } char* find_file_in_path_list_relative(char** files) { return _find_file_in_path_list(files, TRUE); } /** @param binaries NULL terminated list of strings */ static char* _find_file_in_path_list(char** binaries, gboolean relative) { char* path = NULL; int i = 0, j = 0; char** directories = NULL; char* found = NULL; path = getenv("PATH"); if(!binaries) return NULL; if(!path) return NULL; directories = g_strsplit(path,":",0); for(i=0; binaries[i] && !found; i++) { // debug(0,"search for %s",binaries[i]); for(j=0; directories[j] && !found; j++) { // debug(0,"search in %s",directories[j]); char *file = file_in_dir (directories[j], binaries[i]); if(!file) continue; if(!access(file,X_OK)) { // If directory name is blank, don't add a / - happens if // a complete path was passed if (!relative && strlen(directories[j])) found = g_strconcat(directories[j],"/",binaries[i],NULL); else found = g_strdup(binaries[i]); debug(3,"found %s in %s",binaries[i],directories[j]); } g_free(file); } } g_strfreev(directories); return found; } static char* _find_file_in_path(const char* files, gboolean relative) { char** binaries = NULL; char* found = NULL; binaries = g_strsplit(files,":",0); found = _find_file_in_path_list(binaries, relative); g_strfreev(binaries); return found; } /** find a directory inside another, prefer matching case otherwise search case insensitive * @param basegamedir where to search * @param game directory to search for * @param match_result output: 0 = not found, 1 = exact match, 2 = differnet case match * @returns name of found directory or NULL, must be freed manually */ char *find_game_dir (const char *basegamedir, const char *game, int *match_result) { DIR *dp = NULL; struct stat buf = {0}; char *path = NULL; char* ret = NULL; int result = 0; if(!game || !basegamedir) return NULL; debug( 3, "Looking for subdir %s in %s", game, basegamedir); // Look for exact match path = file_in_dir (basegamedir, game); if (!stat (path, &buf) && S_ISDIR(buf.st_mode)) { debug( 3, "Found exact match for subdir %s in %s", game, basegamedir); result = 1; // Exact match ret = g_strdup(game); } g_free (path); // Did not find exact match, perform search if(!ret) { debug( 3, "Did not find exact match for subdir %s in %s", game, basegamedir); debug( 3, "Searching for subdir %s in %s ignoring case", game, basegamedir); dp = opendir (basegamedir); if(!dp) { debug( 3, "Could not open base directory %s!", basegamedir); } else { struct dirent *ep; while ((ep = readdir (dp))) { char* name = ep->d_name; if (!strcmp(name, ".") || !strcmp(name,"..")) continue; path = file_in_dir(basegamedir, name); if(stat(path, &buf) == -1) { g_free(path); continue; } g_free(path); if (!S_ISDIR(buf.st_mode)) continue; if (!g_strcasecmp(name, game)) { debug( 3, "Found subdir %s in %s that matches %s", ep->d_name, basegamedir, game); result = 2; // Different case match ret = g_strdup (name); break; } } closedir (dp); } } if(!ret) debug( 3, "Could not find any match for subdir %s in %s.",game, basegamedir); if(match_result) *match_result = result; return ret; } /** sort list and remove duplicates * @param list list to sort * @compare_func function to use for comparing * @unref_func function to call for each deleted entry * @return sorted list without duplicates */ GSList* slist_sort_remove_dups(GSList* list, GCompareFunc compare_func, void (*unref_func)(void*)) { int i; GSList* serverlist = NULL; GSList* serverlistnext = NULL; if(!list) return NULL; list = serverlist = g_slist_sort (list, compare_func); i = 0; while(serverlist) { serverlistnext=serverlist->next; if(!serverlistnext) { // last element, quit loop serverlist = serverlistnext; } else if(!compare_func(serverlist->data,serverlistnext->data)) { GSList* dup = serverlistnext; serverlistnext = g_slist_remove_link(serverlistnext, dup); serverlist->next = serverlistnext; if(unref_func) unref_func(dup->data); g_slist_free_1(dup); } else { serverlist= serverlistnext; } i++; } debug(2,"number of servers %d",i); return list; } /** \brief determine directory for game binary * * Extracts the path from path using the following rules: * - If path is a symlink: * - If pointed to file contains '..', just stop, otherwise strip filename and * store as directory * - If there is no /'s in the pointed to file, use the original path instead and * strip filename and store as directory * * - If path is not a symlink: * - strip filename and store as directory * * Path can be either a file or a directory * * Examples: * * path: /usr/bin/quake2 symlink to /games/quake2/quake2 * result: /games/quake2/ * * path: /usr/bin/quake symlink to ../../games/quake2/quake2 * result: (stops - leaves as-is) * * path: /games/quake2/quake2 * result: /games/quake2/ * * path: quake2 * result: search $PATH for binary then use above rules * * path: ~/bin/quake2 * result: expand tilde then use above rules * * @returns game direcory or NULL. must be freed */ char* resolve_path(const char* path) { struct stat statbuf; int length = 0; char buf[256]; char *ptr = NULL; char *dir = NULL; char* tmp = NULL; if(!path || !*path) return NULL; if(path[0] == '~') { tmp = expand_tilde(path); path = tmp; } else if(path[0] != '/') { tmp = find_file_in_path(path); if(!tmp) { debug(3, "%s not found in $PATH", path); return NULL; } path = tmp; } if(lstat(path, &statbuf) == -1) { debug(3, "lstat on %s failed", path); g_free(tmp); return NULL; } if ( S_ISLNK(statbuf.st_mode) == 1) { // Grab directory from sym link of cmd_entry debug(3, "path is a sym link"); length = readlink (path, buf, sizeof(buf) - 1); if (length > 0) { buf[length]='\0'; if(buf[length-1] == '/') buf[length-1] = '\0'; ptr = strrchr(buf, '/'); if (ptr) { // contains a / so pull from symlink if (!strstr(buf,"..")) { // don't bother if it's got any ..'s in it dir = g_strndup(buf, ptr-buf+1); } } else { // no / so pull from path instead ptr = strrchr(path, '/'); if (ptr) { // contains a / dir = g_strndup(path, ptr-path+1); } } } } else { // Grab directory from cmd_entry debug(3,"path is NOT a sym link"); ptr = strrchr(path, '/'); if (ptr) // contains a / { gboolean dir_is_path = FALSE; char* PATH = getenv("PATH"); // ignore direcory if it is in $PATH. It doesn't make sense to suggest // /usr/bin as game direcory if(PATH) { int i; char** directories = g_strsplit(PATH,":",0); char* basedir = g_strndup(path, ptr-path); for(i=0; directories[i]; ++i) { if(!strcmp(directories[i], basedir)) { dir_is_path = TRUE; break; } } g_strfreev(directories); g_free(basedir); } if(!dir_is_path) { dir = tmp; tmp = NULL; } else debug(3, "found directory %s in $PATH, ignoring", tmp); } } g_free(tmp); return dir; } /** workaround to prevent gcc from complaining about %c as suggested by "man strftime" */ static inline size_t my_strftime(char *s, size_t max, const char *fmt, const struct tm *tm) { return strftime(s, max, fmt, tm); } // return locale's string representation of t. must be freed manually char* timet2string(const time_t* t) { enum { timebuf_len = 128 }; char timebuf[timebuf_len] = {0}; struct tm tm_s; char* str; gmtime_r(t,&tm_s); if(!my_strftime(timebuf,timebuf_len,"%c",&tm_s)) { // error converting time to string representation, shouldn't happen str=_(""); } else str = timebuf; return strdup(str); } int set_nonblock (int fd) { int flags; flags = fcntl (fd, F_GETFL, 0); if (flags < 0 || fcntl (fd, F_SETFL, flags | O_NONBLOCK) < 0) { return -1; } return 0; } // TODO: code is generic enough to move into separate file #if !defined(RCON_STANDALONE) int start_prog_and_return_fd(char *const argv[], pid_t *pid) { int pipefds[2]; *pid = -1; if (pipe (pipefds) < 0) { xqf_error("error creating pipe: %s",strerror(errno)); return -1; } *pid = fork(); if (*pid < (pid_t) 0) { xqf_error("fork failed: %s",strerror(errno)); return -1; } if (*pid == 0) // child { close(1); // close(2); close (pipefds[0]); dup2 (pipefds[1], 1); // dup2 (pipefds[1], 2); close (pipefds[1]); debug(3,"child about to exec %s", argv[0]); execvp (argv[0], argv); xqf_error("failed to exec %s: %s",argv[0],strerror(errno)); _exit (1); } close (pipefds[1]); if (set_nonblock(pipefds[0]) == -1) { close (pipefds[1]); if(*pid > 0) kill(*pid,SIGTERM); xqf_error("fcntl failed: %s", strerror(errno)); return -1; } return pipefds[0]; } void external_program_close_input(struct external_program_connection* conn) { if(!conn) return; gdk_input_remove(conn->tag); close(conn->fd); if(conn->pid > 0) kill(conn->pid,SIGTERM); if(conn->do_quit) gtk_main_quit(); } void external_program_input_callback(struct external_program_connection* conn, int fd, GIOCondition condition) { int bytes; char* sol; // start of line pointer char* eol; // end of line pointer if(!conn) return; if(conn->pos >= conn->bufsize ) { xqf_error("line %d too long",conn->linenr+1); external_program_close_input(conn); return; } bytes = read (fd, conn->buf + conn->pos, conn->bufsize - conn->pos); if (bytes < 0) { if (errno == EAGAIN || errno == EWOULDBLOCK) { return; } xqf_error("Error reading from child: %s",g_strerror(errno)); external_program_close_input(conn); return; } if (bytes == 0) { /* EOF */ external_program_close_input(conn); return; } sol = conn->buf; eol = conn->buf + conn->pos; conn->pos += bytes; bytes = conn->pos; // buffer can contain multiple lines for(;(eol = memchr(eol,'\n',bytes-(eol-sol))) != NULL;bytes-=eol-sol+1,sol= ++eol) { *eol = '\0'; // debug(0,"%4d, line(%4d,%4d-%4d)>%s<",bytes, eol-sol,sol-conn->buf,eol-conn->buf,sol); ++conn->linenr; conn->current_line = sol; if(conn->linefunc) (conn->linefunc)(conn); } // sol now points to begin of next line, if any if(sol-conn->buf) { if(bytes) { memmove(conn->buf,sol,bytes); } conn->pos = bytes; } } int external_program_foreach_line(char* argv[], void (*linefunc)(struct external_program_connection* conn), gpointer data) { struct external_program_connection conn = {0}; conn.fd = start_prog_and_return_fd(argv,&conn.pid); if (conn.fd<0||conn.pid<=0) return FALSE; conn.bufsize = 512; conn.buf = g_new0(char,conn.bufsize); conn.result = FALSE; conn.do_quit = TRUE; conn.linenr = 0; conn.linefunc = linefunc; conn.data = data; conn.tag = gdk_input_add (conn.fd, GDK_INPUT_READ | GDK_INPUT_EXCEPTION, (GdkInputFunction) external_program_input_callback, &conn); gtk_main(); g_free(conn.buf); return conn.result; } int _run_program_sync(const char* argv[], void(*child_callback)(void*), gpointer data) { int status = -1; pid_t pid; pid = fork(); if ( pid == 0) { if(child_callback) child_callback(data); execvp(argv[0],(void*)argv); _exit(EXIT_FAILURE); } else if(pid > 0) { waitpid(pid,&status,0); if(WIFEXITED(status)) { debug(3,"%s exited normally", argv[0]); } else { debug(3,"%s exited with status %d", argv[0], WEXITSTATUS(status)); } if(WIFSIGNALED(status)) { debug(3,"%s was killed by signal %d", argv[0], WTERMSIG(status)); } } return status; } int run_program_sync(const char* argv[]) { return _run_program_sync(argv, NULL, NULL); } int run_program_sync_callback(const char* argv[], void(*child_callback)(void*), gpointer data) { return _run_program_sync(argv, child_callback, data); } const char* copy_file(const char* src, const char* dest) { char buf[4*4096]; const char* msg = NULL; int fdin = -1, fdout = -1; int ret; fdin = open(src, O_RDONLY); if(fdin == -1) { msg = _("Can't open source file for reading"); goto error_out; } fdout = open(dest, O_CREAT|O_WRONLY|O_TRUNC, 0777); if(fdout == -1) { msg = _("Can't open destination file for writing"); goto error_out; } while((ret = read(fdin, buf, sizeof(buf))) > 0) { if(write(fdout, buf, ret) == -1) { msg = _("write error on destination file"); goto error_out; } } if(ret == -1) { msg = _("read error on source file"); goto error_out; } error_out: if(fdin != -1) close(fdin); if(fdout != -1) close(fdout); if(msg) unlink(dest); return msg; } char* load_file_mem(const char* name, size_t* size) { char* buf = NULL; struct stat stb; int fd; fd = open(name, O_RDONLY); if(fd == -1) goto out; if(fstat(fd, &stb) == -1) goto out; buf = g_malloc(stb.st_size); if(read(fd, buf, stb.st_size) != stb.st_size) { g_free(buf); buf = NULL; goto out; } out: if(fd != -1) close(fd); if(buf) *size = stb.st_size; return buf; } #endif // ! RCON_STANDALONE xqf-1.0.5/src/utils.h0000644002404400000620000001241310335365404011334 00000000000000/* XQF - Quake server browser and launcher * Copyright (C) 1998-2000 Roman Pozlevich * * 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 */ #ifndef __UTILS_H__ #define __UTILS_H__ #include #include /* FILE */ #include #include extern short strtosh (const char *str); extern unsigned short strtoush (const char *str); extern char *strdup_strip (const char *); extern char *file_in_dir (const char *, const char *); extern int str_isempty (const char *); extern char *expand_tilde (const char *path); extern GList *dir_to_list (const char *dirname, char * (*filter) (const char *, const char *)); extern GList *merge_sorted_string_lists (GList *list1, GList *list2); extern GSList *unique_strings (GSList *strings); // build GList from array of char* extern GList* createGListfromchar(char* strings[]); extern void on_sig (int signum, void (*func) (int signum)); extern void ignore_sigpipe (void); extern void print_dq_string (FILE *f, const unsigned char *str); extern char *lowcasestrstr (const char *str, const char *substr); extern int tokenize (char *str, char *token[], int max, const char *dlm); extern int safe_tokenize (const char *str, char *token[], int max, const char *dlm); extern int tokenize_bychar (char *str, char *token[], int max, char dlm); extern int hostname_is_valid (const char *hostname); extern char *find_game_dir (const char *basegamedir, const char *game, int *match_result); extern char* resolve_path(const char* path); /* Find a server setting from the info list in the server struct. The key passed will be converted to lower case. */ extern char* find_server_setting_for_key (char*, char**); // return "false" if i == 0, "true" otherwise const char* bool2str(int i); // returns true if str is "true", false otherwise int str2bool(const char* str); /** \brief find executable file in $PATH. * * @param files colon seperated list of executables to search for * @returns absolute path to first found file, must be freed manually */ char* find_file_in_path(const char* files); /** \brief find executable file in $PATH. * * @param files colon seperated list of executables to search for * @returns first found file, must be freed manually */ char* find_file_in_path_relative(const char* files); /** \brief find executable file in $PATH. * * like find_file_in_path but take a NULL terminated list of files */ char* find_file_in_path_list(char** files); /** \brief find executable file in $PATH. * * like find_file_in_path_relative but take a NULL terminated list of files */ char* find_file_in_path_list_relative(char** files); /** sort list and remove duplicates * @param list list to sort * @compare_func function to use for comparing * @unref_func function to call for each deleted entry * @return sorted list without duplicates */ GSList* slist_sort_remove_dups(GSList* list, GCompareFunc compare_func, void (*unref_func)(void*)); /** * return locale's string representation of t. must be freed manually */ char* timet2string(const time_t* t); /** set fd non blocking @param fd the file descriptor @return zero on success, -1 on failure */ int set_nonblock (int fd); struct external_program_connection { pid_t pid; int fd; gint tag; // for gdkinput char* buf; size_t bufsize; size_t pos; unsigned linenr; // contains the \0 terminated line without \n when linefunc is called const char* current_line; // function to be called when a complete line was received void (*linefunc)(struct external_program_connection* conn); // call gtk_main_quit gboolean do_quit; gpointer data; int result; }; int start_prog_and_return_fd(char *const argv[], pid_t *pid); void external_program_input_callback(struct external_program_connection* conn, int fd, GIOCondition condition); /** enters gtk main loop */ int external_program_foreach_line(char* argv[], void (*linefunc)(struct external_program_connection* conn), gpointer data); int run_program_sync(const char* argv[]); int run_program_sync_callback(const char* argv[], void(*child_callback)(void*), gpointer data); /** \brief copy a file * * @param src source file * @param dest destination file * @returns NULL on success, error message on failure */ const char* copy_file(const char* src, const char* dest); /** \brief read file into memory * * @param name file name * @param size pointer to store buffer size * @returns pointer to allocated data or NULL on error */ char* load_file_mem(const char* name, size_t* size); #endif /* __UTILS_H__ */ xqf-1.0.5/src/server.c0000644002404400000620000003416110262022614011471 00000000000000/* XQF - Quake server browser and launcher * Copyright (C) 1998-2000 Roman Pozlevich * * 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 */ #include #include /* fprintf */ #include /* strchr, strncpy */ #include /* strtol */ #include /* inet_ntoa */ #include /* inet_ntoa */ #include /* inet_ntoa */ #include #include "xqf.h" #include "game.h" #include "host.h" #include "utils.h" #include "server.h" #ifdef USE_GEOIP #include "country-filter.h" #endif struct server_hash { int num; GSList **nodes; }; static struct server_hash servers = { 2333, NULL }; static struct server_hash uservers = { 251, NULL }; static int server_hash_func (const struct host *h, unsigned short port) { unsigned char *ptr; if (!h) return 0; ptr = (char *) &h->ip.s_addr; return (ptr[0] + (ptr[1] << 2) + (ptr[2] << 4) + (ptr[3] << 6) + port) % servers.num; } static int userver_hash_func (const char *hostname, unsigned short port) { int sum = 0; while (*hostname) { sum += *hostname; hostname++; } return (sum + port) % uservers.num; } /* server_new -- Create (malloc) a new server structure with all of the values set at zero except the reference count which should be at one. */ static struct server *server_new (struct host *h, unsigned short port, enum server_type type) { struct server *server; if (port == 0 || type == UNKNOWN_SERVER) return NULL; server = g_malloc0 (sizeof (struct server)); debug (6, "server_new() -- Server %lx", server); server_ref (server); server->host = h; host_ref (h); /* Increse the refernece count on the host struct */ server->port = port; server->type = type; server->ping = -1; server->retries = -1; #ifdef USE_GEOIP server->country_id = geoip_id_by_ip(h->ip); #endif return server; } static struct userver *userver_new (const char *hostname, unsigned short port, enum server_type type) { struct userver *userver; if (port == 0 || type == UNKNOWN_SERVER) return NULL; userver = g_malloc0 (sizeof (struct userver)); userver_ref (userver); /* baa -- Needed? FIX ME */ userver->hostname = g_strdup (hostname); userver->port = port; userver->type = type; return userver; } /* server_add -- See if a host/port is in our list. If it is not then add one. If it is then we increase the reference count. */ struct server *server_add (struct host *h, unsigned short port, enum server_type type) { struct server *server; GSList *ptr; int node; if (!h || type == UNKNOWN_SERVER) return NULL; if (port == 0) port = games[type].default_port; node = server_hash_func (h, port); debug (6, "server_add() -- Add/Get a server"); if (!servers.nodes) { servers.nodes = g_malloc0 (sizeof (GSList *) * servers.num); } else { /* Go through each of the servers in the list (each node) and see if we have a matching (by reference) entry. */ for (ptr = servers.nodes[node]; ptr; ptr = ptr->next) { server = (struct server *) ptr->data; if (server->host == h && server->port == port) { server_ref (server); /* baa -- added Dec-27, 2000 CORE FIX? */ return server; } } } server = server_new (h, port, type); if (server) { servers.nodes[node] = g_slist_prepend (servers.nodes[node], server); if (games[type].analyze_serverinfo) (*games[type].analyze_serverinfo) (server); } return server; } struct userver *userver_add (const char *hostname, unsigned short port, enum server_type type) { GSList *ptr; struct userver *s; int node; if (!hostname || type == UNKNOWN_SERVER) return NULL; if (port == 0) port = games[type].default_port; node = userver_hash_func (hostname, port); if (!uservers.nodes) { uservers.nodes = g_malloc0 (sizeof (GSList *) * uservers.num); } else { for (ptr = uservers.nodes[node]; ptr; ptr = ptr->next) { s = (struct userver *) ptr->data; if (strcmp (s->hostname, hostname) == 0 && s->port == port) return s; } } s = userver_new (hostname, port, type); if (s) uservers.nodes[node] = g_slist_prepend (uservers.nodes[node], s); return s; } void server_free_info (struct server *s) { if (s->name) { g_free (s->name); s->name = NULL; } if (s->map) { g_free (s->map); s->map = NULL; } if (s->info) { g_free (s->info); s->info = NULL; s->game = NULL; } if (s->gametype) { /* Added by baa */ s->gametype = NULL; } if (s->players) { g_slist_foreach (s->players, (GFunc) g_free, NULL); g_slist_free (s->players); s->players = NULL; } s->flags = 0; s->maxplayers = 0; s->curplayers = 0; s->curbots = 0; s->filters = 0; s->flt_mask = 0; s->flt_last = 0; } // return NULL if refcount dropped to zero, server otherwise struct server* server_unref (struct server *server) { int node; if (!server) return NULL; server->ref_count--; debug (7, "server_unref() -- Server %lx ref now at %d", server, server->ref_count); if (server->ref_count <= 0) { node = server_hash_func (server->host, server->port); servers.nodes[node] = g_slist_remove (servers.nodes[node], server); /* Oops, it seems that we were freeing the server info before freeing the host info. Bad. To free the host info w/o a memory leak we need to do that before freeing the server info. --baa */ host_unref (server->host); server_free_info (server); g_free (server); return NULL; } return server; } void userver_unref (struct userver *s) { int node; if (!s) return; s->ref_count--; debug (6, "userver_unref() -- UServer %lx ref now at %d", s, s->ref_count); if (s->ref_count <= 0) { node = userver_hash_func (s->hostname, s->port); uservers.nodes[node] = g_slist_remove (uservers.nodes[node], s); if (s->s) server_unref (s->s); g_free (s->hostname); g_free (s); } } // change the server port to newport. this function is required as the server // needs to get a new position in the servers hash struct server* server_change_port (struct server* s, int newport) { int node; if(!newport || !s) return s; node = server_hash_func (s->host, s->port); servers.nodes[node] = g_slist_remove (servers.nodes[node], s); s->port = newport; node = server_hash_func (s->host, s->port); // FIXME: there could be already a server with that port servers.nodes[node] = g_slist_prepend (servers.nodes[node], s); return s; } GSList *server_list_copy (GSList *list) { debug (3, "server_list_copy() -- list %ld copying all servers", list); g_slist_foreach (list, (GFunc) server_ref, NULL); return g_slist_copy (list); } GSList *userver_list_copy (GSList *list) { g_slist_foreach (list, (GFunc) userver_ref, NULL); return g_slist_copy (list); } GSList *server_list_append_list (GSList *list, GSList *server_list, enum server_type type) { struct server *server; GSList *add = NULL; debug (6, "server_list_append_list() -- list %lx", list); while (server_list) { server = (struct server *) server_list->data; if (type == UNKNOWN_SERVER || type == server->type) { if (g_slist_find (list, server) == NULL) { add = g_slist_prepend (add, server); server_ref (server); } } server_list = g_slist_next (server_list); } return g_slist_concat (list, g_slist_reverse (add)); } GSList *userver_list_append_list (GSList *list, GSList *uservers, enum server_type type) { struct userver *us; GSList *add = NULL; while (uservers) { us = (struct userver *) uservers->data; if (type == UNKNOWN_SERVER || type == us->type) { if (g_slist_find (list, us) == NULL) { add = g_slist_prepend (add, us); userver_ref (us); } } uservers = g_slist_next (uservers); } return g_slist_concat (list, g_slist_reverse (add)); } int servers_total (void) { int i; int size = 0, len; int min=-1, max=0; if (!servers.nodes) return 0; for (i = 0; i < servers.num; i++) { len = g_slist_length (servers.nodes[i]); size += len; if (min == -1 || len < min) min=len; if (len > max) max=len; } debug(1,"server hash (min/max/avg) %d/%d/%5.2f",min,max,size/(servers.num*1.0)); return size; } int uservers_total (void) { int i; int size = 0; if (!uservers.nodes) return 0; for (i = 0; i < uservers.num; i++) size += g_slist_length (uservers.nodes[i]); return size; } /* all_servers -- Get a list of all servers. This is called from two functions source.c:free_masters and statistics.c:collect_statistics both of which call server_free_list afterwards. */ GSList *all_servers (void) { GSList *list = NULL; GSList *tmp; struct server *server; int i; if (!servers.nodes) return NULL; debug (6, "all_servers() -- Get all servers"); for (i = 0; i < servers.num; i++) { for (tmp = servers.nodes[i]; tmp; tmp = tmp->next) { server = (struct server *) tmp->data; list = g_slist_prepend (list, server); server_ref (server); } } return list; } int parse_address (char *str, char **addr, unsigned short *port) { long tmp; char *ptr; char *endptr; if(!str || !addr || !port) return FALSE; *port = 0; *addr = NULL; ptr = strchr (str, ':'); if (!ptr) { if (hostname_is_valid (str)) { *addr = g_strdup (str); return TRUE; } return FALSE; } if (ptr == str) return FALSE; tmp = strtol (ptr + 1, &endptr, 10); if (*endptr != '\0' || tmp <= 0 || tmp > 65535) return FALSE; *port = (unsigned short) tmp; *addr = g_malloc (ptr - str + 1); strncpy (*addr, str, ptr - str); (*addr) [ptr - str] = '\0'; if (hostname_is_valid (*addr)) return TRUE; g_free (*addr); *addr = NULL; *port = 0; return FALSE; } struct server *userver_set_host (struct userver *us, struct host *h) { struct server *server; if (!us || !h) return NULL; if (us->s) return us->s; /* Since server_add increases the reference count for us, we do not do it here. */ server = server_add (h, us->port, us->type); if (server) { us->s = server; } return server; } void uservers_to_servers (GSList **uservers, GSList **servers) { struct userver *us; GSList *tmp = *uservers; debug (6, "uservers_to_servers() -- uservers %lx tmp %lx", uservers, tmp); while (tmp) { us = (struct userver *) tmp->data; debug (7, "uservers_to_servers() -- Check userver %lx", us); if (us->s) { debug (7, "uservers_to_servers() -- server %lx userver %lx", us->s, us); *servers = server_list_append (*servers, us->s); *uservers = g_slist_remove (*uservers, us); userver_unref (us); tmp = *uservers; continue; } tmp = tmp->next; } debug (6, "uservers_to_servers() -- Done."); } /* server_lists_intersect() -- Find servers that are in two lists (by reference). The first arg gets a list of servers not in both lists. The second list gets servers removed that are in both lists. */ void server_lists_intersect (GSList **list1, GSList **list2) { GSList *list3 = NULL; GSList *tmp; struct server *s; debug (6, "server_lists_intersect() -- "); for (tmp = *list1; tmp; tmp = tmp->next) { s = (struct server *) tmp->data; if (g_slist_find (*list2, s)) { *list2 = g_slist_remove (*list2, s); server_unref (s); } else { list3 = g_slist_prepend (list3, s); server_ref (s); } } server_list_free (*list1); *list1 = list3; } void server_list_fprintf (FILE *f, GSList *servers) { struct server *s; int i; for (i = 0; servers; i++) { s = (struct server *) servers->data; fprintf (f, "%d> [%s:%d](%d) %s \"%s\"\n", i, inet_ntoa (s->host->ip), s->port, s->ref_count, games[s->type].id, s->name); servers = servers->next; } } void userver_list_fprintf (FILE *f, GSList *uservers) { struct userver *us; int i; for (i = 0; uservers; i++) { us = (struct userver *) uservers->data; fprintf (f, "%d> [%s:%d](%d) %s\n", i, us->hostname, us->port, us->ref_count, games[us->type].id); if (us->s) { fprintf (f, " --> [%s:%d](%d) %s \"%s\"\n", inet_ntoa (us->s->host->ip), us->s->port, us->s->ref_count, games[us->type].id, us->s->name); } uservers = uservers->next; } } void server_set_env(const struct server* s) { char buf[256]; if(!s) return; if(s->flags & SERVER_PUNKBUSTER) setenv("XQF_SERVER_ANTICHEAT", "1", 1); if(s->name) setenv("XQF_SERVER_NAME", s->name, 1); if(s->map) setenv("XQF_SERVER_MAP", s->map, 1); if(s->host->name) setenv("XQF_SERVER_HOSTNAME", s->host->name, 1); if(s->game) setenv("XQF_SERVER_GAME", s->game, 1); setenv("XQF_SERVER_IP", inet_ntoa (s->host->ip), 1); snprintf(buf, sizeof(buf), "%d", s->port); setenv("XQF_SERVER_PORT", buf, 1); setenv("XQF_GAME_TYPE", games[s->type].id, 1); if(games[s->type].flags & GAME_LAUNCH_HOSTPORT) { char **info_ptr; // go through all server rules for (info_ptr = s->info; info_ptr && *info_ptr; info_ptr += 2) { if (!strcmp (*info_ptr, "hostport")) { setenv("XQF_SERVER_HOSTPORT", info_ptr[1], 1); } } } } xqf-1.0.5/src/server.h0000644002404400000620000001120210262022614011465 00000000000000/* XQF - Quake server browser and launcher * Copyright (C) 1998-2000 Roman Pozlevich * * 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 */ #ifndef __SERVER_H__ #define __SERVER_H__ #include #include #include "xqf.h" #include "debug.h" extern struct server *server_add (struct host *h, unsigned short port, enum server_type type); extern struct userver *userver_add (const char *name, unsigned short port, enum server_type type); extern void server_free_info (struct server *s); // return NULL if refcount dropped to zero, s otherwise extern struct server* server_unref (struct server *s); extern void userver_unref (struct userver *s); struct server* server_change_port (struct server* s, int newport); extern GSList *server_list_copy (GSList *list); extern GSList *userver_list_copy (GSList *list); extern GSList *server_list_append_list (GSList *list, GSList *servers, enum server_type type); extern GSList *userver_list_append_list (GSList *list, GSList *uservers, enum server_type type); extern int servers_total (void); extern int uservers_total (void); extern GSList *all_servers (void); extern int parse_address (char *str, char **addr, unsigned short *port); extern struct server *userver_set_host (struct userver *s, struct host *h); extern void uservers_to_servers (GSList **uservers, GSList **servers); extern void server_lists_intersect (GSList **list1, GSList **list2); extern void server_list_fprintf (FILE *f, GSList *servers); extern void userver_list_fprintf (FILE *f, GSList *uservers); static inline void server_ref (struct server *server) { if (server){ server->ref_count++; debug (7, "server_ref() -- Server %lx now at %d", server, server->ref_count); } } static inline void userver_ref (struct userver *us) { if (us) us->ref_count++; } static inline GSList *server_list_prepend (GSList *list, struct server *server) { if (g_slist_find (list, server) == NULL) { debug (6, "server_list_prepend() -- Server %lx", server); list = g_slist_prepend (list, server); server_ref (server); } return list; } // This version does not to the duplicate check - you must do it yourself static inline GSList *server_list_prepend_ndp (GSList *list, struct server *server) { debug (6, "server_list_prepend_ndp() -- Server %lx", server); list = g_slist_prepend (list, server); server_ref (server); return list; } static inline GSList *server_list_append (GSList *list, struct server *server) { if (g_slist_find (list, server) == NULL) { debug (6, "server_list_append() -- Server %lx", server); list = g_slist_append (list, server); server_ref (server); } return list; } static inline GSList *server_list_remove (GSList *list, struct server *s) { debug (6, "server_list_remove() -- remove server %lx from list %lx", s, list); if (g_slist_find (list, s)) { list = g_slist_remove (list, s); server_unref (s); } return list; } static inline GSList *userver_list_add (GSList *list, struct userver *us) { if (g_slist_find (list, us) == NULL) { list = g_slist_prepend (list, us); userver_ref (us); } return list; } static inline GSList *userver_list_remove (GSList *list, struct userver *us) { if (g_slist_find (list, us)) { list = g_slist_remove (list, us); userver_unref (us); } return list; } static inline void server_list_free (GSList *list) { if (list) { debug (6, "server_list_free() -- list %lx", list ); g_slist_foreach (list, (GFunc) server_unref, NULL); g_slist_free (list); } } static inline void userver_list_free (GSList *list) { if (list) { g_slist_foreach (list, (GFunc) userver_unref, NULL); g_slist_free (list); } } /** \brief put server properties into environment */ void server_set_env(const struct server* s); #endif /* __SERVER_H__ */ xqf-1.0.5/src/libxqf_dummy_gdk_pixbuf_stubs.c0000644002404400000620000000221410174271152016304 00000000000000/* XQF - Quake server browser and launcher * Dummy functions for gdk pixbuf * Copyright (C) 2005 Ludwig Nussel * * 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 */ #include void *gdk_pixbuf_new_from_file (const char *filename) { return NULL; } void gdk_pixbuf_render_pixmap_and_mask(void *pixbuf, void **pixmap_return, void **mask_return, int alpha_threshold) { *pixmap_return = NULL; *mask_return = NULL; } void gdk_pixbuf_unref(void *p) {}; xqf-1.0.5/src/psearch.c0000644002404400000620000002476010275434302011621 00000000000000/* XQF - Quake server browser and launcher * Copyright (C) 1998-2000 Roman Pozlevich * * 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 */ #include "gnuconfig.h" #include #include #include /* strcmp */ #include #include "i18n.h" #include "xqf.h" #include "xqf-ui.h" #include "srv-list.h" #include "dialogs.h" #include "sort.h" #include "utils.h" #include "history.h" #include "config.h" #include "psearch.h" #define REGCOMP_FLAGS (REG_EXTENDED | REG_NOSUB | REG_ICASE) static struct psearch_data psearch = { NULL, PSEARCH_MODE_SUBSTR, NULL }; static struct history *psearch_history = NULL; static GtkWidget *psearch_combo; static GtkWidget *mode_buttons[3]; static int psearch_new_pattern; static const char *mode_names[3] = { N_("Exact Match"), N_("Substring"), N_("Regular Expression") }; static int psearch_test_player (struct player *p) { return ((psearch.mode == PSEARCH_MODE_STRING && g_strcasecmp (p->name, psearch.data) == 0) || (psearch.mode == PSEARCH_MODE_SUBSTR && lowcasestrstr (p->name, psearch.data)) || (psearch.mode == PSEARCH_MODE_REGEXP && regexec ((regex_t *) psearch.data, p->name, 0, NULL, 0) == 0)); } static void psearch_free_pattern_data (void) { if (psearch.data) { if (psearch.mode == PSEARCH_MODE_REGEXP) { regfree ((regex_t *) psearch.data); } g_free (psearch.data); psearch.data = NULL; } } static void psearch_free_pattern (void) { if (psearch.pattern) { g_free (psearch.pattern); psearch.pattern = NULL; } psearch_free_pattern_data (); } static char *get_regerror (int errcode, regex_t *compiled) { size_t length; char *buffer; length = regerror (errcode, compiled, NULL, 0); buffer = g_malloc (length); regerror (errcode, compiled, buffer, length); return buffer; } static int psearch_compile_pattern (void) { char *error; int res; psearch_free_pattern_data (); if (psearch.pattern && psearch.pattern[0]) { switch (psearch.mode) { case PSEARCH_MODE_REGEXP: psearch.data = g_malloc (sizeof (regex_t)); res = regcomp ((regex_t *) psearch.data, psearch.pattern, REGCOMP_FLAGS); if (res) { error = get_regerror (res, (regex_t *) psearch.data); psearch_free_pattern (); dialog_ok (_("XQF: Error"), _("Regular Expression Error!\n\n%s\n\n%s."), psearch.pattern, error); g_free (error); return FALSE; } break; case PSEARCH_MODE_STRING: case PSEARCH_MODE_SUBSTR: default: psearch.data = g_strdup (psearch.pattern); g_strdown (psearch.data); break; } return TRUE; } return FALSE; } static void psearch_combo_activate_callback (GtkWidget *widget, gpointer data) { psearch_free_pattern (); if (GTK_TOGGLE_BUTTON (mode_buttons[PSEARCH_MODE_STRING])->active) psearch.mode = PSEARCH_MODE_STRING; else if (GTK_TOGGLE_BUTTON (mode_buttons[PSEARCH_MODE_SUBSTR])->active) psearch.mode = PSEARCH_MODE_SUBSTR; else psearch.mode = PSEARCH_MODE_REGEXP; config_set_int ("/" CONFIG_FILE "/Find Player/mode", psearch.mode); psearch.pattern = strdup_strip ( gtk_entry_get_text (GTK_ENTRY (GTK_COMBO (psearch_combo)->entry))); if (psearch.pattern && psearch.pattern[0]) { history_add (psearch_history, psearch.pattern); psearch_new_pattern = psearch_compile_pattern (); } } int find_player_dialog (void) { GtkWidget *window; GtkWidget *main_vbox; GtkWidget *hbox; GtkWidget *button; GtkWidget *label; GSList *group; int i; psearch_new_pattern = FALSE; window = dialog_create_modal_transient_window (_("Find Player"), TRUE, FALSE, NULL); main_vbox = gtk_vbox_new (FALSE, 8); gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 16); gtk_container_add (GTK_CONTAINER (window), main_vbox); hbox = gtk_hbox_new (FALSE, 4); gtk_box_pack_start (GTK_BOX (main_vbox), hbox, FALSE, FALSE, 0); /* Pattern Entry */ label = gtk_label_new (_("Find Player:")); gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); gtk_widget_show (label); /* ComboBox */ psearch_combo = gtk_combo_new (); gtk_entry_set_max_length (GTK_ENTRY (GTK_COMBO (psearch_combo)->entry), 128); gtk_widget_set_usize (GTK_COMBO (psearch_combo)->entry, 160, -1); gtk_combo_disable_activate (GTK_COMBO (psearch_combo)); if (psearch_history->items) { gtk_combo_set_popdown_strings (GTK_COMBO (psearch_combo), psearch_history->items); gtk_entry_set_text (GTK_ENTRY (GTK_COMBO (psearch_combo)->entry), (char *) psearch_history->items->data); gtk_entry_select_region (GTK_ENTRY (GTK_COMBO (psearch_combo)->entry), 0, strlen ((char *) psearch_history->items->data)); } gtk_signal_connect (GTK_OBJECT (GTK_COMBO (psearch_combo)->entry), "activate", GTK_SIGNAL_FUNC (psearch_combo_activate_callback), NULL); gtk_signal_connect_object (GTK_OBJECT (GTK_COMBO (psearch_combo)->entry), "activate", GTK_SIGNAL_FUNC (gtk_widget_destroy), GTK_OBJECT (window)); gtk_box_pack_start (GTK_BOX (hbox), psearch_combo, TRUE, TRUE, 0); gtk_widget_grab_focus (GTK_COMBO (psearch_combo)->entry); gtk_widget_show (psearch_combo); /* OK Button */ button = gtk_button_new_with_label (_("OK")); gtk_signal_connect_object (GTK_OBJECT (button), "clicked", GTK_SIGNAL_FUNC (psearch_combo_activate_callback), GTK_OBJECT (psearch_combo)); gtk_signal_connect_object (GTK_OBJECT (button), "clicked", GTK_SIGNAL_FUNC (gtk_widget_destroy), GTK_OBJECT (window)); gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0); gtk_widget_show (button); /* Cancel Button */ button = gtk_button_new_with_label (_("Cancel")); gtk_signal_connect_object (GTK_OBJECT (button), "clicked", GTK_SIGNAL_FUNC (gtk_widget_destroy), GTK_OBJECT (window)); gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0); gtk_widget_show (button); gtk_widget_show (hbox); /* Mode Buttons */ hbox = gtk_hbox_new (FALSE, 4); gtk_box_pack_start (GTK_BOX (main_vbox), hbox, FALSE, FALSE, 0); group = NULL; for (i = 0; i < 3; i++) { mode_buttons[i] = gtk_radio_button_new_with_label (group, _(mode_names[i])); group = gtk_radio_button_group (GTK_RADIO_BUTTON (mode_buttons[i])); gtk_box_pack_start (GTK_BOX (hbox), mode_buttons[i], FALSE, FALSE, 0); gtk_widget_show (mode_buttons[i]); } gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON (mode_buttons[psearch.mode]), TRUE); gtk_widget_show (hbox); gtk_widget_show (main_vbox); gtk_widget_show (window); gtk_main (); unregister_window (window); return psearch_new_pattern; } void psearch_init (void) { psearch_history = history_new ("Player Search"); psearch.mode = config_get_int ("/" CONFIG_FILE "/Find Player/mode=1"); } void psearch_done (void) { if (psearch.pattern) { psearch_free_pattern (); } if (psearch_history) { history_free (psearch_history); psearch_history = NULL; } } int psearch_data_is_empty (void) { return (psearch.data == NULL); } char *psearch_lookup_pattern (void) { char *pat; int len; if (!psearch.pattern || !psearch.pattern[0]) return NULL; len = strlen (psearch.pattern) + 2 + strlen (mode_names[psearch.mode]) + 2; pat = g_malloc (len); g_snprintf (pat, len, "%s (%s)", psearch.pattern, mode_names[psearch.mode]); return pat; } static int integer_list_find_minimum (GList *list) { int res = 0; if (list) { res = GPOINTER_TO_INT(list->data); list = list->next; while (list) { if (res > GPOINTER_TO_INT(list->data)) { res = GPOINTER_TO_INT(list->data); } list = list->next; } } return res; } static int server_has_player (struct server *s) { GSList *plist; struct player *p; for (plist = s->players; plist; plist = plist->next) { p = (struct player *) plist->data; if (psearch_test_player (p)) return TRUE; } return FALSE; } static int psearch_next_player (int player) { struct player *p; GtkVisibility vis; while (player < player_clist->rows) { p = (struct player *) gtk_clist_get_row_data (player_clist, player); if (psearch_test_player (p)) { gtk_clist_select_row (player_clist, player, 0); vis = gtk_clist_row_is_visible (player_clist, player); if (vis != GTK_VISIBILITY_FULL) gtk_clist_moveto (player_clist, player, 0, 0.5, 0.0); return TRUE; } player++; } return FALSE; } void find_player (int find_next) { struct server *s; int player = 0; int server = 0; if (find_next && server_clist->selection != NULL) { /* selected one */ if (server_clist->selection->next == NULL) { server = GPOINTER_TO_INT(server_clist->selection->data); if (player_clist->selection) player = GPOINTER_TO_INT(player_clist->selection->data + 1); if (psearch_next_player (player)) return; server++; } else { /* selected many */ server = integer_list_find_minimum (server_clist->selection); } } while (server < server_clist->rows) { s = (struct server *) gtk_clist_get_row_data (server_clist, server); if (server_has_player (s)) { server_clist_select_one (server); psearch_next_player (0); return; } server++; } if (!find_next || server_clist->selection == NULL) { dialog_ok (NULL, _("Player not found.")); reset_main_status_bar(); } else { if (dialog_yesno (_("XQF: End of server list reached"), 0, _("Yes"), _("No"), _("Continue search from beginning?"))) { find_player (FALSE); } else reset_main_status_bar(); } } xqf-1.0.5/src/psearch.h0000644002404400000620000000251707201342720011617 00000000000000/* XQF - Quake server browser and launcher * Copyright (C) 1998-2000 Roman Pozlevich * * 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 */ #ifndef __PSEARCH_H__ #define __PSEARCH_H__ #define PSEARCH_HISTORY_MAXITEMS 10 enum psearch_mode { PSEARCH_MODE_STRING = 0, PSEARCH_MODE_SUBSTR = 1, PSEARCH_MODE_REGEXP = 2 }; struct psearch_data { char *pattern; enum psearch_mode mode; void *data; }; extern int find_player_dialog (void); extern void psearch_init (void); extern void psearch_done (void); extern int psearch_data_is_empty (void); extern char *psearch_lookup_pattern (void); extern void find_player (int find_next); #endif /* __PSEARCH_H__ */ xqf-1.0.5/src/quake2_pal.h0000644002404400000620000001127607201342720012220 000000000000000x00, 0x00, 0x00, 0x0f, 0x0f, 0x0f, 0x1f, 0x1f, 0x1f, 0x2f, 0x2f, 0x2f, 0x3f, 0x3f, 0x3f, 0x4b, 0x4b, 0x4b, 0x5b, 0x5b, 0x5b, 0x6b, 0x6b, 0x6b, 0x7b, 0x7b, 0x7b, 0x8b, 0x8b, 0x8b, 0x9b, 0x9b, 0x9b, 0xab, 0xab, 0xab, 0xbb, 0xbb, 0xbb, 0xcb, 0xcb, 0xcb, 0xdb, 0xdb, 0xdb, 0xeb, 0xeb, 0xeb, 0x63, 0x4b, 0x23, 0x5b, 0x43, 0x1f, 0x53, 0x3f, 0x1f, 0x4f, 0x3b, 0x1b, 0x47, 0x37, 0x1b, 0x3f, 0x2f, 0x17, 0x3b, 0x2b, 0x17, 0x33, 0x27, 0x13, 0x2f, 0x23, 0x13, 0x2b, 0x1f, 0x13, 0x27, 0x1b, 0x0f, 0x23, 0x17, 0x0f, 0x1b, 0x13, 0x0b, 0x17, 0x0f, 0x0b, 0x13, 0x0f, 0x07, 0x0f, 0x0b, 0x07, 0x5f, 0x5f, 0x6f, 0x5b, 0x5b, 0x67, 0x5b, 0x53, 0x5f, 0x57, 0x4f, 0x5b, 0x53, 0x4b, 0x53, 0x4f, 0x47, 0x4b, 0x47, 0x3f, 0x43, 0x3f, 0x3b, 0x3b, 0x3b, 0x37, 0x37, 0x33, 0x2f, 0x2f, 0x2f, 0x2b, 0x2b, 0x27, 0x27, 0x27, 0x23, 0x23, 0x23, 0x1b, 0x1b, 0x1b, 0x17, 0x17, 0x17, 0x13, 0x13, 0x13, 0x8f, 0x77, 0x53, 0x7b, 0x63, 0x43, 0x73, 0x5b, 0x3b, 0x67, 0x4f, 0x2f, 0xcf, 0x97, 0x4b, 0xa7, 0x7b, 0x3b, 0x8b, 0x67, 0x2f, 0x6f, 0x53, 0x27, 0xeb, 0x9f, 0x27, 0xcb, 0x8b, 0x23, 0xaf, 0x77, 0x1f, 0x93, 0x63, 0x1b, 0x77, 0x4f, 0x17, 0x5b, 0x3b, 0x0f, 0x3f, 0x27, 0x0b, 0x23, 0x17, 0x07, 0xa7, 0x3b, 0x2b, 0x9f, 0x2f, 0x23, 0x97, 0x2b, 0x1b, 0x8b, 0x27, 0x13, 0x7f, 0x1f, 0x0f, 0x73, 0x17, 0x0b, 0x67, 0x17, 0x07, 0x57, 0x13, 0x00, 0x4b, 0x0f, 0x00, 0x43, 0x0f, 0x00, 0x3b, 0x0f, 0x00, 0x33, 0x0b, 0x00, 0x2b, 0x0b, 0x00, 0x23, 0x0b, 0x00, 0x1b, 0x07, 0x00, 0x13, 0x07, 0x00, 0x7b, 0x5f, 0x4b, 0x73, 0x57, 0x43, 0x6b, 0x53, 0x3f, 0x67, 0x4f, 0x3b, 0x5f, 0x47, 0x37, 0x57, 0x43, 0x33, 0x53, 0x3f, 0x2f, 0x4b, 0x37, 0x2b, 0x43, 0x33, 0x27, 0x3f, 0x2f, 0x23, 0x37, 0x27, 0x1b, 0x2f, 0x23, 0x17, 0x27, 0x1b, 0x13, 0x1f, 0x17, 0x0f, 0x17, 0x0f, 0x0b, 0x0f, 0x0b, 0x07, 0x6f, 0x3b, 0x17, 0x5f, 0x37, 0x17, 0x53, 0x2f, 0x17, 0x43, 0x2b, 0x17, 0x37, 0x23, 0x13, 0x27, 0x1b, 0x0f, 0x1b, 0x13, 0x0b, 0x0f, 0x0b, 0x07, 0xb3, 0x5b, 0x4f, 0xbf, 0x7b, 0x6f, 0xcb, 0x9b, 0x93, 0xd7, 0xbb, 0xb7, 0xcb, 0xd7, 0xdf, 0xb3, 0xc7, 0xd3, 0x9f, 0xb7, 0xc3, 0x87, 0xa7, 0xb7, 0x73, 0x97, 0xa7, 0x5b, 0x87, 0x9b, 0x47, 0x77, 0x8b, 0x2f, 0x67, 0x7f, 0x17, 0x53, 0x6f, 0x13, 0x4b, 0x67, 0x0f, 0x43, 0x5b, 0x0b, 0x3f, 0x53, 0x07, 0x37, 0x4b, 0x07, 0x2f, 0x3f, 0x07, 0x27, 0x33, 0x00, 0x1f, 0x2b, 0x00, 0x17, 0x1f, 0x00, 0x0f, 0x13, 0x00, 0x07, 0x0b, 0x00, 0x00, 0x00, 0x8b, 0x57, 0x57, 0x83, 0x4f, 0x4f, 0x7b, 0x47, 0x47, 0x73, 0x43, 0x43, 0x6b, 0x3b, 0x3b, 0x63, 0x33, 0x33, 0x5b, 0x2f, 0x2f, 0x57, 0x2b, 0x2b, 0x4b, 0x23, 0x23, 0x3f, 0x1f, 0x1f, 0x33, 0x1b, 0x1b, 0x2b, 0x13, 0x13, 0x1f, 0x0f, 0x0f, 0x13, 0x0b, 0x0b, 0x0b, 0x07, 0x07, 0x00, 0x00, 0x00, 0x97, 0x9f, 0x7b, 0x8f, 0x97, 0x73, 0x87, 0x8b, 0x6b, 0x7f, 0x83, 0x63, 0x77, 0x7b, 0x5f, 0x73, 0x73, 0x57, 0x6b, 0x6b, 0x4f, 0x63, 0x63, 0x47, 0x5b, 0x5b, 0x43, 0x4f, 0x4f, 0x3b, 0x43, 0x43, 0x33, 0x37, 0x37, 0x2b, 0x2f, 0x2f, 0x23, 0x23, 0x23, 0x1b, 0x17, 0x17, 0x13, 0x0f, 0x0f, 0x0b, 0x9f, 0x4b, 0x3f, 0x93, 0x43, 0x37, 0x8b, 0x3b, 0x2f, 0x7f, 0x37, 0x27, 0x77, 0x2f, 0x23, 0x6b, 0x2b, 0x1b, 0x63, 0x23, 0x17, 0x57, 0x1f, 0x13, 0x4f, 0x1b, 0x0f, 0x43, 0x17, 0x0b, 0x37, 0x13, 0x0b, 0x2b, 0x0f, 0x07, 0x1f, 0x0b, 0x07, 0x17, 0x07, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x77, 0x7b, 0xcf, 0x6f, 0x73, 0xc3, 0x67, 0x6b, 0xb7, 0x63, 0x63, 0xa7, 0x5b, 0x5b, 0x9b, 0x53, 0x57, 0x8f, 0x4b, 0x4f, 0x7f, 0x47, 0x47, 0x73, 0x3f, 0x3f, 0x67, 0x37, 0x37, 0x57, 0x2f, 0x2f, 0x4b, 0x27, 0x27, 0x3f, 0x23, 0x1f, 0x2f, 0x1b, 0x17, 0x23, 0x13, 0x0f, 0x17, 0x0b, 0x07, 0x07, 0x9b, 0xab, 0x7b, 0x8f, 0x9f, 0x6f, 0x87, 0x97, 0x63, 0x7b, 0x8b, 0x57, 0x73, 0x83, 0x4b, 0x67, 0x77, 0x43, 0x5f, 0x6f, 0x3b, 0x57, 0x67, 0x33, 0x4b, 0x5b, 0x27, 0x3f, 0x4f, 0x1b, 0x37, 0x43, 0x13, 0x2f, 0x3b, 0x0b, 0x23, 0x2f, 0x07, 0x1b, 0x23, 0x00, 0x13, 0x17, 0x00, 0x0b, 0x0f, 0x00, 0x00, 0xff, 0x00, 0x23, 0xe7, 0x0f, 0x3f, 0xd3, 0x1b, 0x53, 0xbb, 0x27, 0x5f, 0xa7, 0x2f, 0x5f, 0x8f, 0x33, 0x5f, 0x7b, 0x33, 0xff, 0xff, 0xff, 0xff, 0xff, 0xd3, 0xff, 0xff, 0xa7, 0xff, 0xff, 0x7f, 0xff, 0xff, 0x53, 0xff, 0xff, 0x27, 0xff, 0xeb, 0x1f, 0xff, 0xd7, 0x17, 0xff, 0xbf, 0x0f, 0xff, 0xab, 0x07, 0xff, 0x93, 0x00, 0xef, 0x7f, 0x00, 0xe3, 0x6b, 0x00, 0xd3, 0x57, 0x00, 0xc7, 0x47, 0x00, 0xb7, 0x3b, 0x00, 0xab, 0x2b, 0x00, 0x9b, 0x1f, 0x00, 0x8f, 0x17, 0x00, 0x7f, 0x0f, 0x00, 0x73, 0x07, 0x00, 0x5f, 0x00, 0x00, 0x47, 0x00, 0x00, 0x2f, 0x00, 0x00, 0x1b, 0x00, 0x00, 0xef, 0x00, 0x00, 0x37, 0x37, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0x2b, 0x2b, 0x23, 0x1b, 0x1b, 0x17, 0x13, 0x13, 0x0f, 0xeb, 0x97, 0x7f, 0xc3, 0x73, 0x53, 0x9f, 0x57, 0x33, 0x7b, 0x3f, 0x1b, 0xeb, 0xd3, 0xc7, 0xc7, 0xab, 0x9b, 0xa7, 0x8b, 0x77, 0x87, 0x6b, 0x57, 0x9f, 0x5b, 0x53 xqf-1.0.5/src/gensyms.pl0000755002404400000620000000624110311576062012050 00000000000000#!/usr/bin/perl -w # Generate stub functions for library symbols # Copyright (C) 2005 Ludwig Nussel # # 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 use strict; use Getopt::Long; my $except = []; my %versions; my $versfile; my $outfile; my $weak; sub help($) { print < exclude symbols from list -v write version map into FILE -o write C code into FILE --weak generate weak symbols --help this screen EOF exit(shift); } Getopt::Long::Configure("no_ignore_case"); GetOptions ( "x=s@" => $except, "v=s" => \$versfile, "o=s" => \$outfile, "weak" => \$weak, "h|help" => sub { help(0); } ) or exit(1); if(!$outfile) { print STDERR "no output file specified\n"; help(1); } $except = { map { $_ => 1 } split(/,/,join(',',@{$except}))}; $except->{'_init'} = 1; $except->{'_fini'} = 1; open (OUT, '>', $outfile) or die; print OUT "static void segv(void) { char* die = 0; ++*die; }\n"; foreach my $file (@ARGV) { my %seen; open (IN, "/usr/bin/readelf -W --symbols $file|") or die; while() { my ($sym, $ver, $at); next unless s/^ +\d+: *//; chomp; my @f = split(/ +/); next unless $#f >= 6; next unless $f[2] eq 'FUNC'; next unless $f[3] eq 'GLOBAL'; next unless $f[5] =~ /\d+/; $sym = $f[6]; next if exists $seen{$sym}; $seen{$sym} = 1; if($sym =~ /(.*?)(\@\@?)(.*)/) { $sym = $1; $at = $2; $ver = $3; } next if exists $except->{$sym}; if($ver) { my $vsym = sprintf "SEGV_%08X_%s",int(rand(0xffffffff)), $sym; push @{$versions{$ver}}, $vsym; print OUT "__asm__(\".symver $vsym,$sym$at$ver\");\n"; print OUT "void $vsym() { segv(); }\n" unless $weak; print OUT "void $vsym() __attribute__ ((weak, alias (\"segv\")));\n" if $weak; } else { print OUT "void $sym() { segv(); }\n" unless $weak; print OUT "void $sym() __attribute__ ((weak, alias (\"segv\")));\n" if $weak; } } close IN; } close OUT; if(scalar keys %versions) { if(!$versfile) { print STDERR "no version file specified but versioned symbols found\n"; exit(1); } open (OUT, '>', $versfile) or die; foreach my $ver (keys %versions) { print OUT "$ver {\n local:\n"; foreach my $sym (@{$versions{$ver}}) { print OUT " $sym;\n"; } print OUT "};\n"; } close OUT; } xqf-1.0.5/src/srv-info.c0000644002404400000620000004562610132265251011740 00000000000000/* XQF - Quake server browser and launcher * Copyright (C) 1998-2000 Roman Pozlevich * * 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 */ #include #include /* strtoul */ #include /* strcmp */ #include "xqf-ui.h" #include "sort.h" #include "pixmaps.h" #include "srv-info.h" // TODO: put into external file #define QW_TEAMPLAY_CTF 11 static char *qw_teamplay_ctf[QW_TEAMPLAY_CTF] = { "Health Protect", /* 1 */ "Armor Protect", /* 2 */ "Damage to Attacker", /* 4 */ "Frag Penalty", /* 8 */ "Death Penalty", /* 16 */ "Team Color Lock", /* 32 */ "Static Teams", /* 64 */ "Drop Items", /* 128 */ "Capture the Flag", /* 256 */ "Custom Capture the Flag", /* 512 */ "Team Selection" /* 1024 */ }; #define QW_TEAMPLAY_TF 19 static char *qw_teamplay_fortress[QW_TEAMPLAY_TF] = { "Teamplay", /* 1 */ "1/2 damage from direct fire", /* 2 */ "No damage from direct fire", /* 4 */ "1/2 damage from area-affect weaponry", /* 8 */ "No damage from area-affect weaponry", /* 16 */ "Advantage for team with less members", /* 32 */ "Advantage for team with lower score", /* 64 */ "1/2 armor damage from direct fire", /* 128 */ "No armor damage from direct fire", /* 256 */ "1/2 armor damage from area-affect weapon", /* 512 */ "No armor damage from area-affect weaponry", /* 1024 */ "1/2 mirror damage from direct fire", /* 2048 */ "Full mirror damage from direct fire", /* 4096 */ "1/2 mirror damage from area-affect weaponry",/* 8192 */ "Full mirror damage from area-affect weaponry"/* 16384 */ }; #define Q2_DMFLAGS 20 static char *q2_dmflags[Q2_DMFLAGS] = { "No Health", /* 1 */ "No Powerups", /* 2 */ "Weapons Stay", /* 4 */ "No Falling Damage", /* 8 */ "Instant Powerups", /* 16 */ "Same Map", /* 32 */ "Teams by Skin", /* 64 */ "Teams by Model", /* 128 */ "No Friendly Fire", /* 256 */ "Spawn Farthest", /* 512 */ "Force Respawn", /* 1024 */ "No Armor", /* 2048 */ "Allow Exit", /* 4096 */ "Infinite Ammo", /* 8192 */ "Quad Drop", /* 16384 */ "Fixed FOV", /* 32768 */ NULL, /* 65536 */ "CTF Forced Join", /* 131072 */ "Armor Protect", /* 262144 */ "CTF No Tech Powerups" /* 524288 */ }; #define Q2_XATRIX_DMFLAGS 17 static char *q2_xatrix_dmflags[Q2_XATRIX_DMFLAGS] = { "No Health", /* 1 */ "No Powerups", /* 2 */ "Weapons Stay", /* 4 */ "No Falling Damage", /* 8 */ "Instant Powerups", /* 16 */ "Same Map", /* 32 */ "Teams by Skin", /* 64 */ "Teams by Model", /* 128 */ "No Friendly Fire", /* 256 */ "Spawn Farthest", /* 512 */ "Force Respawn", /* 1024 */ "No Armor", /* 2048 */ "Allow Exit", /* 4096 */ "Infinite Ammo", /* 8192 */ "Quad Drop", /* 16384 */ "Fixed FOV", /* 32768 */ "DualFire Drop" /* 65536 */ }; #define Q2_ROGUE_DMFLAGS 21 static char *q2_rogue_dmflags[Q2_ROGUE_DMFLAGS] = { "No Health", /* 1 */ "No Powerups", /* 2 */ "Weapons Stay", /* 4 */ "No Falling Damage", /* 8 */ "Instant Powerups", /* 16 */ "Same Map", /* 32 */ "Teams by Skin", /* 64 */ "Teams by Model", /* 128 */ "No Friendly Fire", /* 256 */ "Spawn Farthest", /* 512 */ "Force Respawn", /* 1024 */ "No Armor", /* 2048 */ "Allow Exit", /* 4096 */ "Infinite Ammo", /* 8192 */ "Quad Drop", /* 16384 */ "Fixed FOV", /* 32768 */ NULL, /* 65536 */ "No Mines", /* 131072 */ "No Stack Double", /* 262144 */ "No Nukes", /* 524288 */ "No Spheres" /* 1048576 */ }; #define Q2_GXMOD_DMFLAGS 19 static char *q2_gxmod_dmflags[Q2_GXMOD_DMFLAGS] = { "No Health", /* 1 */ "No Powerups", /* 2 */ "Weapons Stay", /* 4 */ "No Falling Damage", /* 8 */ "Instant Powerups", /* 16 */ "Same Level", /* 32 */ "Teams by Skin", /* 64 */ "Teams by Model", /* 128 */ "No Friendly Fire", /* 256 */ "Spawn Farthest", /* 512 */ "Force Respawn", /* 1024 */ "No Armor", /* 2048 */ "Allow Level Exit", /* 4096 */ "Infinite Ammo", /* 8192 */ "Quad Drop", /* 16384 */ "Fixed FOV", /* 32768 */ "Team DM", /* 65536 */ "Pratice Mode", /* 131072 */ "Armor Protect" /* 262144 */ }; #define Q2_GXMOD_WEAPFLAGS 9 static char *q2_gxmod_weapflags[Q2_GXMOD_WEAPFLAGS] = { "Shotgun", /* 1 */ "Super Shotgun", /* 2 */ "Machinegun", /* 4 */ "Chaingun", /* 8 */ "Grenade Launcher", /* 16 */ "Rocket Launcher", /* 32 */ "Hyperblaster", /* 64 */ "Railgun", /* 128 */ "BFG" /* 256 */ }; #define Q2_GXMOD_POWERUPFLAGS 11 static char *q2_gxmod_powerupflags[Q2_GXMOD_POWERUPFLAGS] = { "Body Armor", /* 1 */ "Combat Armor", /* 2 */ "Jacket Armor", /* 4 */ "Armor Shard", /* 8 */ "Power Shield", /* 16 */ "Quad Damage", /* 32 */ "Mega Health", /* 64 */ "Large Health", /* 128 */ "Health", /* 256 */ "Small Health", /* 512 */ "Invincibility" /* 1024 */ }; #define Q2_LMCTF_CTFFLAGS 15 static char *q2_lmctf_ctfflags[Q2_LMCTF_CTFFLAGS] = { "Weapon Balancing", /* 1 */ "Allow Invulnerability", /* 2 */ "Reset Teams Every Level", /* 4 */ "No Team Switch", /* 8 */ "Offhand Hook", /* 16 */ "No Voices", /* 32 */ "No Damage From Grapple", /* 64 */ "No Teams (Deathmatch)", /* 128 */ "No Flags (Deathmatch)", /* 256 */ "Score Balance", /* 512 */ "Armor Protection", /* 1024 */ "Power Armor Strength", /* 2048 */ "Random Map", /* 4096 */ "Random Quad Respawn Time", /* 8192 */ "Random Death Messages" /* 16386 */ }; #define Q2_LMCTF_RUNES 4 static char *q2_lmctf_runes[Q2_LMCTF_RUNES] = { "Damage Powerup", /* 1 */ "Resist Powerup", /* 2 */ "Haste Powerup", /* 4 */ "Regen Powerup" /* 8 */ }; #define Q2_EXPERT_EXPFLAGS 18 static char *q2_expert_expflags[Q2_EXPERT_EXPFLAGS] = { "Expert Weapons", /* 1 */ "Balanced Items", /* 2 */ "Free Gear", /* 4 */ "Expert Powerups", /* 8 */ "No Powerups", /* 16 */ "Expert Hook", /* 32 */ "No Hacks", /* 64 */ "Player ID", /* 128 */ "Enforced Teams", /* 256 */ "Fair Teams", /* 512 */ "No Team Switch", /* 1024 */ "Pogo", /* 2048 */ "Slow Hook", /* 4096 */ "Sky Solid", /* 8192 */ "No Plats", /* 16384 */ "Team Distribution", /* 32768 */ "Alternate Restore" /* 65536 */ "Ammo Regen" /* 131072 */ }; #define Q2_WF_WFFLAGS 15 static char *q2_wf_wfflags[Q2_WF_WFFLAGS] = { "Friendly Fire", /* 1 */ "Std logging", /* 2 */ "No Fort Respawn", /* 4 */ "No Homing Rockets", /* 8 */ "No Flying", /* 16 */ "Decoy Pursue", /* 32 */ "No Railgun Effect (unused)", /* 64 */ "No Turrets", /* 128 */ "No Earthquake Grenades", /* 256 */ NULL, /* 512 */ "Next Map Voting", /* 1024 */ NULL, /* 2048 */ "CTF Mode", /* 4096 */ "No Player Classes", /* 8192 */ "ZBot Detection" /* 16384 */ }; #define Q3_DMFLAGS 16 static char *q3_dmflags[Q3_DMFLAGS] = { "No Health", /* 1 */ "No Powerups", /* 2 */ "Weapons Stay", /* 4 */ "No Falling Damage", /* 8 */ "Instant Powerups", /* 16 */ "Same Map", /* 32 */ "Teams by Skin", /* 64 */ "Teams by Model", /* 128 */ "No Friendly Fire", /* 256 */ "Spawn Farthest", /* 512 */ "Force Respawn", /* 1024 */ "No Armor", /* 2048 */ "Allow Exit", /* 4096 */ "Infinite Ammo", /* 8192 */ "Quad Drop", /* 16384 */ "Fixed FOV" /* 32768 */ }; #define Q3_GENERATIONS_DMFLAGS 16 static char *q3_generations_dmflags[Q3_GENERATIONS_DMFLAGS] = { "No health", // 1 "No powerups", // 2 "No armor", // 4 "No falling damage", // 8 "Fully Loaded", // 16 "Infinite Ammo", // 32 "Quad Drop", // 64 "Spawn Farthest", // 128 "Force Respawn", // 256 "Fixed FOV", // 512 "No spectator", // 1024 "No CTF techs", // 2048 "Allow Grapple to sky", // 4096 "Weapon Grapple", // 8192 "Offhand Grapple", // 16384 "No Footsteps Sound", // 32768 }; #define Q3_GENERATIONS_GENFLAGS 7 static char *q3_generations_genflags[Q3_GENERATIONS_GENFLAGS] = { "", "Disable Earth", // 2 You cannot select the Earth Soldiers class. "Disable Doom", // 4 You cannot select the Doom Warriors class. "Disable Slipgate", // 8 You cannot select the Slipgaters class. "Disable Strogg", // 16 You cannot select the Strogg Troopers class. "Disable Arena", // 32 You cannot select the Arena Gladiators class. "Class-Based Teams ", // 64 In DM, each class is its own team. }; #define Q3_Q3UT3_VOTEFLAGS 6 static char *q3_q3ut3_voteflags[Q3_Q3UT3_VOTEFLAGS] = { "Map, Team, Friendlyfire", // 1 "Gametype, Wave Respawn", // 2 "Time-, Capture-, Fraglimit", // 4 "Various delays and times", // 8 "Matchmode, exec", // 16 "Gear", // 32 }; #define Q3_Q3UT3_GEARFLAGS 6 static char *q3_q3ut3_gearflags[Q3_Q3UT3_GEARFLAGS] = { "No Grenades", // 1 "No Snipers (psg1 or sr8)", // 2 "No Spas", // 4 "No Pistols", // 8 "No Autos (primary or secondary)", // 16 "No Negev", // 32 }; #define Q3_FREEZE_DMFLAGS 11 static char *q3_freeze_dmflags[Q3_FREEZE_DMFLAGS] = { NULL, /* 1 */ NULL, /* 2 */ NULL, /* 4 */ "No Falling Damage", /* 8 */ "Fixed FOV", /* 16 */ "No footsteps", /* 32 */ "No item reset", /* 64 */ "No team reset", /* 128 */ "Weapons stay", /* 256 */ "No playerclip", /* 512 */ "Nightmare mode", /* 1024 */ }; #define RTCW_VOTEFLAGS 8 static char *rtcw_voteflags[RTCW_VOTEFLAGS] = { "Restart Map", /* 1 */ "Reset Match", /* 2 */ "Start Match", /* 4 */ "Next Map", /* 8 */ "Swap Teams", /* 16 */ "Game Type", /* 32 */ "Kick Player", /* 64 */ "Change Map", /* 128 */ }; #define WOET_VOTEFLAGS 17 static char *woet_voteflags[WOET_VOTEFLAGS] = { "No Competition Settings", /* 1 */ "No Game Type", /* 2 */ "No Player Kick", /* 4 */ "No Map Change", /* 8 */ "No Match Reset", /* 16 */ "No Mute Spectators", /* 32 */ "No Next Map", /* 64 */ "No Public Settings", /* 128 */ "No Referee", /* 256 */ "No Shuffle Teams by XP", /* 512 */ "No Swap Teams", /* 1024 */ "No Friendly Fire", /* 2048 */ "No Timelimit", /* 4096 */ "No Warmup Damage", /* 8192 */ "No Anti-Lag", /* 16384 */ "No Balanced Teams", /* 32768 */ "No Muting", /* 65536 */ }; static void show_extended_flags (const char *str, char *names[], int size, int showall, GtkCTreeNode *parent) { unsigned long flags; unsigned long mask; char *text[2]; char buf[32]; int i; if (!str || !*str) return; flags = strtoul (str, NULL, 10); if (flags == 0 || flags == ULONG_MAX) return; mask = 1; for (i = 0; flags || (showall && i < size); i++) { if ((showall && names[i]) || (flags & mask) != 0) { g_snprintf (buf, 32, "%lu", mask); text[0] = buf; text[1] = (i < size && names[i])? names[i] : "?????"; gtk_ctree_insert_node (srvinf_ctree, parent, NULL, text, 4, ((flags & mask) != 0)? gplus_pix.pix : rminus_pix.pix, ((flags & mask) != 0)? gplus_pix.mask : rminus_pix.mask, ((flags & mask) != 0)? gplus_pix.pix : rminus_pix.pix, ((flags & mask) != 0)? gplus_pix.mask : rminus_pix.mask, TRUE, FALSE); } flags &= ~mask; mask <<= 1; } } static void show_split_value (const char *str, const char* separator, GtkCTreeNode *parent) { char** values; char* text[2]; unsigned i; values = g_strsplit(str, separator, 0); for(i=0; values && values[i]; ++i) { text[0] = values[i]; text[1] = NULL; gtk_ctree_insert_node (srvinf_ctree, parent, NULL, text, 4, NULL, NULL, NULL, NULL, TRUE, FALSE); } g_strfreev(values); } // TODO: get rid of switch, put game specific functions into game struct void srvinf_ctree_set_server (struct server *s) { char *text[2]; char **info; GtkCTreeNode *node; if (!s || s->info == NULL) { gtk_clist_clear (GTK_CLIST (srvinf_ctree)); return; } info = s->info; gtk_clist_freeze (GTK_CLIST (srvinf_ctree)); gtk_clist_clear (GTK_CLIST (srvinf_ctree)); while (info[0]) { text[0] = (info[0])? info[0] : NULL; text[1] = (info[1])? info[1] : NULL; node = gtk_ctree_insert_node (srvinf_ctree, NULL, NULL, text, 4, NULL, NULL, NULL, NULL, FALSE, TRUE); gtk_ctree_node_set_row_data (srvinf_ctree, node, info); switch (s->type) { case QW_SERVER: if (info[0] && !strcmp (info[0], "teamplay")) { if (s->game && (!g_strcasecmp (s->game, "ctf") || !g_strcasecmp (s->game, "starwars"))) { show_extended_flags (info[1], qw_teamplay_ctf, QW_TEAMPLAY_CTF, FALSE, node); } else if (s->game && !g_strcasecmp (s->game, "fortress")) { show_extended_flags (info[1], qw_teamplay_fortress, QW_TEAMPLAY_TF, FALSE, node); } } break; case Q2_SERVER: if (info[0] && !strcmp (info[0], "dmflags")) { if (s->game && !g_strncasecmp (s->game, "gxmod", 5)) { show_extended_flags (info[1], q2_gxmod_dmflags, Q2_GXMOD_DMFLAGS, FALSE, node); } else if (s->game && !g_strncasecmp (s->game, "xatrix", 6)) { show_extended_flags (info[1], q2_xatrix_dmflags, Q2_XATRIX_DMFLAGS, FALSE, node); } else if (s->game && !g_strncasecmp (s->game, "rogue", 5)) { show_extended_flags (info[1], q2_rogue_dmflags, Q2_ROGUE_DMFLAGS, FALSE, node); } else { show_extended_flags (info[1], q2_dmflags, Q2_DMFLAGS, FALSE, node); } } else if (info[0] && !strcmp (info[0], "ctfflags")) { if (s->game && !g_strncasecmp (s->game, "lmctf", 5)) { show_extended_flags (info[1], q2_lmctf_ctfflags, Q2_LMCTF_CTFFLAGS, FALSE, node); } } else if (info[0] && !strcmp (info[0], "runes")) { if (s->game && !g_strncasecmp (s->game, "lmctf", 5)) { show_extended_flags (info[1], q2_lmctf_runes, Q2_LMCTF_RUNES, TRUE, node); } } else if (info[0] && !strcmp (info[0], "expflags")) { if (s->game && !g_strncasecmp (s->game, "expert", 6)) { show_extended_flags (info[1], q2_expert_expflags, Q2_EXPERT_EXPFLAGS, FALSE, node); } } else if (info[0] && !strcmp (info[0], "weapflags")) { if (s->game && (!g_strncasecmp (s->game, "gxmod", 5) || !g_strcasecmp (s->game, "gx"))) { show_extended_flags (info[1], q2_gxmod_weapflags, Q2_GXMOD_WEAPFLAGS, TRUE, node); } } else if (info[0] && !strcmp (info[0], "powerupflags")) { if (s->game && !g_strncasecmp (s->game, "gxmod", 5)) { show_extended_flags (info[1], q2_gxmod_powerupflags, Q2_GXMOD_POWERUPFLAGS, TRUE, node); } } else if (info[0] && !strcmp (info[0], "wfflags")) { if (s->game && !g_strcasecmp (s->game, "wf")) { show_extended_flags (info[1], q2_wf_wfflags, Q2_WF_WFFLAGS, FALSE, node); } } break; case Q3_SERVER: if (info[0] && !strcmp (info[0], "dmflags")) { if (s->game && !g_strcasecmp (s->game, "generations")) { show_extended_flags (info[1], q3_generations_dmflags, Q3_GENERATIONS_DMFLAGS, FALSE, node); } else if (s->game && !g_strcasecmp (s->game, "freeze")) { show_extended_flags (info[1], q3_freeze_dmflags, Q3_FREEZE_DMFLAGS, FALSE, node); } else { show_extended_flags (info[1], q3_dmflags, Q3_DMFLAGS, FALSE, node); } } else if (info[0] && !g_strcasecmp (info[0], "g_allowvote")) { if (s->game && !g_strcasecmp (s->game, "q3ut3")) { show_extended_flags (info[1], q3_q3ut3_voteflags, Q3_Q3UT3_VOTEFLAGS, FALSE, node); } } else if (info[0] && !g_strcasecmp (info[0], "g_gear")) { if (s->game && !g_strcasecmp (s->game, "q3ut3")) { show_extended_flags (info[1], q3_q3ut3_gearflags, Q3_Q3UT3_GEARFLAGS, FALSE, node); } } else if (info[0] && !strcmp (info[0], "genflags")) { if (s->game && !g_strcasecmp (s->game, "generations")) { show_extended_flags (info[1], q3_generations_genflags, Q3_GENERATIONS_GENFLAGS, FALSE, node); } } break; case WO_SERVER: if (info[0] && !g_strcasecmp (info[0], "g_voteFlags")) { show_extended_flags (info[1], rtcw_voteflags, RTCW_VOTEFLAGS, FALSE, node); } break; case WOET_SERVER: if (info[0] && !g_strcasecmp (info[0], "voteflags")) { show_extended_flags (info[1], woet_voteflags, WOET_VOTEFLAGS, FALSE, node); } break; case UT2_SERVER: case UT2004_SERVER: if (info[0] && !g_strcasecmp (info[0], "mutator")) { show_split_value(info[1], "|", node); } break; default: break; } info += 2; } gtk_ctree_sort_node (srvinf_ctree, NULL); gtk_clist_thaw (GTK_CLIST (srvinf_ctree)); } xqf-1.0.5/src/srv-info.h0000644002404400000620000000172307201342721011734 00000000000000/* XQF - Quake server browser and launcher * Copyright (C) 1998-2000 Roman Pozlevich * * 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 */ #ifndef __SRV_INFO_H__ #define __SRV_INFO_H__ #include "xqf.h" extern void srvinf_ctree_set_server (struct server *s); #endif /* __SRV_INFO_H__ */ xqf-1.0.5/src/scripts.c0000644002404400000620000005121110275434302011652 00000000000000/* XQF - Quake server browser and launcher * Functions for plugin script handing * Copyright (C) 2005 Ludwig Nussel * * 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 */ #include "gnuconfig.h" #include #include #include #include #include "game.h" #include "server.h" #include "xqf.h" #include "utils.h" #include "debug.h" #include "scripts.h" #include "config.h" #include "i18n.h" #include "dialogs.h" static unsigned MAX_SCRIPT_VERSION = 1; static GSList* scriptdirs; static GList* scripts = NULL; GData* scriptdata = NULL; typedef enum { ONSTART, ONQUIT, ONGAMESTART, ONGAMEQUIT, NUM_ACTIONS } ScriptActionType; static const char* action_key[] = { "start", "quit", "gamestart", "gamequit", NULL }; static GSList* action[NUM_ACTIONS]; enum script_option_type { SCRIPT_OPTION_TYPE_BOOL, SCRIPT_OPTION_TYPE_INT, SCRIPT_OPTION_TYPE_STRING, SCRIPT_OPTION_TYPE_LIST, NUM_SCRIPT_OPTION_TYPES, SCRIPT_OPTION_TYPE_INVALID = NUM_SCRIPT_OPTION_TYPES }; typedef struct { char* name; char* summary; char* author; char* license; GSList* options; } Script; typedef struct { enum script_option_type type; char* name; char* section; GtkWidget* widget; char* defval; // valid for string, int and list int enable; // only valid for boolean type GPtrArray* list; // list of strings, only valid for list type } ScriptOption; static GtkWidget* notebook; static void install_file_dialog_ok_callback (GtkWidget *widget, gpointer data); static void install_button_callback (GtkWidget *widget, gpointer data); void scripts_add_dir(const char* dir) { scriptdirs = g_slist_prepend(scriptdirs,g_strdup (dir)); } static char* script_filter(const char* dir, const char* name) { char buf[PATH_MAX]; struct stat stb; snprintf(buf, sizeof(buf), "%s/%s", dir, name); if(!strcmp(buf, ".") || !strcmp(buf, "..")) return NULL; if(stat(buf, &stb) == -1) return NULL; if(S_ISREG(stb.st_mode) && (stb.st_mode & 0111)) return strdup(name); return NULL; } static enum script_option_type scriptoption_get_type(const char* str) { if(!strcmp(str, "string")) return SCRIPT_OPTION_TYPE_STRING; else if(!strcmp(str, "int")) return SCRIPT_OPTION_TYPE_INT; else if(!strcmp(str, "bool")) return SCRIPT_OPTION_TYPE_BOOL; else if(!strcmp(str, "list")) return SCRIPT_OPTION_TYPE_LIST; else return SCRIPT_OPTION_TYPE_INVALID; } static ScriptOption* scriptoption_new(const char* typestr) { ScriptOption* opt; enum script_option_type type; if(!typestr) return NULL; type = scriptoption_get_type(typestr); if(type == SCRIPT_OPTION_TYPE_INVALID) return NULL; opt = g_new0(ScriptOption, 1); opt->type = type; return opt; } static void scriptoption_free(ScriptOption* opt) { g_free(opt->name); g_free(opt->defval); g_free(opt->section); g_ptr_array_free(opt->list, TRUE); g_free(opt); } static Script* script_new() { return g_new0(Script, 1); } static void script_free(Script* s) { g_free(s->name); g_free(s->summary); g_free(s->author); g_free(s->license); g_slist_foreach(s->options, (GFunc)(scriptoption_free), NULL); g_free(s); } void scripts_load() { GSList* dir; GList* s; unsigned i; char path[PATH_MAX]; if(!scriptdata) g_datalist_init(&scriptdata); /* g_datalist_get_data(&scriptdata, "foo"); g_datalist_set_data_full(&scriptdata,"foo",value,g_free); */ for(dir = scriptdirs; dir; dir = g_slist_next(dir)) { GList* s = dir_to_list(dir->data, script_filter); scripts = merge_sorted_string_lists(scripts, s); } for (s = scripts; s; s = g_list_next(s)) { unsigned version; config_section_iterator* sit; Script* script; const char* filename = s->data; char* errtitle = _("Script error"); // already known? if(g_datalist_get_data(&scriptdata, filename)) continue; script = script_new(); snprintf(path, sizeof(path), "/scripts/%s/General", filename); config_push_prefix(path); version = config_get_int("xqf version"); script->summary = config_get_string("summary"); script->author = config_get_string("author"); script->license = config_get_string("license"); config_pop_prefix(); if(version > MAX_SCRIPT_VERSION) { dialog_ok(errtitle, _("Script %s has version %d, xqf only supports version %d."), filename, version, MAX_SCRIPT_VERSION); script_free(script); continue; } if(!script->summary) { dialog_ok(errtitle, _("Script %s missing summary."), filename); script_free(script); continue; } if(!script->author) { dialog_ok(errtitle, _("Script %s missing author."), filename); script_free(script); continue; } if(!script->license) { dialog_ok(errtitle, _("Script %s missing license."), filename); script_free(script); continue; } script->name = g_strdup(filename); snprintf(path, sizeof(path), "/scripts/%s/Action", filename); config_push_prefix(path); for(i = 0; i < NUM_ACTIONS; ++i) { gboolean on = config_get_bool(action_key[i]); if(on) action[i] = g_slist_prepend(action[i], script); } config_pop_prefix(); // treat script property 'enabled' as option as it has a widget // so it's easier to handle later { ScriptOption* opt; snprintf(path, sizeof(path), "/" CONFIG_FILE "/scripts/%s/enabled=false", filename); opt = scriptoption_new("bool"); opt->enable = config_get_bool(path); // Translator: whether this plugin script is enabled opt->name = _("Enabled"); opt->section = g_strdup("enabled"); script->options = g_slist_prepend(script->options, opt); } snprintf(path, sizeof(path), "/scripts/%s", filename); sit = config_init_section_iterator(path); while(sit) { char* sname = NULL; sit = config_section_iterator_next(sit, &sname); if(strlen(sname) > 7 && !strncmp(sname, "option ", 7)) { char* typestr; char* name; ScriptOption* opt; char settings_path[PATH_MAX]; snprintf(settings_path, sizeof(settings_path), "/" CONFIG_FILE "/scripts/%s/%s", filename, sname); snprintf(path, sizeof(path), "/scripts/%s/%s", filename, sname); config_push_prefix(path); typestr = config_get_string("type"); name = config_get_string("name"); opt = scriptoption_new(typestr); g_free(typestr); if(!opt || !name) { xqf_warning("script %s: invalid option %s", filename, sname+7); goto next; } opt->name = name; opt->section = sname; switch(opt->type) { case SCRIPT_OPTION_TYPE_LIST: { config_key_iterator* it; it = config_init_iterator(path); if(!opt->list) opt->list = g_ptr_array_new(); while(it) { char* key = NULL; char* val = NULL; it = config_iterator_next(it, &key, &val); if(!strncmp(key, "value",5)) { g_ptr_array_add(opt->list, val); } else { g_free(val); } g_free(key); } } // fall through case SCRIPT_OPTION_TYPE_STRING: case SCRIPT_OPTION_TYPE_INT: { char* defval = NULL; char* curval = NULL; defval = config_get_string("default"); curval = config_get_string(settings_path); if(curval) opt->defval = g_strdup(curval); else if(defval) opt->defval = g_strdup(defval); g_free(defval); g_free(curval); } break; case SCRIPT_OPTION_TYPE_BOOL: { gboolean defval; gboolean curval; int is_deflt = 0; defval = config_get_bool("default=false"); curval = config_get_bool_with_default(settings_path, &is_deflt); if(is_deflt) opt->enable = defval; else opt->enable = curval; } break; case SCRIPT_OPTION_TYPE_INVALID: xqf_error("unreachable code"); break; } script->options = g_slist_prepend(script->options, opt); next: config_pop_prefix(); } } script->options = g_slist_reverse(script->options); g_datalist_set_data_full(&scriptdata, filename, script, (GDestroyNotify)script_free); snprintf(path, sizeof(path), "/scripts/%s", filename); config_drop_file(path); } } void scripts_done() { g_datalist_clear(&scriptdata); } static GtkWidget* create_script_option_widget(Script* script, ScriptOption* opt) { GtkWidget* ret = NULL; opt->widget = NULL; switch(opt->type) { case SCRIPT_OPTION_TYPE_STRING: case SCRIPT_OPTION_TYPE_INT: { GtkWidget* hbox = ret = gtk_hbox_new(FALSE, 0); GtkWidget* label = gtk_label_new(opt->name); GtkWidget* entry = opt->widget = gtk_entry_new(); gtk_label_set_justify(GTK_LABEL(label), GTK_JUSTIFY_LEFT); gtk_box_pack_start(GTK_BOX(hbox), label, TRUE, TRUE, 4); gtk_box_pack_start(GTK_BOX(hbox), entry, FALSE, FALSE, 4); if(opt->defval) { gtk_entry_set_text(GTK_ENTRY(entry), opt->defval); } gtk_widget_show(hbox); gtk_widget_show(label); gtk_widget_show(entry); } break; case SCRIPT_OPTION_TYPE_BOOL: { GtkWidget* button = ret = opt->widget = gtk_check_button_new_with_label(opt->name); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(button), opt->enable); gtk_widget_show(button); } break; case SCRIPT_OPTION_TYPE_LIST: { GtkWidget* hbox = ret = gtk_hbox_new(FALSE, 0); GtkWidget* label = gtk_label_new(opt->name); GtkWidget* combo = gtk_combo_new (); GList* list = NULL; unsigned i; for(i = 0; i < opt->list->len; ++i) { list = g_list_append(list, g_ptr_array_index(opt->list, i)); } gtk_combo_set_popdown_strings(GTK_COMBO (combo), list); g_list_free(list); gtk_combo_set_use_arrows_always (GTK_COMBO (combo), TRUE); gtk_list_set_selection_mode (GTK_LIST (GTK_COMBO (combo)->list), GTK_SELECTION_BROWSE); if(opt->defval) { gtk_entry_set_text (GTK_ENTRY (GTK_COMBO (combo)->entry), opt->defval); } opt->widget = GTK_COMBO(combo)->entry; gtk_box_pack_start(GTK_BOX(hbox), label, TRUE, TRUE, 4); gtk_box_pack_start(GTK_BOX(hbox), combo, FALSE, FALSE, 4); gtk_widget_show(combo); gtk_widget_show(label); gtk_widget_show(hbox); } break; case SCRIPT_OPTION_TYPE_INVALID: xqf_error("unreachable code"); break; } gtk_widget_ref(opt->widget); return ret; } void unref_option_widgets(Script* script) { GSList* optlist; for(optlist = script->options; optlist; optlist = g_slist_next(optlist)) { ScriptOption* opt = optlist->data; gtk_widget_unref(opt->widget); opt->widget = NULL; } } static GtkWidget *generic_script_frame(const char* filename, Script* script) { GtkWidget *frame; GtkWidget *page_vbox; GtkWidget *label; GtkWidget *vbox; ScriptOption* opt; GSList* optlist; page_vbox = gtk_vbox_new (FALSE, 4); frame = gtk_frame_new (NULL); gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_ETCHED_OUT); { GString* s = g_string_new(script->summary); g_string_sprintfa(s, "\nAuthor: %s", script->author); g_string_sprintfa(s, "\nLicense: %s", script->license); label = gtk_label_new (s->str); gtk_container_add (GTK_CONTAINER (frame), label); gtk_widget_show (label); g_string_free(s, TRUE); } gtk_box_pack_start (GTK_BOX (page_vbox), frame, FALSE, FALSE, 0); gtk_widget_show (frame); optlist = script->options; // first option is whether script is enabled { GtkWidget* widget; opt=optlist->data; widget = create_script_option_widget(script, opt); gtk_box_pack_start(GTK_BOX(page_vbox), widget, FALSE, FALSE, 4); optlist = g_slist_next(optlist); } frame = gtk_frame_new (_("Options")); vbox = gtk_vbox_new (FALSE, 4); gtk_container_add (GTK_CONTAINER (frame), vbox); for(; optlist; optlist = g_slist_next(optlist)) { GtkWidget* widget; opt = optlist->data; widget = create_script_option_widget(script, opt); gtk_box_pack_start(GTK_BOX(vbox), widget, FALSE, FALSE, 4); } gtk_widget_show (vbox); gtk_box_pack_start (GTK_BOX (page_vbox), frame, FALSE, FALSE, 0); gtk_widget_show (frame); gtk_widget_show (page_vbox); return page_vbox; } static void scripts_page_select_callback(GtkItem *item, gpointer d) { unsigned i = GPOINTER_TO_INT(d); gtk_notebook_set_page (GTK_NOTEBOOK (notebook), i); } GtkWidget *scripts_config_page () { GtkWidget *page_vbox; GtkWidget *frame; GtkWidget *vbox; GtkWidget *button; GtkWidget *label; GtkWidget *gtklist=NULL; GtkWidget *scrollwin=NULL; GtkWidget *games_hbox; unsigned i = 0; GList* s; page_vbox = gtk_vbox_new (FALSE, 0); gtk_container_set_border_width (GTK_CONTAINER (page_vbox), 8); games_hbox = gtk_hbox_new (FALSE, 0); gtk_container_set_border_width (GTK_CONTAINER (games_hbox), 0); gtk_box_pack_start (GTK_BOX (page_vbox), games_hbox, TRUE, TRUE, 0); vbox = gtk_vbox_new (FALSE, 0); frame = gtk_frame_new (NULL); gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN); scrollwin = gtk_scrolled_window_new (NULL, NULL); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrollwin), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); gtklist = gtk_list_new (); gtk_widget_set_usize (gtklist, 136, -1); // gtk_container_add (GTK_CONTAINER (scrollwin), gtklist); gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(scrollwin), gtklist); gtk_container_add (GTK_CONTAINER (frame), scrollwin); gtk_box_pack_start (GTK_BOX (vbox), frame, TRUE, TRUE, 0); button = gtk_button_new_with_label(_("Install ...")); gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0); gtk_signal_connect (GTK_OBJECT (button), "clicked", install_button_callback, NULL ); #if have_time_to_implement_that button = gtk_button_new_with_label(_("Remove")); gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0); #endif gtk_box_pack_start (GTK_BOX (games_hbox), vbox, FALSE, FALSE, 0); notebook = gtk_notebook_new (); // the tabs are hidden, so nobody will notice its a notebook gtk_notebook_set_show_tabs (GTK_NOTEBOOK (notebook), FALSE); gtk_notebook_set_show_border (GTK_NOTEBOOK (notebook), FALSE); gtk_box_pack_start (GTK_BOX (games_hbox), notebook, FALSE, FALSE, 15); for (s = scripts; s; s = g_list_next(s), ++i) { const char* filename = s->data; GtkWidget *page; GtkWidget* item; Script* script; script = g_datalist_get_data(&scriptdata, filename); item = gtk_list_item_new(); if(s == scripts) gtk_list_item_select(GTK_LIST_ITEM(item)); gtk_container_add (GTK_CONTAINER (item), gtk_label_new(filename)); gtk_signal_connect (GTK_OBJECT (item), "select", GTK_SIGNAL_FUNC(scripts_page_select_callback), GINT_TO_POINTER(i)); gtk_widget_show_all(item); gtk_container_add (GTK_CONTAINER (gtklist), item); label = gtk_label_new (filename); if(script) { page = generic_script_frame(filename, script); gtk_object_set_data_full (GTK_OBJECT (notebook), filename, script, (GtkDestroyNotify) unref_option_widgets); } else { page = gtk_label_new(_("Invalid script")); gtk_widget_show(page); } gtk_notebook_append_page (GTK_NOTEBOOK (notebook), page, label); } gtk_widget_show_all (page_vbox); return page_vbox; } gboolean check_script_prefs() { return TRUE; } void save_script_prefs() { GList* s; char path[PATH_MAX]; unsigned i; for (s = scripts; s; s = g_list_next(s), ++i) { Script* script; GSList* optlist; script = g_datalist_get_data(&scriptdata, s->data); if(!script) { xqf_error("no data for script %s", s->data); continue; } snprintf(path, sizeof(path), "/" CONFIG_FILE "/scripts/%s", (char*)s->data); config_push_prefix(path); for(optlist = script->options; optlist; optlist = g_slist_next(optlist)) { ScriptOption* opt = optlist->data; const char* val = NULL; int enable = 0; switch(opt->type) { case SCRIPT_OPTION_TYPE_STRING: case SCRIPT_OPTION_TYPE_INT: case SCRIPT_OPTION_TYPE_LIST: val = gtk_entry_get_text(GTK_ENTRY(opt->widget)); if(!strlen(val)) val = NULL; if((!val && opt->defval) || (val && !opt->defval) || (val && opt->defval && strcmp(opt->defval, val))) { g_free(opt->defval); debug(4, "set %s/%s=%s (before: %s)", s->data, opt->section, val, opt->defval); if(opt->type == SCRIPT_OPTION_TYPE_INT) { int tmp = val?atoi(val):0; config_set_int(opt->section, tmp); opt->defval = g_strdup_printf("%d", tmp); } else { config_set_string(opt->section, val?val:""); opt->defval = val?strdup(val):NULL; } } break; case SCRIPT_OPTION_TYPE_BOOL: enable = GTK_TOGGLE_BUTTON(opt->widget)->active; if(enable != opt->enable) { config_set_bool(opt->section, enable); debug(4, "set %s/%s=%d", s->data, opt->section, enable); opt->enable = enable; } break; case SCRIPT_OPTION_TYPE_INVALID: break; } } config_pop_prefix(); } } struct script_env_callback_data { struct game* g; struct server* s; Script* script; }; void script_set_env(void* data) { char buf[256]; GSList* l; struct script_env_callback_data* d = data; server_set_env(d->s); for (l = g_slist_next(d->script->options); l; l = g_slist_next(l)) { ScriptOption* opt = l->data; debug(4, "%s %s", opt->section, opt->defval); snprintf(buf, sizeof(buf), "XQF_SCRIPT_OPTION_%s", opt->section+7); switch(opt->type) { case SCRIPT_OPTION_TYPE_STRING: case SCRIPT_OPTION_TYPE_INT: case SCRIPT_OPTION_TYPE_LIST: if(opt->defval) setenv(buf, opt->defval, 1); break; case SCRIPT_OPTION_TYPE_BOOL: setenv(buf, opt->enable?"true":"false", 1); break; case SCRIPT_OPTION_TYPE_INVALID: xqf_error("unreachable code"); break; } } } static void run_scripts(ScriptActionType type, struct game* g, struct server* s) { GSList* l; debug(4, "%s", action_key[type]); for (l = action[type]; l; l = g_slist_next(l)) { char path[PATH_MAX] = ""; const char* cmd[3]; Script* script = l->data; GSList* dir; if(!((ScriptOption*)(script->options->data))->enable) continue; for(dir = scriptdirs; dir; dir = g_slist_next(dir)) { snprintf(path, sizeof(path), "%s/%s", (char*)dir->data, script->name); debug(4, "check %s", path); if(access(path, X_OK)) { if(access(path, R_OK) == 0) xqf_warning("%s not executable, not running it", path); path[0] = '\0'; } else break; } if(path[0]) { struct script_env_callback_data data; cmd[0] = path; cmd[1] = action_key[type]; cmd[2] = NULL; data.s = s; data.g = g; data.script = script; debug(3, "running script %s %s", cmd[0], cmd[1]); run_program_sync_callback(cmd, script_set_env, &data); } } } void script_action_start() { run_scripts(ONSTART, NULL, NULL); } void script_action_quit() { run_scripts(ONQUIT, NULL, NULL); } void script_action_gamestart(struct game* g, struct server* s) { run_scripts(ONGAMESTART, g, s); } void script_action_gamequit(struct game* g, struct server* s) { run_scripts(ONGAMEQUIT, g, s); } void install_file_dialog_ok_callback (GtkWidget *widget, gpointer data) { const char *filename = NULL; char dest[PATH_MAX]; GtkWidget* filesel = topmost_parent(widget); const char* msg; filename = gtk_file_selection_get_filename (GTK_FILE_SELECTION (filesel)); if (!filename) return; mkdir((const char*)scriptdirs->data, 0777); snprintf(dest, sizeof(dest), "%s/%s", (const char*)scriptdirs->data, g_basename(filename)); if(!access(dest, F_OK)) { if(!dialog_yesno(NULL, 0, NULL, NULL, _("Script %s already exists, overwrite?"), dest)) return; } if((msg = copy_file(filename, dest))) { dialog_ok(NULL, "%s", msg); return; } g_datalist_remove_data(&scriptdata, g_basename(filename)); scripts_load(); dialog_ok(NULL, _("Script saved as\n%s\nPlease close and reopen the preferences dialog"), dest); } void install_button_callback (GtkWidget *widget, gpointer data) { file_dialog(_("Select Script"), install_file_dialog_ok_callback, NULL); } xqf-1.0.5/src/scripts.h0000644002404400000620000000240310262022614011651 00000000000000/* XQF - Quake server browser and launcher * Functions for plugin script handing * Copyright (C) 2005 Ludwig Nussel * * 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 */ #ifndef XQF_SCRIPTS_H #define XQF_SCRIPTS_H #include void scripts_add_dir(const char* dir); void scripts_load(); GtkWidget *scripts_config_page(); gboolean check_script_prefs(); void save_script_prefs(); void script_action_start(); void script_action_quit(); void script_action_gamestart(struct game* g, struct server* s); void script_action_gamequit(struct game* g, struct server* s); #endif xqf-1.0.5/src/srv-list.c0000644002404400000620000004744210275434302011761 00000000000000/* XQF - Quake server browser and launcher * Copyright (C) 1998-2000 Roman Pozlevich * * 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 */ #include "gnuconfig.h" #include #include /* inet_ntoa */ #include /* inet_ntoa */ #include /* inet_ntoa */ #include /* strncpy */ #include "i18n.h" #include "xqf-ui.h" #include "game.h" #include "sort.h" #include "skin.h" #include "filter.h" #include "utils.h" #include "pref.h" #include "host.h" #include "server.h" #include "source.h" #include "stat.h" #include "psearch.h" #include "dialogs.h" #include "pixmaps.h" #include "srv-info.h" #include "srv-list.h" #include "srv-prop.h" /*pulp*/ #include "country-filter.h" GSList *qw_colors_pixmap_cache = NULL; GSList *server_pixmap_cache = NULL; static int sync_selection_blocked = FALSE; static void get_server_pixmap (GtkWidget *window, struct server *s, GSList **cache, GdkPixmap **pix, GdkBitmap **mask) { unsigned key; if (!s || !window || !buddy_pix[1].pix) { *pix = NULL; *mask = NULL; return; } key = ((s->flags & PLAYER_GROUP_MASK) << 8) + s->type; if (cache) { pixmap_cache_lookup (*cache, pix, mask, key); if (*pix) return; } create_server_pixmap (window, games[s->type].pix, s->flags & PLAYER_GROUP_MASK, pix, mask); if (cache) pixmap_cache_add (cache, *pix, *mask, key); } enum pixmap2flags { PIX_PASSWORD = 0x001, PIX_PUNKBUSTER = 0x002, }; struct pixmap* pix2array[] = { NULL, &locked_pix, &punkbuster_pix, &locked_punkbuster_pix }; static struct pixmap* get_server_pixmap2(struct server* s) { unsigned flags = 0; if (s->flags & SERVER_PASSWORD ) flags |= PIX_PASSWORD; if (s->flags & SERVER_PUNKBUSTER) flags |= PIX_PUNKBUSTER; return pix2array[flags]; } void assemble_server_address (char *buf, int size, const struct server *s) { if (show_default_port || games[s->type].default_port != s->port) { g_snprintf (buf, size, "%s:%d", (show_hostnames && s->host->name)? s->host->name : inet_ntoa (s->host->ip), s->port); } else { strncpy (buf, (show_hostnames && s->host->name)? s->host->name : inet_ntoa (s->host->ip), size); } } static int server_clist_refresh_row (struct server *s, int row) { GdkPixmap *server_pixmap; GdkBitmap *server_pixmask; char *text[9]; #ifdef USE_GEOIP struct pixmap* countrypix = NULL; #endif char buf1[256], buf2[32], buf3[32], buf4[32]; char *retries; struct pixmap *retries_pix = NULL; int col; // char* private_col_text = ""; int slots_buffer; unsigned short players = 0; struct server_props *p; text[0] = NULL; assemble_server_address (buf1, 256, s); text[1] = buf1; debug (7, "server_clist_refresh_row() -- Row %d", row); if (s->ping >= 0) { g_snprintf (buf2, 32, "%d", (s->ping > MAX_PING)? MAX_PING : s->ping); text[2] = buf2; } else { text[2] = "n/a"; } retries_pix = &server_status[0]; if (s->retries >= 0) { if (s->ping == MAX_PING + 1) { retries = "D"; /* DOWN */ retries_pix = &server_status[2]; } else if (s->ping == MAX_PING) { retries = "T"; /* TIMEOUT */ retries_pix = &server_status[3]; } else { g_snprintf (buf3, 32, "%d", s->retries); /* UP */ retries = buf3; retries_pix = &server_status[1]; } } else { retries = "?"; retries_pix = &server_status[0]; } if (xqf_start_time > s->refreshed) retries_pix = &server_status[0]; text[3] = text[4] = NULL; players = s->curplayers; if(serverlist_countbots && s->curbots <= players) players-=s->curbots; if(s->private_client) g_snprintf (buf4, 32, "%d/%d(-%d)", players, s->maxplayers,s->private_client); else g_snprintf (buf4, 32, "%d/%d", players, s->maxplayers); // set text only if no players are on the server. Otherwise an icon is added // later together with this text text[5] = (!players)? buf4 : NULL; text[6] = (s->map) ? s->map : NULL; text[7] = (s->game)? s->game : NULL; text[8] = (s->gametype) ? s->gametype : NULL; if (row < 0) { row = gtk_clist_append (server_clist, text); } else { for (col = 1; col < 9; col++) { gtk_clist_set_text (server_clist, row, col, text[col]); } } gtk_clist_set_pixtext (server_clist, row, 3, retries, 2, retries_pix->pix, retries_pix->mask); #if 0 if (s->curplayers) { gtk_clist_set_pixtext (server_clist, row, 4, buf4, 2, (s->curplayers >= s->maxplayers)? man_red_pix.pix : man_black_pix.pix, (s->curplayers >= s->maxplayers)? man_red_pix.mask : man_black_pix.mask); } #endif /*pulp*/ p = properties (s); if (p) { if (p->reserved_slots) { slots_buffer=p->reserved_slots; } else { slots_buffer=0; } } else { slots_buffer=0; } if (players >= (s->maxplayers-slots_buffer)) gtk_clist_set_pixtext (server_clist, row, 5, buf4, 2, man_red_pix.pix, man_red_pix.mask ); else if ( (players + s->private_client ) >= s->maxplayers) gtk_clist_set_pixtext (server_clist, row, 5, buf4, 2, man_yellow_pix.pix, man_yellow_pix.mask ); else if (players) gtk_clist_set_pixtext (server_clist, row, 5, buf4, 2, man_black_pix.pix, man_black_pix.mask ); { struct pixmap* pix = get_server_pixmap2(s); if(pix && pix->pix) gtk_clist_set_pixmap (server_clist, row, 4, pix->pix, pix->mask ); } get_server_pixmap (main_window, s, &server_pixmap_cache, &server_pixmap, &server_pixmask); gtk_clist_set_pixtext (server_clist, row, 0, (s->name)? s->name : "", 2, server_pixmap, server_pixmask); #ifdef USE_GEOIP countrypix = get_pixmap_for_country_with_fallback(s->country_id); if(countrypix) gtk_clist_set_pixtext (server_clist, row, 1, text[1], 2, countrypix->pix, countrypix->mask); #endif // if map not available if(games[s->type].has_map && games[s->type].has_map(s) == FALSE) { gtk_clist_set_pixtext (server_clist, row, 6, s->map, 2, rminus_pix.pix, rminus_pix.mask ); } if(s->flags & SERVER_INCOMPATIBLE) { GtkStyle *style; style = gtk_widget_get_style(GTK_WIDGET(server_clist)); if(style) { gtk_clist_set_foreground(server_clist,row,&style->fg[GTK_STATE_INSENSITIVE]); } } gdk_pixmap_unref (server_pixmap); gdk_bitmap_unref (server_pixmask); return row; } static int player_clist_refresh_row (struct server *s, struct player *p, int row) { GdkPixmap *qw_colors_pixmap = NULL; char *text[6]; char buf1[32], buf2[32], buf3[32], buf4[32]; char skin_buf[128]; int col; if ((games[s->type].flags & GAME_QUAKE1_PLAYER_COLORS) != 0) allocate_quake_player_colors (main_window->window); text[0] = text[1] = text[2] = text[3] = text[4] = text[5] = NULL; if (p->name && (p->flags & PLAYER_GROUP_MASK) == 0) text[0] = p->name; g_snprintf (buf1, 32, "%d", p->frags); text[1] = buf1; if (p->model && p->skin && strlen(p->model) && strlen(p->skin)) { g_snprintf (skin_buf, 128, "%s/%s", p->model, p->skin); text[3] = skin_buf; } else { if (p->model) text[3] = p->model; if (p->skin) text[3] = p->skin; } if (p->ping >= 0) { g_snprintf (buf3, 32, "%d", p->ping); text[4] = buf3; } if (p->time >= 0) { g_snprintf (buf4, 32, "%02d:%02d", p->time / 60 / 60, p->time / 60 % 60); text[5] = buf4; } if (row < 0) { row = gtk_clist_append (player_clist, text); } else { for (col = 1; col < 7; col++) { gtk_clist_set_text (player_clist, row, col, text[col]); } } if ((games[s->type].flags & GAME_QUAKE1_PLAYER_COLORS) != 0) { qw_colors_pixmap = qw_colors_pixmap_create (main_window, p->shirt, p->pants, &qw_colors_pixmap_cache); g_snprintf (buf2, 32, "%d:%d", p->shirt, p->pants); gtk_clist_set_pixtext (player_clist, row, 2, buf2, 2, qw_colors_pixmap, NULL); gdk_pixmap_unref (qw_colors_pixmap); } if ((p->flags & PLAYER_GROUP_MASK) == 0) { gtk_clist_set_text (player_clist, row, 0, (p->name)? p->name : ""); gtk_clist_set_shift (player_clist, row, 0, 0, pixmap_width (buddy_pix[1].pix) + 2); } else { ensure_buddy_pix (main_window, p->flags & PLAYER_GROUP_MASK); gtk_clist_set_shift (player_clist, row, 0, 0, 0); gtk_clist_set_pixtext (player_clist, row, 0, (p->name)? p->name : "", 2, buddy_pix[p->flags & PLAYER_GROUP_MASK].pix, buddy_pix[p->flags & PLAYER_GROUP_MASK].mask); } return row; } void player_clist_set_server (struct server *s) { GSList *plist; struct player *p; int row; if (!s || !s->players) { if (player_clist->rows > 0) gtk_clist_clear (player_clist); return; } gtk_clist_freeze (player_clist); gtk_clist_clear (player_clist); for (plist = s->players; plist; plist = plist->next) { p = (struct player *) plist->data; row = player_clist_refresh_row (s, p, -1); gtk_clist_set_row_data (player_clist, row, p); } gtk_clist_sort (player_clist); gtk_clist_thaw (player_clist); pixmap_cache_clear (&qw_colors_pixmap_cache, 10); } void player_clist_redraw (void) { struct player *p; int i; #ifdef DEBUG fprintf (stderr, "player_clist_redraw()\n"); #endif if (!cur_server || player_clist->rows == 0) return; gtk_clist_freeze (player_clist); for (i = 0; i < player_clist->rows; i++) { p = (struct player *) gtk_clist_get_row_data (player_clist, i); player_clist_refresh_row (cur_server, p, i); } gtk_clist_thaw (player_clist); pixmap_cache_clear (&qw_colors_pixmap_cache, 10); } void server_clist_sync_selection (void) { GList *selection; if(!server_clist) return; debug (7, "server_clist_sync_selection() --"); if (!sync_selection_blocked) { selection = server_clist->selection; if (cur_server) { debug (7, "server_clist_sync_selection() -- unref server %lx", cur_server); server_unref (cur_server); cur_server = NULL; } if (selection && !selection->next) { cur_server = (struct server *) gtk_clist_get_row_data ( server_clist, GPOINTER_TO_INT(selection->data)); server_ref (cur_server); } player_clist_set_server (cur_server); srvinf_ctree_set_server (cur_server); set_widgets_sensitivity (); } } int server_clist_refresh_server (struct server *s) { int row; debug (6, "server_clist_refresh_server() -- Server %lx", s ); apply_filters (cur_filter | FILTER_PLAYER_MASK, s); row = gtk_clist_find_row_from_data (server_clist, s); if (row >= 0) { debug (6, "server_clist_refresh_server() -- Server %lx is at row %d", s, row ); if (default_refresh_sorts && (s->filters & cur_filter) != cur_filter) { gtk_clist_remove (server_clist, row); return FALSE; } else { server_clist_refresh_row (s, row); return TRUE; } } else { if ((s->filters & cur_filter) == cur_filter) { debug (6, "server_clist_refresh_server() -- Server %lx needs to be added."); row = server_clist_refresh_row (s, -1); gtk_clist_set_row_data_full (server_clist, row, s, (GtkDestroyNotify) server_unref); server_ref (s); return TRUE; } } return FALSE; } void server_clist_select_one (int row) { debug (7, "server_clist_select_one() -- Row %d", row); sync_selection_blocked = TRUE; gtk_clist_unselect_all (server_clist); sync_selection_blocked = FALSE; gtk_clist_select_row (server_clist, row, -1); server_clist_selection_visible(); } GSList *server_clist_selected_servers (void) { GList *rows = server_clist->selection; GSList *list = NULL; struct server *s; debug (6, "server_clist_selected_servers() --"); while (rows) { s = (struct server *) gtk_clist_get_row_data ( server_clist, GPOINTER_TO_INT(rows->data)); list = server_list_prepend (list, s); rows = rows->next; } return list; } GSList *server_clist_get_n_servers (int amount) { GSList *list = NULL; struct server *server; int row; for (row = 0; (row < server_clist->rows && row < amount) ; row++) { server = (struct server *) gtk_clist_get_row_data (server_clist, row); list = server_list_prepend (list, server); } return g_slist_reverse (list); } /* server_clist_all_servers -- Return all servers that are in the server clist widget. It returns a new list. Note that the prepend function adds one to the reference count. */ GSList *server_clist_all_servers (void) { GSList *list = NULL; struct server *server; int row; debug (6, "start"); for (row = 0; row < server_clist->rows; row++) { server = (struct server *) gtk_clist_get_row_data (server_clist, row); list = server_list_prepend (list, server); } debug (6, "Return list %lx", list); return g_slist_reverse (list); } void server_clist_selection_visible (void) { GList *rows; GList *row; GtkVisibility vis; int min; debug (7, "server_clist_selection_visible() -- "); if(!server_clist) return; rows = server_clist->selection; if (!rows) return; for (row = rows; row; row = row->next) { vis = gtk_clist_row_is_visible (server_clist, GPOINTER_TO_INT(row->data)); if (vis == GTK_VISIBILITY_FULL) return; } min = GPOINTER_TO_INT(rows->data); for (row = rows->next; row; row = row->next) { if (min > GPOINTER_TO_INT(row->data)) min = GPOINTER_TO_INT(row->data); } if (rows->next) /* if (g_list_length (rows) > 1) */ gtk_clist_moveto (server_clist, min, 0, 0.2, 0.0); else gtk_clist_moveto (server_clist, min, 0, 0.5, 0.0); } void server_clist_show_hostname (struct host *h) { struct server *s; char buf[256]; int row; if (!h->name) return; /* Freezing and sorting should be done in upper-level function */ for (row = 0; row < server_clist->rows; row++) { s = (struct server *) gtk_clist_get_row_data (server_clist, row); if (s->host == h) { assemble_server_address (buf, 256, s); gtk_clist_set_text (server_clist, row, 1, buf); } } } void server_clist_redraw (void) { struct server *s; char buf[256]; int row; debug (7, "server_clist_redraw() --"); gtk_clist_freeze (server_clist); for (row = 0; row < server_clist->rows; row++) { s = (struct server *) gtk_clist_get_row_data (server_clist, row); assemble_server_address (buf, 256, s); gtk_clist_set_text (server_clist, row, 1, buf); } if (server_clist->sort_column == SORT_SERVER_ADDRESS) gtk_clist_sort (server_clist); gtk_clist_thaw (server_clist); } void server_clist_set_list (GSList *servers) { GSList *list; struct server *server; int row; GSList *filtered; debug (7, "server_clist_set_list() -- list %lx", servers); filtered = build_filtered_list (cur_filter, servers); gtk_clist_freeze (server_clist); gtk_clist_clear (server_clist); if (filtered) { for (list = filtered; list; list = list->next) { server = (struct server *) list->data; row = server_clist_refresh_row (server, -1); gtk_clist_set_row_data_full (server_clist, row, server, (GtkDestroyNotify) server_unref); /* Because the a destroy event on the server_clist will call server_unref, we want to add a reference to count to the server. Note if we comment out both the ref line and the list_free line we have a net sum of zero. But just for clarity... */ server_ref (server); } server_list_free (filtered); gtk_clist_sort (server_clist); } gtk_clist_thaw (server_clist); pixmap_cache_clear (&server_pixmap_cache, 8); server_clist_sync_selection (); debug (7, "server_clist_set_list() -- Done."); } /** filter server_list through server filter and display result in clist */ void server_clist_build_filtered (GSList *server_list, int update) { /* This gets called whenever a user clicks the filter button */ // GSList *delete; // GSList *add; // GSList *tmp; // struct server *server; int row; debug(3, "update: %d", update); #if 0 delete = server_clist_all_servers (); add = build_filtered_list (cur_filter, server_list); /* in filter.c */ server_lists_intersect (&delete, &add); gtk_clist_freeze (server_clist); /* If there are entries in the server clist, we want to first remove them. Be sure to decrement the reference count as we will be adding them back in later. */ if (delete) { debug (7, "server_clist_build_filtered() -- Got Delete %lx", delete); for (tmp = delete; tmp; tmp = tmp->next) { server = (struct server *) tmp->data; row = gtk_clist_find_row_from_data (server_clist, server); if (row >= 0) { debug (3, "server_clist_build_filtered() -- Delete server %lx, call gtk_clist_remove()", server); /* Note: Each server clist item gets a server_unref call on a GtkDestroyNotify event. */ gtk_clist_remove (server_clist, row); } } /* Free the list of severs in this loop. */ debug (7, "server_clist_build_filtered() -- Call server_list_free on [delete] list %lx", delete); server_list_free (delete); } if (update) { for (row = 0; row < server_clist->rows; row++) { server = (struct server *) gtk_clist_get_row_data (server_clist, row); server_clist_refresh_row (server, row); } } /* Now we want to add all of the servers that we got from the build_fiter_list function. Note that the said function adds one to the reference count for us and since we free that list after we put the data in the clist, we do NOT need to do a reference count in this fuction. --baa */ if (add) { for (tmp = add; tmp; tmp = tmp->next) { server = (struct server *) tmp->data; row = server_clist_refresh_row (server, -1); debug (7, "server_clist_build_filtered() -- add server %lx to row %d", server, row); gtk_clist_set_row_data_full (server_clist, row, server, (GtkDestroyNotify) server_unref); server_ref (server); /* See nots above about GtkDestroyNotify */ } server_list_free (add); } // prevent segfault on some systems if server list is empty due to a player // filter that finds no servers that match by clearing the list if rows is 0. // Fix by 'slashdev' if(server_clist->rows==0) gtk_clist_clear(server_clist); gtk_clist_sort (server_clist); #else { struct server* saved_cur_server = cur_server; server_ref(saved_cur_server); server_clist_set_list(server_list); row = gtk_clist_find_row_from_data (server_clist, saved_cur_server); server_unref(saved_cur_server); saved_cur_server = NULL; if (row >= 0) server_clist_select_one (row); } #endif server_clist_selection_visible (); gtk_clist_thaw (server_clist); } xqf-1.0.5/src/srv-list.h0000644002404400000620000000337310065102307011753 00000000000000/* XQF - Quake server browser and launcher * Copyright (C) 1998-2000 Roman Pozlevich * * 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 */ #ifndef __SRV_LIST_H__ #define __SRV_LIST_H__ #include #include "xqf.h" extern GSList *qw_colors_pixmap_cache; extern GSList *server_pixmap_cache; extern void assemble_server_address (char *buf, int size, const struct server *s); extern void player_clist_set_server (struct server *s); extern void player_clist_redraw (void); extern void server_clist_sync_selection (void); extern int server_clist_refresh_server (struct server *s); extern void server_clist_select_one (int row); extern GSList *server_clist_selected_servers (void); extern GSList *server_clist_all_servers (void); extern GSList *server_clist_get_n_servers (int amount); extern void server_clist_selection_visible (void); extern void server_clist_show_hostname (struct host *h); extern void server_clist_redraw (void); extern void server_clist_set_list (GSList *servers); extern void server_clist_build_filtered (GSList *servers, int update); #endif /* __SRV_LIST_H__ */ xqf-1.0.5/src/launch.c0000644002404400000620000002151010321470063011430 00000000000000/* XQF - Quake server browser and launcher * Copyright (C) 1998-2000 Roman Pozlevich * * 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 */ #include "gnuconfig.h" #include /* chmod, waitpid, kill */ #include /* memchr, strlen */ #include /* execvp, fork, _exit, chdir, read, close */ /* write, fcntl, sleep */ #include /* fcntl */ #include /* waitpid */ #include /* errno */ #include /* kill, signal... */ #include /* setenv */ #include #include "i18n.h" #include "xqf.h" #include "game.h" #include "pref.h" #include "utils.h" #include "dialogs.h" #include "server.h" #include "launch.h" #include "scripts.h" #include "debug.h" #ifndef WAIT_ANY # define WAIT_ANY -1 #endif #define CLIENT_ERROR_BUFFER 256 #define CLIENT_ERROR_MSG_HEAD " " struct running_client { pid_t pid; int fd; int tag; char *buffer; int pos; struct server *server; }; static GSList *clients = NULL; static void dialog_failed (char *func, char *arg) { dialog_ok (_("XQF: ERROR!"), _("ERROR!\n\n%s(%s) failed: %s"), func, (arg)? arg : "", g_strerror (errno)); } static void client_free (struct running_client *cl) { debug(3, "client detached (pid:%d, fd:%d)\n", cl->pid, cl->fd); if (cl->fd >= 0) { gdk_input_remove (cl->tag); close (cl->fd); } if (cl->buffer) g_free (cl->buffer); if (cl->server) server_unref (cl->server); g_free (cl); } static void client_detach (struct running_client *cl) { script_action_gamequit(NULL, cl->server); client_free (cl); clients = g_slist_remove (clients, cl); } void client_detach_all (void) { g_slist_foreach (clients, (GFunc) client_free, NULL); g_slist_free (clients); clients = NULL; } static void detach_unused (void) { GSList *tmp = clients; struct running_client *cl; while (tmp) { cl = (struct running_client *) tmp->data; if (cl->pid == 0) { client_detach (cl); tmp = clients; continue; } tmp = tmp->next; } } static void client_sigchild_handler (int signum) { int pid; int status; GSList *list; struct running_client *cl; // debug(3,"client_sigchild_handler(%d)",signum); while ((pid = waitpid (WAIT_ANY, &status, WNOHANG)) > 0) { // debug(4,"client_sigchild_handler() -- pid %d, status %d",pid,WEXITSTATUS(status)); if(WIFSIGNALED(status)&& WTERMSIG(status)==SIGSEGV) { // debug(0,"*** SEGFAULT pid %d ***",pid); } for (list = clients; list; list = list->next) { cl = (struct running_client *) list->data; if (cl->pid == pid) { /* Mark it as dead and get out. All the resource freeing * should be done outside signal handler. */ cl->pid = 0; break; } } } } void client_init (void) { on_sig (SIGCHLD, client_sigchild_handler); } static void client_input_callback (struct running_client *cl, int fd, GdkInputCondition condition) { int res; int pid; char *tmp; if (!cl->buffer) cl->buffer = g_malloc (CLIENT_ERROR_BUFFER); res = read (fd, cl->buffer + cl->pos, CLIENT_ERROR_BUFFER - 1 - cl->pos); if (res <= 0) { /* read error or EOF */ if (errno == EAGAIN || errno == EWOULDBLOCK) return; client_detach (cl); return; } if (cl->pos + res == CLIENT_ERROR_BUFFER - 1) { tmp = &cl->buffer[CLIENT_ERROR_BUFFER - 1]; *tmp = '\0'; } else { tmp = memchr (cl->buffer + cl->pos, '\0', res); cl->pos += res; } if (tmp) { gdk_input_remove (cl->tag); close (cl->fd); cl->fd = -1; if (!strncmp (cl->buffer, CLIENT_ERROR_MSG_HEAD, strlen (CLIENT_ERROR_MSG_HEAD))) { dialog_ok (_("XQF: ERROR!"), _("ERROR!\n\n%s"), cl->buffer + strlen (CLIENT_ERROR_MSG_HEAD)); pid = cl->pid; /* save PID value */ client_detach (cl); if(pid) kill (pid, SIGTERM); // kill(0) would kill this process too! } else { client_detach (cl); } } } static void client_attach (pid_t pid, int fd, struct server *s) { struct running_client *cl; cl = g_malloc0 (sizeof (struct running_client)); cl->pid = pid; cl->fd = fd; cl->tag = gdk_input_add (cl->fd, GDK_INPUT_READ | GDK_INPUT_EXCEPTION, (GdkInputFunction) client_input_callback, cl); cl->server = s; server_ref (s); debug (3, "client attached (pid:%d)", cl->pid); clients = g_slist_append (clients, cl); } int client_launch_exec (int forkit, char *dir, char* argv[], struct server *s) { int pid; int pipefds[2]; int flags; char msg[CLIENT_ERROR_BUFFER]; if (get_debug_level() || dontlaunch) { char* cmdline = g_strjoinv(" # ",argv); debug(0,"%s",cmdline); g_free(cmdline); } if (dontlaunch) return -1; script_action_gamestart(NULL, s); if (forkit) { if (pipe (pipefds) < 0) { dialog_failed ("pipe", NULL); return -1; } pid = fork (); if (pid == -1) { dialog_failed ("fork", NULL); return -1; } if (pid) { /* parent */ close (pipefds[1]); flags = fcntl (pipefds[0], F_GETFL, 0); if (flags < 0 || fcntl (pipefds[0], F_SETFL, flags | O_NONBLOCK) < 0) { dialog_failed ("fcntl", NULL); return -1; } client_attach (pid, pipefds[0], s); } else { /* child */ close (pipefds[0]); if (dir && dir[0] != '\0') { if (chdir (dir) != 0) { g_snprintf (msg, CLIENT_ERROR_BUFFER, "%schdir failed: %s", CLIENT_ERROR_MSG_HEAD, g_strerror (errno)); goto error_out; } } server_set_env(s); execvp (argv[0], argv); g_snprintf (msg, CLIENT_ERROR_BUFFER, "%sexec(%s) failed: %s", CLIENT_ERROR_MSG_HEAD, argv[0], g_strerror (errno)); error_out: write (pipefds[1], msg, strlen (msg) + 1); close (pipefds[1]); on_sig (SIGHUP, _exit); on_sig (SIGINT, _exit); on_sig (SIGQUIT, _exit); on_sig (SIGBUS, _exit); on_sig (SIGSEGV, _exit); on_sig (SIGPIPE, _exit); on_sig (SIGTERM, _exit); on_sig (SIGALRM, _exit); on_sig (SIGCHLD, SIG_DFL); _exit (1); } return pid; } execvp (argv[0], argv); dialog_failed ("exec", argv[0]); return -1; } static int already_running (enum server_type type) { int another = FALSE; struct server *s = NULL; struct running_client *cl; GSList *tmp; int res; detach_unused (); if (!clients) return FALSE; for (tmp = clients; tmp; tmp = tmp->next) { cl = (struct running_client *) tmp->data; if (cl->server->type == type) { another = TRUE; break; } } s = (struct server *) ((struct running_client *) clients->data) -> server; res = dialog_yesno (NULL, 1, _("Launch"), _("Cancel"), _("There is %s client running.\n\nLaunch %s client?"), (another)? games[type].name : games[s->type].name, (another)? "another" : games[type].name); return TRUE - res; } int client_launch (const struct condef *con, int forkit) { if (!con || !con->server || !con->s) return FALSE; if (already_running (con->s->type)) return FALSE; if (games[con->s->type].write_config) { if (!(*games[con->s->type].write_config) (con)) return FALSE; } if (games[con->s->type].exec_client) { if ( (*games[con->s->type].exec_client) (con, forkit) < 0) return FALSE; } return TRUE; } struct condef *condef_new (struct server *s) { struct condef *con; con = g_malloc0 (sizeof (struct condef)); con->s = s; server_ref (s); return con; } void condef_free (struct condef *con) { g_return_if_fail(con!=NULL); if (con->s) server_unref (con->s); if (con->server) g_free (con->server); if (con->gamedir) g_free (con->gamedir); if (con->password) g_free (con->password); if (con->spectator_password) g_free (con->spectator_password); if (con->rcon_password) g_free (con->rcon_password); if (con->custom_cfg) g_free (con->custom_cfg); if (con->demo) g_free (con->demo); g_free (con); } xqf-1.0.5/src/launch.h0000644002404400000620000000272607201342720011446 00000000000000/* XQF - Quake server browser and launcher * Copyright (C) 1998-2000 Roman Pozlevich * * 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 */ #ifndef __LAUNCH_H__ #define __LAUNCH_H__ #include "xqf.h" struct condef { struct server *s; char *server; char *gamedir; char *password; char *spectator_password; char *rcon_password; char *custom_cfg; char *demo; int spectate; }; extern void client_init (void); extern void client_detach_all (void); extern int client_launch_exec (int forkit, char *dir, char *argv[], struct server *s); extern int client_launch (const struct condef *con, int forkit); extern struct condef *condef_new (struct server *s); extern void condef_free (struct condef *con); #endif /* __LAUNCH_H__ */ xqf-1.0.5/src/gnuconfig.h.in0000644002404400000620000000422410523105452012553 00000000000000/* src/gnuconfig.h.in. Generated from configure.in by autoheader. */ /* always defined to indicate that i18n is enabled */ #undef ENABLE_NLS /* Gettext domain name */ #undef GETTEXT_PACKAGE /* Define to 1 if you have the `bind_textdomain_codeset' function. */ #undef HAVE_BIND_TEXTDOMAIN_CODESET /* Define to 1 if you have the `dcgettext' function. */ #undef HAVE_DCGETTEXT /* Define if the GNU gettext() function is already present or preinstalled. */ #undef HAVE_GETTEXT /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define if your file defines LC_MESSAGES. */ #undef HAVE_LC_MESSAGES /* Whether libz is installed */ #undef HAVE_LIBZ /* Define to 1 if you have the header file. */ #undef HAVE_LOCALE_H /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the version of this package. */ #undef PACKAGE_VERSION /* QSTAT executable path */ #undef QSTAT_EXEC /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Define if we should use GeoIP */ #undef USE_GEOIP /* Define if we should use GTK2 */ #undef USE_GTK2 /* Version number of package */ #undef VERSION /* XQF Version number */ #undef XQF_VERSION xqf-1.0.5/src/addmaster.c0000644002404400000620000003430210125543733012134 00000000000000/* XQF - Quake server browser and launcher * Copyright (C) 1998-2000 Roman Pozlevich * * 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 */ #include "gnuconfig.h" #include #include /* strlen, strstr, strcpy */ #include "i18n.h" #include "game.h" #include "xqf-ui.h" #include "history.h" #include "dialogs.h" #include "utils.h" #include "config.h" #include "source.h" #include "addmaster.h" #include "srv-prop.h" #include "pref.h" static struct history *master_history_addr; static struct history *master_history_name; static char *master_addr_result; static char *master_name_result; static enum server_type master_type; static struct master *master_to_add; // currently active radio button static enum master_query_type current_master_query_type = MASTER_NATIVE; static GtkWidget *master_addr_combo; static GtkWidget *master_name_combo; static GtkWidget *master_query_type_radios[MASTER_NUM_QUERY_TYPES]; // get text from master address entry, check if prefix matches radio buttons, // modify and write back if needed static void master_check_master_addr_prefix(void) { char *pos; char *master_addr; master_addr= gtk_entry_get_text(GTK_ENTRY (GTK_COMBO (master_addr_combo)->entry)); // Replace up to :// with master type selected from radio buttons if (g_strncasecmp(master_addr, master_prefixes[current_master_query_type], strlen(master_prefixes[current_master_query_type]))) { pos = lowcasestrstr(master_addr,"://"); if(!pos) { pos = master_addr; } else { // +"://" pos+=3; } // Add lan://255.255.255.255 if user picks LAN and has not already entered an address if(current_master_query_type==MASTER_LAN && (strlen(master_addr) <= (size_t)(pos - master_addr))) { char *txt = g_strdup_printf("%s%s", master_prefixes[current_master_query_type], "255.255.255.255"); gtk_entry_set_text( GTK_ENTRY( GTK_COMBO( master_addr_combo)->entry), txt); g_free(txt); } // Otherwise, just change the master type (xxx://) else { master_addr = g_strconcat(master_prefixes[current_master_query_type],pos,NULL); gtk_entry_set_text(GTK_ENTRY (GTK_COMBO (master_addr_combo)->entry),master_addr); g_free(master_addr); } } } static void master_okbutton_callback (GtkWidget *widget, GtkWidget* window) { master_check_master_addr_prefix(); master_addr_result = strdup_strip (gtk_entry_get_text ( GTK_ENTRY (GTK_COMBO (master_addr_combo)->entry))); master_name_result = strdup_strip (gtk_entry_get_text ( GTK_ENTRY (GTK_COMBO (master_name_combo)->entry))); config_set_string ("/" CONFIG_FILE "/Add Master/game", type2id (master_type)); if(!master_addr_result || !master_name_result) { dialog_ok (NULL, _("You have to specify a name and an address.")); return; } master_to_add = add_master (master_addr_result, master_name_result, master_type, NULL, TRUE, FALSE); if(!master_to_add) { dialog_ok (NULL, _("Master address \"%s\" is not valid."), master_addr_result); } else { if (master_addr_result) history_add (master_history_addr, master_addr_result); if (master_name_result) history_add (master_history_name, master_name_result); gtk_widget_destroy(window); } } static void select_master_type_callback (GtkWidget *widget, enum server_type type) { if(!master_query_type_radios[MASTER_NATIVE]) return; master_type = type; gtk_widget_set_state (master_query_type_radios[MASTER_NATIVE], GTK_STATE_NORMAL); if(!games[type].default_master_port) { gtk_widget_set_sensitive (GTK_WIDGET(master_query_type_radios[MASTER_NATIVE]),FALSE); if(current_master_query_type==MASTER_NATIVE) { gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(master_query_type_radios[MASTER_GAMESPY]),TRUE); } } else { gtk_widget_set_sensitive (GTK_WIDGET(master_query_type_radios[MASTER_NATIVE]),TRUE); } } static void master_type_radio_callback (GtkWidget *widget, enum master_query_type type) { char* master_name; // This gets called when a button is made inactive AND when it's made active // so only do this if it's set to active if (GTK_TOGGLE_BUTTON (master_query_type_radios[type])->active) { current_master_query_type = type; master_check_master_addr_prefix(); master_name = gtk_entry_get_text(GTK_ENTRY (GTK_COMBO (master_name_combo)->entry)); if(current_master_query_type==MASTER_LAN && (!master_name || !strlen(master_name))) { gtk_entry_set_text( GTK_ENTRY( GTK_COMBO( master_name_combo)->entry), _("LAN")); } } } static void master_activate_radio_for_type( enum master_query_type type ) { if( type < MASTER_NATIVE || type >= MASTER_NUM_QUERY_TYPES ) type=MASTER_NATIVE; if(master_query_type_radios[type]) { gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(master_query_type_radios[type]),TRUE); } } static void master_address_from_history_selected_callback (GtkWidget *widget, gpointer data) { char* str = gtk_entry_get_text( GTK_ENTRY (GTK_COMBO (master_addr_combo)->entry)); enum master_query_type type = get_master_query_type_from_address(str); master_activate_radio_for_type(type); } struct master *add_master_dialog (struct master *m) { GtkWidget *window; GtkWidget *main_vbox; GtkWidget *table; GtkWidget *option_menu; GtkWidget *hbox; GtkWidget *label; GtkWidget *button; GtkWidget *hseparator; char *typestr; enum master_query_type i; struct master *master_to_edit; char *windowtitle; master_name_result = NULL; master_addr_result = NULL; current_master_query_type = MASTER_NATIVE; master_to_edit = NULL; master_to_add = NULL; for (i=MASTER_NATIVE;imaster_type; master_type = master_to_edit->type; } else { // Get last game type added (stored in master_okbutton_callback) typestr = config_get_string ("/" CONFIG_FILE "/Add Master/game"); if (typestr) { master_type = id2type (typestr); g_free (typestr); } else { master_type = QW_SERVER; } } if (master_to_edit) { windowtitle=_("Rename Master"); } else { windowtitle=_("Add Master"); } window = dialog_create_modal_transient_window(windowtitle, TRUE, FALSE, NULL); main_vbox = gtk_vbox_new (FALSE, 0); gtk_container_add (GTK_CONTAINER (window), main_vbox); table = gtk_table_new (2, 2, FALSE); gtk_table_set_row_spacings (GTK_TABLE (table), 2); gtk_table_set_col_spacings (GTK_TABLE (table), 4); gtk_container_set_border_width (GTK_CONTAINER (table), 16); gtk_box_pack_start (GTK_BOX (main_vbox), table, FALSE, FALSE, 0); /* Master Name (Description) */ label = gtk_label_new (_("Master Name")); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1, GTK_FILL, GTK_FILL, 0, 0); gtk_widget_show (label); hbox = gtk_hbox_new (FALSE, 4); gtk_table_attach_defaults (GTK_TABLE (table), hbox, 1, 2, 0, 1); master_name_combo = gtk_combo_new (); gtk_widget_set_usize (master_name_combo, 200, -1); gtk_box_pack_start (GTK_BOX (hbox), master_name_combo, TRUE, TRUE, 0); gtk_entry_set_max_length (GTK_ENTRY (GTK_COMBO (master_name_combo)->entry), 256); gtk_combo_set_case_sensitive (GTK_COMBO (master_name_combo), TRUE); gtk_combo_set_use_arrows_always (GTK_COMBO (master_name_combo), TRUE); gtk_combo_disable_activate (GTK_COMBO (master_name_combo)); gtk_signal_connect( GTK_OBJECT (GTK_COMBO (master_name_combo)->entry), "activate", GTK_SIGNAL_FUNC (master_okbutton_callback), GTK_OBJECT (window)); GTK_WIDGET_SET_FLAGS (GTK_COMBO (master_name_combo)->entry, GTK_CAN_FOCUS); GTK_WIDGET_UNSET_FLAGS (GTK_COMBO (master_name_combo)->button, GTK_CAN_FOCUS); gtk_widget_grab_focus (GTK_COMBO (master_name_combo)->entry); gtk_widget_show (master_name_combo); if (master_history_name->items) combo_set_vals (master_name_combo, master_history_name->items, ""); if(master_to_edit) { gtk_entry_set_text(GTK_ENTRY (GTK_COMBO (master_name_combo)->entry),master_to_edit->name); } /* Master Type Option Menu */ option_menu = create_server_type_menu (master_type, create_server_type_menu_filter_configured, GTK_SIGNAL_FUNC(select_master_type_callback)); gtk_box_pack_start (GTK_BOX (hbox), option_menu, FALSE, FALSE, 0); if(master_to_edit) { gtk_widget_set_state (option_menu, GTK_STATE_NORMAL); gtk_widget_set_sensitive (GTK_WIDGET(option_menu),FALSE); } gtk_widget_show (option_menu); gtk_widget_show (hbox); /* Master Address */ label = gtk_label_new (_("Master Address")); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_table_attach (GTK_TABLE (table), label, 0, 1, 1, 2, GTK_FILL, GTK_FILL, 0, 0); gtk_widget_show (label); master_addr_combo = gtk_combo_new (); gtk_table_attach_defaults (GTK_TABLE (table), master_addr_combo, 1, 2, 1, 2); gtk_entry_set_max_length (GTK_ENTRY (GTK_COMBO (master_addr_combo)->entry), 4096); gtk_combo_set_case_sensitive (GTK_COMBO (master_addr_combo), TRUE); gtk_combo_set_use_arrows_always (GTK_COMBO (master_addr_combo), TRUE); gtk_combo_disable_activate (GTK_COMBO (master_addr_combo)); gtk_signal_connect ( GTK_OBJECT (GTK_COMBO (master_addr_combo)->entry), "activate", GTK_SIGNAL_FUNC (master_okbutton_callback), GTK_OBJECT (window)); gtk_signal_connect ( GTK_OBJECT (GTK_COMBO (master_addr_combo)->list), "selection-changed", GTK_SIGNAL_FUNC (master_address_from_history_selected_callback),NULL); GTK_WIDGET_SET_FLAGS (GTK_COMBO (master_addr_combo)->entry, GTK_CAN_FOCUS); GTK_WIDGET_UNSET_FLAGS (GTK_COMBO (master_addr_combo)->button, GTK_CAN_FOCUS); // gtk_widget_grab_focus (GTK_COMBO (master_addr_combo)->entry); gtk_widget_show (master_addr_combo); if (master_history_addr->items) combo_set_vals (master_addr_combo, master_history_addr->items, ""); if(master_to_edit) { char* url = master_to_url(master_to_edit); gtk_entry_set_text(GTK_ENTRY (GTK_COMBO (master_addr_combo)->entry), url); gtk_widget_set_state (master_addr_combo, GTK_STATE_NORMAL); gtk_widget_set_sensitive (GTK_WIDGET(master_addr_combo),FALSE); g_free(url); } gtk_widget_show (table); /* query type */ hbox = gtk_hbox_new (TRUE, 8); for (i=MASTER_NATIVE;i * * 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 */ #ifndef __ADDMASTER_H__ #define __ADDMASTER_H__ #include "xqf.h" struct master *add_master_dialog (struct master *m); extern void add_master_init (void); extern void add_master_done (void); #endif /* __ADDMASTER_H__ */ xqf-1.0.5/src/redial.c0000644002404400000620000002053710302664533011434 00000000000000/* XQF - Quake server browser and launcher * Copyright (C) 1998-2000 Roman Pozlevich * * 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 */ #include "gnuconfig.h" #include #include /* strlen, strstr, strcpy */ #include "xqf-ui.h" #include "i18n.h" #include "redial.h" #include "debug.h" #include "dialogs.h" #include "stat.h" #include "host.h" #include "server.h" #include "srv-list.h" static gboolean launchnow; static GtkWidget* redial_window; static unsigned countdown; static const unsigned default_redial_wait = 5; static int timeoutid; struct server_props* srv_props; static void stat_redial_close_handler (struct stat_job *job, int killed); static void stat_redial_server_handler (struct stat_job *job, struct server *s); static void set_redial_label(const char* name, gboolean waiting); static void on_launchbutton_clicked (GtkButton *button, gpointer user_data) { launchnow = TRUE; if(timeoutid!=-1) gtk_timeout_remove(timeoutid); gtk_widget_destroy(redial_window); } static void on_cancelbutton_clicked (GtkButton *button, gpointer user_data) { launchnow = FALSE; if(timeoutid!=-1) gtk_timeout_remove(timeoutid); gtk_widget_destroy(redial_window); } /** * called on every gtk_timeout, updates progressbar until default_redial_wait * is reached, starts a new stat_process then */ static gboolean redial_countdown (struct server* s) { void* blub = gtk_object_get_data(GTK_OBJECT(redial_window),"secondsprogress"); struct condef* con; countdown++; if(countdown>default_redial_wait) { countdown=0; gtk_progress_set_value (GTK_PROGRESS (blub), countdown); debug(3,"countdown 0, querying server"); con = condef_new (s); stat_process = stat_job_create (NULL, NULL, server_list_prepend (NULL, con->s), NULL); stat_process->data = con; stat_process->close_handlers = g_slist_prepend ( stat_process->close_handlers, stat_redial_close_handler); stat_process->server_handlers = g_slist_append ( stat_process->server_handlers, stat_redial_server_handler); stat_start (stat_process); set_redial_label(con->s->name, FALSE); timeoutid=-1; return FALSE; } else { gtk_progress_set_value (GTK_PROGRESS (blub), countdown); return TRUE; } } static void stat_redial_server_handler (struct stat_job *job, struct server *s) { /* Don't spend time on host name lookups */ debug(3,"server %s refreshed",s->name); if (job->hosts) { host_list_free (job->hosts); job->hosts = NULL; } } /** set server name for redial dialog */ static void set_redial_label(const char* name, gboolean waiting) { GtkWidget* label = gtk_object_get_data(GTK_OBJECT(redial_window),"label"); char* text; if(waiting) text = g_strdup_printf(_("Waiting for free slots on\n%s"),name); else text = g_strdup_printf(_("Refreshing\n%s"),name); gtk_label_set_text(GTK_LABEL(label), text); g_free(text); } /** stat_process finished, check if slots are free otherwise setup new timeout */ static void stat_redial_close_handler (struct stat_job *job, int killed) { struct condef* con = (struct condef *) job->data; job->data = NULL; stat_process = NULL; debug(3,"stat process done"); if (!con) return; if (!killed) { if (!server_need_redial(con->s, srv_props)) { // ok, free slot. launch! launchnow = TRUE; gtk_widget_destroy(redial_window); } else { timeoutid = gtk_timeout_add (1000, (GtkFunction)redial_countdown, (gpointer)con->s); set_redial_label(con->s->name, TRUE); } } else { launchnow = FALSE; gtk_widget_destroy(redial_window); } server_clist_refresh_server (con->s); condef_free (con); return; } /** glade function */ static GtkWidget* create_redialwindow (void) { GtkWidget *redialwindow; GtkWidget *vbox1; GtkWidget *label; GtkWidget *secondsprogress; GtkWidget *hbuttonbox1; GtkWidget *launchbutton; GtkWidget *cancelbutton; /** window code modified from glade */ redialwindow = dialog_create_modal_transient_window(_("XQF: Redialing"), TRUE, FALSE, NULL); #if 0 redialwindow = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_object_set_data (GTK_OBJECT (redialwindow), "redialwindow", redialwindow); gtk_window_set_title (GTK_WINDOW (redialwindow), _("XQF: Redialing")); gtk_window_set_modal (GTK_WINDOW (redialwindow), TRUE); #endif vbox1 = gtk_vbox_new (FALSE, 5); gtk_widget_ref (vbox1); gtk_object_set_data_full (GTK_OBJECT (redialwindow), "vbox1", vbox1, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (vbox1); gtk_container_add (GTK_CONTAINER (redialwindow), vbox1); gtk_container_set_border_width (GTK_CONTAINER (vbox1), 14); label = gtk_label_new (_("***\n***")); gtk_widget_ref (label); gtk_object_set_data_full (GTK_OBJECT (redialwindow), "label", label, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (label); gtk_box_pack_start (GTK_BOX (vbox1), label, FALSE, FALSE, 0); secondsprogress = gtk_progress_bar_new (); gtk_widget_ref (secondsprogress); gtk_object_set_data_full (GTK_OBJECT (redialwindow), "secondsprogress", secondsprogress, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (secondsprogress); gtk_box_pack_start (GTK_BOX (vbox1), secondsprogress, FALSE, FALSE, 10); gtk_progress_configure (GTK_PROGRESS (secondsprogress), 4, 0, 10); hbuttonbox1 = gtk_hbutton_box_new (); gtk_widget_ref (hbuttonbox1); gtk_object_set_data_full (GTK_OBJECT (redialwindow), "hbuttonbox1", hbuttonbox1, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (hbuttonbox1); gtk_box_pack_start (GTK_BOX (vbox1), hbuttonbox1, TRUE, FALSE, 0); gtk_button_box_set_layout (GTK_BUTTON_BOX (hbuttonbox1), GTK_BUTTONBOX_SPREAD); launchbutton = gtk_button_new_with_label (_("Launch now")); gtk_widget_ref (launchbutton); gtk_object_set_data_full (GTK_OBJECT (redialwindow), "launchbutton", launchbutton, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (launchbutton); gtk_container_add (GTK_CONTAINER (hbuttonbox1), launchbutton); GTK_WIDGET_SET_FLAGS (launchbutton, GTK_CAN_DEFAULT); cancelbutton = gtk_button_new_with_label (_("Cancel")); gtk_widget_ref (cancelbutton); gtk_object_set_data_full (GTK_OBJECT (redialwindow), "cancelbutton", cancelbutton, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (cancelbutton); gtk_container_add (GTK_CONTAINER (hbuttonbox1), cancelbutton); GTK_WIDGET_SET_FLAGS (cancelbutton, GTK_CAN_DEFAULT); gtk_signal_connect (GTK_OBJECT (launchbutton), "clicked", GTK_SIGNAL_FUNC (on_launchbutton_clicked), NULL); gtk_signal_connect (GTK_OBJECT (cancelbutton), "clicked", GTK_SIGNAL_FUNC (on_cancelbutton_clicked), NULL); gtk_widget_grab_focus (cancelbutton); gtk_widget_grab_default (cancelbutton); return redialwindow; } /** /glade function */ /** open redial dialog, return true if game should be launched, false otherwise */ gboolean redial_dialog (struct server* s, struct server_props* props) { GtkWidget* progress; if(!s) return FALSE; launchnow = FALSE; timeoutid = -1; countdown = 0; srv_props = props; redial_window = create_redialwindow(); progress = gtk_object_get_data(GTK_OBJECT(redial_window),"secondsprogress"); gtk_progress_configure (GTK_PROGRESS (progress), 0, 0, default_redial_wait); set_redial_label(s->name, TRUE); gtk_widget_show(redial_window); timeoutid = gtk_timeout_add (1000, (GtkFunction)redial_countdown, (gpointer)s); gtk_main (); unregister_window (redial_window); return launchnow; } xqf-1.0.5/src/redial.h0000644002404400000620000000176310302664533011441 00000000000000/* XQF - Quake server browser and launcher * Copyright (C) 1998-2000 Roman Pozlevich * * 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 */ #ifndef _REDIAL_H__ #define _REDIAL_H__ #include "launch.h" #include "srv-prop.h" gboolean redial_dialog (struct server* s, struct server_props* props); #endif /* __ADDMASTER_H__ */ xqf-1.0.5/src/srv-prop.c0000644002404400000620000005715710047246370011775 00000000000000/* XQF - Quake server browser and launcher * Copyright (C) 1998-2000 Roman Pozlevich * * 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 */ #include "gnuconfig.h" #include /* chmod */ #include /* FILE, fprintf, etc... */ #include /* strchr, strcmp */ #include /* unlink */ #include /* chmod */ #include /* ctime */ #include /* inet_ntoa */ #include /* inet_ntoa */ #include /* inet_ntoa */ #include /* atoi */ #include "i18n.h" #include "xqf-ui.h" #include "game.h" #include "pref.h" #include "source.h" #include "host.h" #include "server.h" #include "pixmaps.h" #include "utils.h" #include "xutils.h" #include "dialogs.h" #include "srv-prop.h" #include "country-filter.h" static GtkWidget *password_entry; static GtkWidget *spectator_entry; static GtkWidget *rcon_entry; static GtkWidget *customcfg_combo; static GtkWidget *sucks_check_button; static GtkWidget *comment_text; /*pulp*/ static GtkWidget *spinner; static GtkAdjustment *adj; static GSList *props_list = NULL; static void props_free (struct server_props *p) { if (p) { if (p->custom_cfg) g_free (p->custom_cfg); if (p->server_password) g_free (p->server_password); if (p->spectator_password) g_free (p->spectator_password); if (p->rcon_password) g_free (p->rcon_password); g_free (p->comment); host_unref (p->host); g_free (p); } } void props_free_all (void) { g_slist_foreach (props_list, (GFunc) props_free, NULL); g_slist_free (props_list); props_list = NULL; } static struct server_props *__properties (const struct host *h, const unsigned short p) { struct server_props *res; GSList *tmp; if (!h || p == 0 /* || p > 65535 */) return NULL; for (tmp = props_list; tmp; tmp = tmp->next) { res = (struct server_props *) tmp->data; if (res->host == h && res->port == p) return res; } return NULL; } struct server_props *properties (struct server *s) { return __properties (s->host, s->port); } struct server_props *properties_new (struct host *host, unsigned short port) { struct server_props *p; p = g_malloc (sizeof (struct server_props)); p->host = host; host_ref (host); p->port = port; p->custom_cfg = NULL; p->server_password = NULL; p->spectator_password = NULL; p->rcon_password = NULL; p->reserved_slots =0; p->sucks = 0; p->comment = NULL; props_list = g_slist_append (props_list, p); return p; } void props_save (void) { FILE *f; char *fn; GSList *list; struct server_props *p; fn = file_in_dir (user_rcdir, SERVERS_FILE); if (props_list) { f = fopen (fn, "w"); chmod (fn, S_IRUSR | S_IWUSR); g_free (fn); if (!f) return; } else { unlink (fn); g_free (fn); return; } for (list = props_list; list; list = list->next) { p = (struct server_props *) list->data; if (p->custom_cfg || p->server_password || p->spectator_password || p->rcon_password || p->reserved_slots || p->sucks || (p->comment && strlen(p->comment))) { fprintf (f, "[%s:%d]\n", inet_ntoa (p->host->ip), p->port); if (p->custom_cfg) fprintf (f, "custom_cfg %s\n", p->custom_cfg); if (p->server_password) fprintf (f, "password %s\n", p->server_password); if (p->spectator_password) fprintf (f, "spectator_password %s\n", p->spectator_password); if (p->rcon_password) fprintf (f, "rcon_password %s\n", p->rcon_password); if (p->reserved_slots) fprintf (f, "reserved_slots %d\n", p->reserved_slots); if (p->sucks) fprintf (f, "sucks %d\n", p->sucks); if (p->comment && strlen(p->comment)) { char* s = p->comment; // strip last \n, otherwise one is added each time the server is saved if(s[strlen(s)] == '\n') s[strlen(s)] = '\0'; fputs("comment ", f); while(*s) { switch(*s) { case '\n': fputs("\\n", f); break; case '\\': fputs("\\\\", f); break; default: fputc(*s, f); break; } ++s; } fputc('\n', f); } fprintf (f, "\n"); } } fclose (f); } void props_load (void) { FILE *f; char *fn; struct host *h; struct server_props *p = NULL; char *addr; unsigned short port; char buf[1024]; char *ptr; props_free_all (); fn = file_in_dir (user_rcdir, SERVERS_FILE); f = fopen (fn, "r"); g_free (fn); if (!f) return; while (!feof (f)) { fgets (buf, 1024, f); if (buf[0] == '\n') { if (p) p = NULL; } else if (buf[0] == '[') { if (p) continue; ptr = strchr (&buf[1], ']'); if (!ptr) continue; *ptr = '\0'; if (!parse_address (&buf[1], &addr, &port)) continue; if (port == 0) { g_free (addr); continue; } h = host_add (addr); g_free (addr); if (!h) continue; p = __properties (h, port); if (!p) p = properties_new (h, port); } else { if (!p) continue; ptr = strchr (buf, ' '); if (!ptr) continue; *ptr++ = '\0'; if (strcmp (buf, "custom_cfg") == 0) { g_free (p->custom_cfg); p->custom_cfg = strdup_strip (ptr); } else if (strcmp (buf, "password") == 0) { g_free (p->server_password); p->server_password = strdup_strip (ptr); } else if (strcmp (buf, "spectator_password") == 0) { g_free (p->spectator_password); p->spectator_password = strdup_strip (ptr); } else if (strcmp (buf, "rcon_password") == 0) { g_free (p->rcon_password); p->rcon_password = strdup_strip (ptr); } else if (strcmp (buf, "reserved_slots") == 0) { p->reserved_slots= atoi(ptr); } else if (strcmp (buf, "sucks") == 0) { p->sucks = atoi(ptr); } else if (strcmp (buf, "comment") == 0) { unsigned di, si; size_t slen = strlen(ptr); int quote = 0; g_free (p->comment); p->comment = g_malloc0 (slen + 1); for( si = 0, di = 0; si < slen; ++si ) { if(quote) { quote = 0; if(ptr[si] == 'n') p->comment[di++] = '\n'; else if(ptr[si] == '\\') p->comment[di++] = '\\'; else xqf_warning("unknown control sequence \\%c", ptr[si]); } else if(ptr[si] == '\\') { quote = 1; } else { p->comment[di++] = ptr[si]; } } } } } fclose (f); } static void set_new_properties (GtkWidget *widget, struct server *s) { struct server_props *props; char *customcfg; char *srvpwd; char *spectpwd; char *rconpwd; int reserved; int sucks; char* comment = NULL; customcfg = strdup_strip ( gtk_entry_get_text (GTK_ENTRY (GTK_COMBO (customcfg_combo)->entry))); srvpwd = strdup_strip (gtk_entry_get_text (GTK_ENTRY (password_entry))); spectpwd = strdup_strip (gtk_entry_get_text (GTK_ENTRY (spectator_entry))); rconpwd = strdup_strip (gtk_entry_get_text (GTK_ENTRY (rcon_entry))); reserved = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (spinner)); sucks = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON (sucks_check_button)); comment = gtk_editable_get_chars (GTK_EDITABLE (comment_text), 0, -1); props = properties (s); if (props) { if (customcfg || srvpwd || spectpwd || rconpwd || reserved || sucks || comment) { g_free (props->custom_cfg); props->custom_cfg = customcfg; g_free (props->server_password); props->server_password = srvpwd; g_free (props->spectator_password); props->spectator_password = spectpwd; g_free (props->rcon_password); props->rcon_password = rconpwd; props->reserved_slots = reserved; props->sucks = sucks; g_free(props->comment); props->comment = comment; } else { props_list = g_slist_remove (props_list, props); props_free (props); } } else { if (customcfg || srvpwd || spectpwd || rconpwd || reserved || sucks || comment) { props = properties_new (s->host, s->port); props->custom_cfg = customcfg; props->server_password = srvpwd; props->spectator_password = spectpwd; props->rcon_password = rconpwd; props->reserved_slots = reserved; props->sucks = sucks; props->comment = comment; } } props_save (); } static GtkWidget *server_info_page (struct server *s) { GtkWidget *page_vbox; GtkWidget *table; GtkWidget *frame; GtkWidget *hbox; GtkWidget *vbox; GtkWidget *label; GSList *sources; GSList *list; struct master *m; struct server_props *props; char buf[32]; GList *cfgs; int slots_buffer; guint row = 0; props = properties (s); page_vbox = gtk_vbox_new (FALSE, 8); gtk_container_set_border_width (GTK_CONTAINER (page_vbox), 8); /* Address */ table = gtk_table_new (6, 4, FALSE); gtk_table_set_row_spacings (GTK_TABLE (table), 4); gtk_table_set_col_spacings (GTK_TABLE (table), 8); gtk_box_pack_start (GTK_BOX (page_vbox), table, FALSE, FALSE, 0); gtk_table_set_col_spacing (GTK_TABLE (table), 1, 16); label = gtk_label_new (_("IP Address:")); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_table_attach_defaults (GTK_TABLE (table), label, 0, 1, row, row+1); gtk_widget_show (label); label = gtk_label_new (inet_ntoa (s->host->ip)); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_table_attach_defaults (GTK_TABLE (table), label, 1, 2, row, row+1); gtk_widget_show (label); label = gtk_label_new (_("Port:")); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_table_attach_defaults (GTK_TABLE (table), label, 2, 3, row, row+1); gtk_widget_show (label); g_snprintf (buf, 32, "%d", s->port); label = gtk_label_new (buf); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_table_attach_defaults (GTK_TABLE (table), label, 3, 4, row, row+1); gtk_widget_show (label); row++; label = gtk_label_new (_("Host Name:")); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_table_attach_defaults (GTK_TABLE (table), label, 0, 1, row, row+1); gtk_widget_show (label); if (s->host->name) { label = gtk_label_new (s->host->name); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_table_attach_defaults (GTK_TABLE (table), label, 1, 4, row, row+1); gtk_widget_show (label); } row++; label = gtk_label_new (_("Country:")); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_table_attach_defaults (GTK_TABLE (table), label, 0, 1, row, row+1); gtk_widget_show (label); #ifdef USE_GEOIP if (geoip_name_by_id(s->country_id)) { GtkWidget* hbox = gtk_hbox_new (FALSE, 4); struct pixmap* pix = get_pixmap_for_country(s->country_id); if(pix) { GtkWidget *pixmap = gtk_pixmap_new(pix->pix,pix->mask); gtk_box_pack_start (GTK_BOX (hbox), pixmap, FALSE, FALSE, 0); gtk_widget_show (pixmap); } label = gtk_label_new (geoip_name_by_id(s->country_id)); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); gtk_widget_show (label); gtk_table_attach_defaults (GTK_TABLE (table), hbox, 1, 4, row, row+1); gtk_widget_show (hbox); } #endif row++; label = gtk_label_new (_("Refreshed:")); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_table_attach_defaults (GTK_TABLE (table), label, 0, 1, row, row+1); gtk_widget_show (label); if (s->refreshed) { char* str = timet2string(&s->refreshed); label = gtk_label_new (str); g_free(str); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_table_attach_defaults (GTK_TABLE (table), label, 1, 4, row, row+1); gtk_widget_show (label); } row++; // translator: last time and date the server answered the query label = gtk_label_new (_("Last answer:")); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_table_attach_defaults (GTK_TABLE (table), label, 0, 1, row, row+1); gtk_widget_show (label); if (s->last_answer) { GtkStyle *style; GdkColor color; time_t max_days = 3; // XXX: hardcoded, has to be configurable some time char* str = timet2string(&s->last_answer); label = gtk_label_new (str); g_free(str); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_table_attach_defaults (GTK_TABLE (table), label, 1, 4, row, row+1); if(s->last_answer + max_days*24*60*60 < s->refreshed) { // XXX: I don't know if that is the correct way, it's undocumented :-( style = gtk_widget_get_style(label); gdk_color_parse("red",&color); style->fg [GTK_STATE_NORMAL] = color; style->fg [GTK_STATE_ACTIVE] = color; style->fg [GTK_STATE_PRELIGHT] = color; style->fg [GTK_STATE_SELECTED] = color; style->fg [GTK_STATE_INSENSITIVE] = color; gtk_widget_set_style (label, style); } gtk_widget_show (label); } row++; /*pulp*/ /*Reserved Slots spin widget*/ if (props) { if (props->reserved_slots) { slots_buffer=props->reserved_slots; } else { slots_buffer=0; } } else { slots_buffer=0; } label = gtk_label_new (_("Reserved Slots:")); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_table_attach_defaults (GTK_TABLE (table), label, 0, 1, row, row+1); gtk_widget_show (label); adj = (GtkAdjustment *) gtk_adjustment_new (slots_buffer, 0, 9, 1, 2,0); spinner = gtk_spin_button_new (adj, 0, 0); gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinner), TRUE); gtk_spin_button_set_update_policy(GTK_SPIN_BUTTON (spinner), GTK_UPDATE_IF_VALID); gtk_table_attach_defaults (GTK_TABLE (table), spinner, 1, 2, row, row+1); gtk_widget_show (spinner); gtk_widget_show (table); /* Sources */ frame = gtk_frame_new (_("Sources")); gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_ETCHED_IN); gtk_box_pack_start (GTK_BOX (page_vbox), frame, FALSE, FALSE, 0); vbox = gtk_vbox_new (FALSE, 4); gtk_container_set_border_width (GTK_CONTAINER (vbox), 6); gtk_container_add (GTK_CONTAINER (frame), vbox); sources = references_to_server (s); for (list = sources; list; list = list->next) { m = (struct master *) list->data; label = gtk_label_new (_(m->name)); gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0); gtk_widget_show (label); } g_slist_free (sources); gtk_widget_show (vbox); gtk_widget_show (frame); /* Custom CFG */ hbox = gtk_hbox_new (FALSE, 8); gtk_box_pack_start (GTK_BOX (page_vbox), hbox, FALSE, FALSE, 0); customcfg_combo = gtk_combo_new (); gtk_entry_set_max_length (GTK_ENTRY (GTK_COMBO (customcfg_combo)->entry), 256); gtk_widget_set_usize (GTK_COMBO (customcfg_combo)->entry, 112, -1); if ((games[s->type].flags & GAME_CONNECT) != 0 && games[s->type].custom_cfgs) { cfgs = (*games[s->type].custom_cfgs) (&games[s->type], NULL, s->game); combo_set_vals (customcfg_combo, cfgs, (props && props->custom_cfg)? props->custom_cfg : NULL); if (cfgs) { g_list_foreach (cfgs, (GFunc) g_free, NULL); g_list_free (cfgs); } } else { gtk_widget_set_sensitive (customcfg_combo, FALSE); } gtk_box_pack_end (GTK_BOX (hbox), customcfg_combo, FALSE, FALSE, 0); gtk_widget_show (customcfg_combo); label = gtk_label_new (_("Custom CFG:")); gtk_box_pack_end (GTK_BOX (hbox), label, FALSE, FALSE, 0); gtk_widget_show (label); gtk_widget_show (hbox); gtk_widget_show (page_vbox); return page_vbox; } static GtkWidget *passwd_entry (char *str, char *passwd, GtkWidget *table, int pos) { GtkWidget *label; GtkWidget *entry; label = gtk_label_new (str); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_table_attach_defaults (GTK_TABLE (table), label, 0, 1, pos, pos + 1); gtk_widget_show (label); entry = gtk_entry_new_with_max_length (32); gtk_widget_set_usize (entry, 112, -1); if (passwd) { gtk_entry_set_text (GTK_ENTRY (entry), passwd); } gtk_table_attach_defaults (GTK_TABLE (table), entry, 1, 2, pos, pos + 1); gtk_widget_show (entry); return entry; } static GtkWidget *server_passwords_page (struct server *s) { GtkWidget *page_vbox; GtkWidget *table; struct server_props *props; props = properties (s); page_vbox = gtk_vbox_new (FALSE, 4); gtk_container_set_border_width (GTK_CONTAINER (page_vbox), 8); table = gtk_table_new (3, 2, FALSE); gtk_table_set_row_spacings (GTK_TABLE (table), 2); gtk_table_set_col_spacings (GTK_TABLE (table), 8); gtk_box_pack_start (GTK_BOX (page_vbox), table, FALSE, FALSE, 0); password_entry = passwd_entry (_("Server Password"), (props)? props->server_password : NULL, table, 0); if ((games[s->type].flags & GAME_PASSWORD) == 0) gtk_widget_set_sensitive (password_entry, FALSE); spectator_entry = passwd_entry (_("Spectator Password"), (props)? props->spectator_password : NULL, table, 1); if ((games[s->type].flags & GAME_SPECTATE) == 0) gtk_widget_set_sensitive (spectator_entry, FALSE); rcon_entry = passwd_entry (_("RCon/Admin Password"), (props)? props->rcon_password : NULL, table, 2); if (!games[s->type].flags & GAME_RCON && !games[s->type].flags & GAME_ADMIN) gtk_widget_set_sensitive (rcon_entry, FALSE); gtk_widget_show (table); gtk_widget_show (page_vbox); return page_vbox; } static GtkWidget *server_comment_page (struct server *s) { GtkWidget *page_vbox; GtkWidget *scrollwin; struct server_props *props; int sucks = 0; char* comment = NULL; props = properties (s); if (props) { sucks = props->sucks; comment = props->comment; } page_vbox = gtk_vbox_new (FALSE, 4); gtk_container_set_border_width (GTK_CONTAINER (page_vbox), 8); sucks_check_button = gtk_check_button_new_with_label (_("This server sucks")); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (sucks_check_button), sucks); gtk_box_pack_start (GTK_BOX (page_vbox), sucks_check_button, FALSE, FALSE, 0); gtk_widget_show (sucks_check_button); scrollwin = gtk_scrolled_window_new(NULL, NULL); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrollwin), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); gtk_box_pack_start (GTK_BOX (page_vbox), scrollwin, TRUE, TRUE, 0); comment_text = gtk_text_new (NULL, NULL); // gtk_widget_set_usize (comment_text, -1, 80); gtk_container_add (GTK_CONTAINER (scrollwin), comment_text); gtk_widget_show (comment_text); gtk_text_freeze (GTK_TEXT (comment_text)); if (comment) { gtk_text_insert (GTK_TEXT (comment_text), NULL, NULL, NULL, comment, strlen (comment)); gtk_text_set_point (GTK_TEXT (comment_text), 0); } gtk_text_set_editable (GTK_TEXT (comment_text), TRUE); gtk_text_thaw (GTK_TEXT (comment_text)); gtk_widget_show (scrollwin); gtk_widget_show (page_vbox); return page_vbox; } void properties_dialog (struct server *s) { GtkWidget *window; GtkWidget *main_vbox; GtkWidget *hbox; GtkWidget *hbox2; GtkWidget *notebook; GtkWidget *page; GtkWidget *button; GtkWidget *pixmap; GtkWidget *label; char buf[256]; window = dialog_create_modal_transient_window (_("Properties"), TRUE, FALSE, NULL); main_vbox = gtk_vbox_new (FALSE, 8); gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 8); gtk_container_add (GTK_CONTAINER (window), main_vbox); /* * Server Name */ hbox = gtk_hbox_new (FALSE, 0); gtk_box_pack_start (GTK_BOX (main_vbox), hbox, FALSE, FALSE, 8); hbox2 = gtk_hbox_new (FALSE, 4); gtk_box_pack_start (GTK_BOX (hbox), hbox2, TRUE, FALSE, 0); if (games[s->type].pix) { pixmap = gtk_pixmap_new (games[s->type].pix->pix, games[s->type].pix->mask); gtk_box_pack_start (GTK_BOX (hbox2), pixmap, FALSE, FALSE, 0); gtk_widget_show (pixmap); } if (s->name) { label = gtk_label_new (s->name); } else { g_snprintf (buf, 256, "%s:%d", inet_ntoa (s->host->ip), s->port); label = gtk_label_new (buf); } gtk_box_pack_start (GTK_BOX (hbox2), label, FALSE, FALSE, 0); gtk_widget_show (label); gtk_widget_show (hbox2); gtk_widget_show (hbox); /* * Notebook */ notebook = gtk_notebook_new (); gtk_notebook_set_tab_pos (GTK_NOTEBOOK (notebook), GTK_POS_TOP); gtk_box_pack_start (GTK_BOX (main_vbox), notebook, FALSE, FALSE, 0); page = server_info_page (s); label = gtk_label_new (_("Info")); gtk_widget_show (label); gtk_notebook_append_page (GTK_NOTEBOOK (notebook), page, label); page = server_passwords_page (s); label = gtk_label_new (_("Passwords")); gtk_widget_show (label); gtk_notebook_append_page (GTK_NOTEBOOK (notebook), page, label); page = server_comment_page(s); label = gtk_label_new (_("Comment")); gtk_widget_show (label); gtk_notebook_append_page (GTK_NOTEBOOK (notebook), page, label); gtk_notebook_set_page (GTK_NOTEBOOK (notebook), 0); gtk_widget_show (notebook); /* * Buttons at the bottom */ hbox = gtk_hbox_new (FALSE, 8); gtk_box_pack_start (GTK_BOX (main_vbox), hbox, FALSE, FALSE, 0); button = gtk_button_new_with_label (_("Cancel")); gtk_widget_set_usize (button, 80, -1); gtk_box_pack_end (GTK_BOX (hbox), button, FALSE, FALSE, 0); gtk_signal_connect_object (GTK_OBJECT (button), "clicked", GTK_SIGNAL_FUNC (gtk_widget_destroy), GTK_OBJECT (window)); GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); gtk_widget_show (button); button = gtk_button_new_with_label (_("OK")); gtk_widget_set_usize (button, 80, -1); gtk_box_pack_end (GTK_BOX (hbox), button, FALSE, FALSE, 0); gtk_signal_connect (GTK_OBJECT (button), "clicked", GTK_SIGNAL_FUNC (set_new_properties), (gpointer) s); gtk_signal_connect_object (GTK_OBJECT (button), "clicked", GTK_SIGNAL_FUNC (gtk_widget_destroy), GTK_OBJECT (window)); GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); gtk_widget_grab_default (button); gtk_widget_show (button); gtk_widget_show (hbox); gtk_widget_show (main_vbox); gtk_widget_show (window); gtk_main (); unregister_window (window); } void combo_set_vals (GtkWidget *combo, GList *strlist, const char *str) { g_return_if_fail(GTK_IS_COMBO(combo)); if (!strlist) { gtk_list_clear_items (GTK_LIST (GTK_COMBO (combo)->list), 0, -1); } else { /* * gtk_combo_set_popdown_strings (actually gtk_list_insert_items) * automatically selects the first one and puts it into entry. * That should not happen. Drop selection mode for a moment * to prevent that. */ gtk_list_set_selection_mode (GTK_LIST (GTK_COMBO (combo)->list), GTK_SELECTION_SINGLE); gtk_combo_set_popdown_strings (GTK_COMBO (combo), strlist); gtk_list_set_selection_mode (GTK_LIST (GTK_COMBO (combo)->list), GTK_SELECTION_BROWSE); } if (str) { gtk_entry_set_text (GTK_ENTRY (GTK_COMBO (combo)->entry), str); gtk_entry_set_position (GTK_ENTRY (GTK_COMBO (combo)->entry), 0); } else { gtk_entry_set_text (GTK_ENTRY (GTK_COMBO (combo)->entry), ""); } } xqf-1.0.5/src/srv-prop.h0000644002404400000620000000362510302664533011770 00000000000000/* XQF - Quake server browser and launcher * Copyright (C) 1998-2000 Roman Pozlevich * * 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 */ #ifndef __SRV_PROP_H__ #define __SRV_PROP_H__ #include "xqf.h" struct server_props { struct host *host; int port; char *custom_cfg; char *server_password; char *spectator_password; char *rcon_password; int reserved_slots; /*pulp*/ int sucks; char *comment; }; extern struct server_props *properties (struct server *s); extern struct server_props *properties_new (struct host *host, unsigned short port); extern void props_free_all (void); extern void props_save (void); extern void props_load (void); extern void properties_dialog (struct server *s); extern void combo_set_vals (GtkWidget *combo, GList *strlist, const char *str); static inline int server_need_redial(struct server* s, struct server_props* props) { return ((s->curplayers >= (s->maxplayers - (props?props->reserved_slots:0))) // really full || ((s->curplayers >= (s->maxplayers - s->private_client)) // private clients and no password set && !(props && props->server_password && *props->server_password)) ); } #endif /* __SRV_PROP_H__ */ xqf-1.0.5/src/games.xml0000644002404400000620000005610310445250746011651 00000000000000 DEFAULT quake_parse_server config_is_valid_generic exec_generic quake_save_info Q1_SERVER GAME_CONNECT | GAME_RECORD | GAME_QUAKE1_PLAYER_COLORS | GAME_QUAKE1_SKIN Quake 26000 QS QS -qs q1.xpm poqs_parse_player quake_config_is_valid write_q1_vars q1_exec_generic quake_custom_cfgs quake_init_maps quake_has_map nq-x11 nq-sdl nq-glx nq-sgl twilight-nq q1_cmd_or_dir_changed q1_prefs_load q1_update_prefs id1 q1_private QW_SERVER GAME_CONNECT | GAME_RECORD | GAME_SPECTATE | GAME_RCON | GAME_QUAKE1_PLAYER_COLORS | GAME_QUAKE1_SKIN QuakeWorld 27500 27000 QWS QWS -qws -qwm q.xpm qw_parse_player qw_analyze_serverinfo quake_config_is_valid write_qw_vars qw_exec quake_custom_cfgs quake_init_maps quake_has_map qw-client-x11 qw-client-sdl qw-client-glx qw-client-sgl twilight-qw qw_cmd_or_dir_changed qw_prefs_load qw_update_prefs qw id1 qw_private Q2_SERVER GAME_CONNECT | GAME_RECORD | GAME_SPECTATE | GAME_PASSWORD | GAME_RCON Quake2 27910 27900 Q2S Q2S -q2s -q2m q2.xpm q2_parse_player q2_analyze_serverinfo quake_config_is_valid write_q2_vars q2_exec quake_custom_cfgs quake_init_maps quake_has_map version identify_cpu identify_os quake2 q2_cmd_or_dir_changed q2_prefs_load q2_update_prefs baseq2 q2_private Q3_SERVER GAME_CONNECT | GAME_PASSWORD | GAME_RCON | GAME_QUAKE3_MASTERPROTOCOL | GAME_Q3COLORS Quake3: Arena 27960 27950 Q3S Q3S -q3s -q3m q3.xpm q3_parse_player q3_analyze_serverinfo quake3_config_is_valid q3_exec quake_custom_cfgs q3_init_maps quake_has_map q3_get_mapshot version identify_cpu identify_os quake3 q3 ~/.q3a q3_prefs_load q3_update_prefs demoq3 baseq3 q3_private Q3_SERVER Q4_SERVER Quake 4 28004 27650 Q4S Q4S -q4s -q4m q4.xpm doom3_analyze_serverinfo config_is_valid_generic quake4_init_maps quake4_has_map quake4_get_mapshot si_version quake4 doom3_cmd_or_dir_changed q3_prefs_load_common quake4_update_prefs ~/.quake4 q4base +net_clientRemoteConsolePassword +rconpassword quake4_private Q3_SERVER WO_SERVER Wolfenstein WOS RWS -rws -rwm wo.xpm config_is_valid_generic wolf ~/.wolf q3_prefs_load_common q3_update_prefs_common demomain main wolfmp wolf_private Q3_SERVER WOET_SERVER Enemy Territory WOETS WOETS -woets -woetm et.xpm config_is_valid_generic et ~/.etwolf q3_prefs_load_common q3_update_prefs_common etmain wolfet_private Q3_SERVER DOOM3_SERVER Doom 3 27666 27650 DM3S DM3S -dm3s -dm3m doom3.xpm doom3_analyze_serverinfo config_is_valid_generic doom3_init_maps doom3_has_map doom3_get_mapshot si_version doom3 doom3_cmd_or_dir_changed q3_prefs_load_common doom3_update_prefs ~/.doom3 base +net_clientRemoteConsolePassword +rconpassword doom3_private Q3_SERVER EF_SERVER Voyager Elite Force EFS -efm ef.xpm config_is_valid_generic NULL NULL NULL q3_prefs_load_common q3_update_prefs_common BaseEF H2_SERVER GAME_CONNECT | GAME_QUAKE1_PLAYER_COLORS Hexen2 26900 H2S H2S -h2s hex.xpm poqs_parse_player q1_exec_generic HW_SERVER GAME_CONNECT | GAME_QUAKE1_PLAYER_COLORS | GAME_RCON HexenWorld 26950 HWS HWS -hws hw.xpm qw_parse_player qw_analyze_serverinfo q1_exec_generic SN_SERVER Sin GAME_CONNECT | GAME_RCON 22450 SNS SNS -sns sn.xpm q2_parse_player q2_analyze_serverinfo q2_exec_generic HL_SERVER_OLD Half-Life (old) GAME_CONNECT | GAME_PASSWORD | GAME_RCON | GAME_MASTER_STEAM 27015 27010 HLS HLS -hls -hlm hl.xpm hl_parse_player hl_analyze_serverinfo hl_exec quake_init_maps quake_has_map sv_os identify_os hl_private HL_SERVER Half-Life GAME_CONNECT | GAME_PASSWORD | GAME_RCON | GAME_MASTER_STEAM 27015 27010 HLA2S HLA2S -hla2s -hla2sm hl.xpm hl_parse_player hl_analyze_serverinfo hl_exec quake_init_maps quake_has_map sv_os identify_os hl_private HL2_SERVER Half-Life 2 GAME_CONNECT | GAME_PASSWORD | GAME_MASTER_STEAM 27015 27011 A2S A2S -a2s -stma2s hl2.xpm hl_parse_player hl_analyze_serverinfo hl_exec sv_os identify_os KP_SERVER Kingpin GAME_CONNECT | GAME_RCON 31510 Q2S:KP Q2S -q2s kp.xpm q2_parse_player q2_analyze_serverinfo q2_exec_generic version identify_cpu identify_os SFS_SERVER Soldier of Fortune GAME_CONNECT | GAME_RCON 28910 SFS SFS -sfs sfs.xpm q2_parse_player q2_analyze_serverinfo q2_exec_generic sof Q3_SERVER SOF2S_SERVER Soldier of Fortune 2 20100 20110 SOF2S SOF2S -sof2s -sof2m sof2s.xpm config_is_valid_generic NULL NULL NULL main q3_prefs_load_common q3_update_prefs_common T2_SERVER Tribes 2 GAME_CONNECT | GAME_RCON 28000 28000 T2S T2S -t2s -t2m t2.xpm t2_parse_player t2_analyze_serverinfo t2_exec linux t2_identify_os tribes2 tribes2_prefs_load tribes2_update_prefs HR_SERVER Heretic2 GAME_CONNECT | GAME_RCON 28910 Q2S:HR Q2S -q2s hr2.xpm q2_parse_player q2_analyze_serverinfo q2_exec_generic UN_SERVER Unreal / UT GAME_CONNECT | GAME_PASSWORD 7777 UNS UNS -uns un.xpm un_parse_player un_analyze_serverinfo ut_exec unreal_init_maps unreal_has_map ut ut_private UN_SERVER UT2_SERVER UT 2003 GAME_CONNECT | GAME_SPECTATE | GAME_PASSWORD | GAME_LAUNCH_HOSTPORT UT2S UT2S -ut2s ut2.xpm ut2003_demo ut2003 ~/.ut2003 ut2_private UN_SERVER UT2004_SERVER UT 2004 GAME_CONNECT | GAME_SPECTATE | GAME_PASSWORD | GAME_LAUNCH_HOSTPORT | GAME_MASTER_CDKEY 28902 UT2004S UT2004S -ut2004s -ut2004m ut2004.xpm ut2004demo ut2004 ut2004_cmd_or_dir_changed ut2004_update_prefs ~/.ut2004 ut2004_private UN_SERVER RUNE_SERVER Rune RUNESRV rune.xpm rune rune_private UN_SERVER POSTAL2_SERVER Postal 2 POSTAL2 postal2.xpm postal2mpdemo postal2mp postal2_private UN_SERVER AAO_SERVER America's Army GAME_CONNECT | GAME_SPECTATE | GAME_PASSWORD | GAME_LAUNCH_HOSTPORT 1716 AMS AMS -ams aao.xpm armyops aao_private DESCENT3_SERVER Descent3 GAME_CONNECT 20142 D3G D3G -d3g descent3.xpm descent3_parse_player descent3_analyze_serverinfo descent3_exec descent3 SSAM_SERVER Serious Sam GAME_CONNECT 25600 SMS SMS -sms ssam.xpm un_parse_player un_analyze_serverinfo ssam_exec ssamtfe SSAM_SERVER SSAMSE_SERVER Serious Sam TSE SMSSE ssamtse Q3_SERVER MOHAA_SERVER Medal of Honor: Allied Assault 12204 MHS MHS -mhs mohaa.xpm config_is_valid_generic mohaa ~/.mohaa main mohaa_private Q3_SERVER COD_SERVER Call of Duty 28960 20510 CODS CODS -cods -codm cod.xpm config_is_valid_generic NULL codmp q3_prefs_load_common q3_update_prefs_common main cod_private SAS_SERVER Savage GAME_CONNECT | GAME_PASSWORD | GAME_ADMIN 11235 SAS SAS -sas savage.xpm savage_parse_player savage_analyze_serverinfo savage_exec savage BF1942_SERVER Battlefield 1942 GAME_CONNECT 14567 BF1942 EYE -eye bf1942.xpm un_parse_player bf1942_analyze_serverinfo bf1942_exec Q3_SERVER JK3_SERVER Jedi Academy 29070 29060 JK3S JK3S -jk3s -jk3m jk3.xpm config_is_valid_generic NULL jamp q3_prefs_load_common q3_update_prefs_common base jk3_private NETP_SERVER GPS_SERVER NetPanzer 3030 28900 NETP -netp -netpm,netpanzer netp.xpm config_is_valid_generic NULL netpanzer netpanzer_exec Q3_SERVER NEXUIZ_SERVER Nexuiz NEXUIZS NEXUIZS -nexuizs -nexuizm nexuiz.xpm config_is_valid_generic NULL NULL NULL nexuiz ~/.nexuiz q3_prefs_load_common q3_update_prefs_common data Q3_SERVER WARSOW_SERVER Warsow 44400 WARSOWS WARSOWS -warsows -warsowm warsow.xpm config_is_valid_generic q3_init_maps quake_has_map q3_get_mapshot warsow ~/.warsow q3_prefs_load_common q3_update_prefs_common basewsw warsow_private Q3_SERVER TREMULOUS_SERVER Tremulous 30720 30710 TREMULOUS TREMULOUS -tremulous -tremulousm tremulous.xpm config_is_valid_generic tremulous ~/.tremulous tremulous_cmd_or_dir_changed q3_prefs_load_common tremulous_update_prefs base tremulous_private GPS_SERVER Generic Gamespy GAME_CONNECT 27888 GPS GPS -gps gamespy3d.xpm un_parse_player un_analyze_serverinfo gamespy_exec UNKNOWN_SERVER unknown xqf-1.0.5/src/flt-player.c0000644002404400000620000010034510275434301012244 00000000000000/* XQF - Quake server browser and launcher * Copyright (C) 1998-2000 Roman Pozlevich * * 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 */ #include "gnuconfig.h" #include #include #include /* FILE, fopen, fclose, fprintf... */ #include /* strlen, strcmp */ #include /* unlink, close */ #include /* open */ #include /* open */ #include #include "i18n.h" #include "xqf.h" #include "pref.h" #include "pixmaps.h" #include "dialogs.h" #include "utils.h" #include "flt-player.h" #include "filter.h" #include "debug.h" #define REGCOMP_FLAGS (REG_EXTENDED | REG_NOSUB | REG_ICASE) static GSList *players = NULL; /* GSList */ static GSList *curplrs = NULL; /* GSList */ static GtkWidget *pattern_clist; static GtkWidget *pattern_entry; static GtkWidget *comment_text; static GtkWidget *mode_buttons[3]; static GtkWidget *delete_button; static GtkWidget *up_button; static GtkWidget *down_button; static int current_row = -1; static void player_filter_save_patterns (void); static void player_filter_load_patterns (void); enum { TOKEN_INVALID = G_TOKEN_LAST, TOKEN_STRING, TOKEN_SUBSTR, TOKEN_REGEXP }; static char *mode_symbols[3] = { N_("string"), N_("substr"), N_("regexp") }; static const char *mode_names[3] = { N_("string"), N_("substring"), N_("regular expression") }; int player_filter (struct server *s) { /* The 'vars' is ignored in this function, however, since we need it for applying the server filter, we will put it in the arguments. */ GSList *list; GSList *plist; struct player_pattern *pp; struct player *p; s->flags &= ~PLAYER_GROUP_MASK; if (!s->players) return FALSE; for (plist = s->players; plist; plist = plist->next) { p = (struct player *) plist->data; p->flags &= ~PLAYER_GROUP_MASK; } if (!players) return FALSE; for (list = players; list; list = list->next) { pp = (struct player_pattern *) list->data; for (plist = s->players; plist; plist = plist->next) { p = (struct player *) plist->data; if (pp->data && !pp->error) { if ((pp->mode == PATTERN_MODE_STRING && g_strcasecmp (p->name, pp->data) == 0) || (pp->mode == PATTERN_MODE_SUBSTR && lowcasestrstr (p->name, pp->data)) || (pp->mode == PATTERN_MODE_REGEXP && regexec ((regex_t *) pp->data, p->name, 0, NULL, 0) == 0)) { p->flags |= pp->groups; s->flags |= pp->groups; } } } } return ((s->flags & PLAYER_GROUP_MASK) != 0)? TRUE : FALSE; } static void free_player_pattern_compiled_data (struct player_pattern *pp) { if (!pp) return; if (pp->error) { g_free (pp->error); pp->error = NULL; } if (pp->data) { if (pp->mode == PATTERN_MODE_REGEXP) { regfree ((regex_t *) pp->data); } g_free (pp->data); pp->data = NULL; } } static void free_player_pattern (struct player_pattern *pp) { free_player_pattern_compiled_data (pp); if (pp->pattern) g_free (pp->pattern); if (pp->comment) g_free (pp->comment); g_free (pp); } static char *get_regerror (int errcode, regex_t *compiled) { size_t length; char *buffer; length = regerror (errcode, compiled, NULL, 0); buffer = g_malloc (length); regerror (errcode, compiled, buffer, length); return buffer; } static void player_pattern_compile (struct player_pattern *pp) { int res; free_player_pattern_compiled_data (pp); if (pp->pattern && pp->pattern[0]) { switch (pp->mode) { case PATTERN_MODE_REGEXP: pp->data = g_malloc (sizeof (regex_t)); res = regcomp ((regex_t *) pp->data, pp->pattern, REGCOMP_FLAGS); if (res) { pp->error = get_regerror (res, (regex_t *) pp->data); regfree ((regex_t *) pp->data); g_free (pp->data); pp->data = NULL; } break; case PATTERN_MODE_STRING: case PATTERN_MODE_SUBSTR: default: pp->data = g_strdup (pp->pattern); g_strdown (pp->data); break; } } } static struct player_pattern *player_pattern_new (struct player_pattern *src) { struct player_pattern *pp; pp = g_malloc0 (sizeof (struct player_pattern)); if (src) { pp->mode = src->mode; pp->pattern = g_strdup (src->pattern); pp->comment = g_strdup (src->comment); pp->groups = src->groups; } else { pp->mode = PATTERN_MODE_STRING; pp->groups = PLAYER_GROUP_RED; } pp->dirty = TRUE; return pp; } static void pattern_clist_sync_selection (void) { GSList *list; struct player_pattern *pp; if (current_row >= 0) { list = g_slist_nth (curplrs, current_row); pp = (struct player_pattern *) list->data; if (!GTK_WIDGET_REALIZED (comment_text)) gtk_widget_realize (comment_text); gtk_text_freeze (GTK_TEXT (comment_text)); gtk_text_set_point (GTK_TEXT (comment_text), 0); gtk_text_forward_delete (GTK_TEXT (comment_text), gtk_text_get_length (GTK_TEXT (comment_text))); gtk_text_set_point (GTK_TEXT (comment_text), 0); if (pp->comment) { gtk_text_insert (GTK_TEXT (comment_text), NULL, NULL, NULL, pp->comment, strlen (pp->comment)); gtk_text_set_point (GTK_TEXT (comment_text), 0); } gtk_text_set_editable (GTK_TEXT (comment_text), TRUE); gtk_text_thaw (GTK_TEXT (comment_text)); gtk_entry_set_text (GTK_ENTRY (pattern_entry), (pp->pattern)? pp->pattern : ""); gtk_entry_set_editable (GTK_ENTRY (pattern_entry), TRUE); gtk_widget_set_sensitive (mode_buttons[PATTERN_MODE_STRING], TRUE); gtk_widget_set_sensitive (mode_buttons[PATTERN_MODE_SUBSTR], TRUE); gtk_widget_set_sensitive (mode_buttons[PATTERN_MODE_REGEXP], TRUE); gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON (mode_buttons[pp->mode]), TRUE); gtk_widget_set_sensitive (delete_button, TRUE); gtk_widget_set_sensitive (up_button, TRUE); gtk_widget_set_sensitive (down_button, TRUE); } else { gtk_text_freeze (GTK_TEXT (comment_text)); gtk_text_set_point (GTK_TEXT (comment_text), 0); gtk_text_forward_delete (GTK_TEXT (comment_text), gtk_text_get_length (GTK_TEXT (comment_text))); gtk_text_set_editable (GTK_TEXT (comment_text), FALSE); gtk_text_thaw (GTK_TEXT (comment_text)); gtk_entry_set_text (GTK_ENTRY (pattern_entry), ""); gtk_entry_set_editable (GTK_ENTRY (pattern_entry), FALSE); gtk_widget_set_sensitive (mode_buttons[PATTERN_MODE_STRING], FALSE); gtk_widget_set_sensitive (mode_buttons[PATTERN_MODE_SUBSTR], FALSE); gtk_widget_set_sensitive (mode_buttons[PATTERN_MODE_REGEXP], FALSE); gtk_widget_set_sensitive (delete_button, FALSE); gtk_widget_set_sensitive (up_button, FALSE); gtk_widget_set_sensitive (down_button, FALSE); } } static void pattern_clist_update_groups (int row, unsigned newstate, unsigned oldstate) { int i; unsigned mask; for (i = 0, mask = 1; i < 3; i++, mask <<= 1) { if ((newstate & mask) != 0) { if ((oldstate & mask) == 0) { gtk_clist_set_pixmap (GTK_CLIST (pattern_clist), row, i, group_pix[i].pix, group_pix[i].mask); } } else { if ((oldstate & mask) != 0) gtk_clist_set_text (GTK_CLIST (pattern_clist), row, i, ""); } } } static void pattern_clist_update_row (struct player_pattern *pp, int row) { pattern_clist_update_groups (row, pp->groups, ~pp->groups); /* update all */ if (pp->error) { gtk_clist_set_pixtext (GTK_CLIST (pattern_clist), row, 3, mode_symbols[pp->mode], 2, error_pix.pix, error_pix.mask); } else { gtk_clist_set_text (GTK_CLIST (pattern_clist), row, 3, mode_symbols[pp->mode]); } gtk_clist_set_text (GTK_CLIST (pattern_clist), row, 4, pp->pattern); } static void sync_pattern_data (void) { struct player_pattern *pp; char *pattern; char *comment; enum pattern_mode mode; int update_pattern = FALSE; int update_comment = FALSE; GSList *list; if (current_row < 0) return; list = g_slist_nth (curplrs, current_row); pp = (struct player_pattern *) list->data; if (GTK_TOGGLE_BUTTON (mode_buttons[PATTERN_MODE_STRING])->active) mode = PATTERN_MODE_STRING; else if (GTK_TOGGLE_BUTTON (mode_buttons[PATTERN_MODE_SUBSTR])->active) mode = PATTERN_MODE_SUBSTR; else mode = PATTERN_MODE_REGEXP; pattern = strdup_strip (gtk_entry_get_text (GTK_ENTRY (pattern_entry))); comment = gtk_editable_get_chars (GTK_EDITABLE (comment_text), 0, -1); update_pattern = (pp->pattern && pp->pattern[0])? !pattern || !pattern[0] || strcmp (pp->pattern, pattern) : pattern && pattern[0]; update_comment = (pp->comment && pp->comment[0])? !comment || !comment[0] || strcmp (pp->comment, comment) : comment && comment[0]; /* * Test everything but groups. * They are synchronized by pattern_set_groups() */ if (mode != pp->mode || update_comment || update_pattern) { if (!pp->dirty) { pp = player_pattern_new (pp); list->data = pp; } if (update_pattern) { if (pp->pattern) g_free (pp->pattern); pp->pattern = pattern; } if (update_comment) { if (pp->comment) g_free (pp->comment); pp->comment = comment; } if (pp->mode != mode || update_pattern) { free_player_pattern_compiled_data (pp); pp->mode = mode; player_pattern_compile (pp); } pattern_clist_update_row (pp, current_row); } if (!update_comment) g_free (comment); if (!update_pattern) g_free (pattern); } static int pattern_clist_insert_row (struct player_pattern *pp, int row) { char *text[6]; text[0] = text[1] = text[2] = text[3] = text[4] = text[5] = NULL; if (row < 0) row = gtk_clist_append (GTK_CLIST (pattern_clist), text); else gtk_clist_insert (GTK_CLIST (pattern_clist), row, text); pattern_clist_update_row (pp, row); return row; } static void pattern_set_groups (int row, int column, int add) { GSList *list; struct player_pattern *pp; unsigned newstate; unsigned oldstate; if (column < 0 || column > 2 || row < 0) return; list = g_slist_nth (curplrs, row); pp = (struct player_pattern *) list->data; oldstate = pp->groups; newstate = 1 << column; if (add) { if ((pp->groups & ~newstate & PLAYER_GROUP_MASK) != 0) newstate ^= pp->groups; } if (newstate != oldstate) { if (!pp->dirty) { pp = player_pattern_new (pp); list->data = pp; player_pattern_compile (pp); } pp->groups = newstate; pattern_clist_update_groups (row, newstate, oldstate); } } static void show_pattern_error (int row) { GSList *list; struct player_pattern *pp; list = g_slist_nth (curplrs, row); pp = (struct player_pattern *) list->data; if (pp->error) { dialog_ok (_("XQF: Error"), _("Regular Expression Error!\n\n%s\n\n%s."), pp->pattern, pp->error); } } static int pattern_clist_event_callback (GtkWidget *widget, GdkEvent *event) { GdkEventButton *bevent = (GdkEventButton *) event; int row, column; int add; if ((event->type == GDK_BUTTON_PRESS || event->type == GDK_2BUTTON_PRESS || event->type == GDK_3BUTTON_PRESS) && bevent->window == GTK_CLIST (pattern_clist)->clist_window) { if (gtk_clist_get_selection_info (GTK_CLIST (pattern_clist), bevent->x, bevent->y, &row, &column)) { if (event->type == GDK_BUTTON_PRESS) { if (column >= 0) { switch (column) { case 0: case 1: case 2: sync_pattern_data (); add = (bevent->button == 3) || (bevent->state & (GDK_CONTROL_MASK | GDK_SHIFT_MASK)) != 0; pattern_set_groups (row, column, add); return TRUE; case 3: /* sync_pattern_data () is called by "select_row" callback */ gtk_clist_select_row (GTK_CLIST (pattern_clist), row, 0); show_pattern_error (row); return TRUE; default: break; } } } if (event->type == GDK_2BUTTON_PRESS || event->type == GDK_3BUTTON_PRESS) return TRUE; } } return FALSE; } static void pattern_clist_select_row_callback (GtkWidget *widget, int row, int column, GdkEventButton *event) { sync_pattern_data (); // for some reason this function is called when a row gets deleted, would // segfault later when row was the last one if(row>=g_slist_length(curplrs)) return; current_row = row; pattern_clist_sync_selection (); } static void new_pattern_callback (GtkWidget *widget, gpointer data) { struct player_pattern *pp; int row; pp = player_pattern_new (NULL); if (current_row >= 0) { row = current_row; current_row++; } else { row = 0; } curplrs = g_slist_insert (curplrs, pp, row); pattern_clist_insert_row (pp, row); if (curplrs && curplrs->next) gtk_clist_select_row (GTK_CLIST (pattern_clist), row, 0); gtk_widget_grab_focus (pattern_entry); } static void delete_pattern_callback (GtkWidget *widget, gpointer data) { GSList *link; struct player_pattern *pp; int row; debug(5,"delete_pattern_callback(widget=%x,data=%x)",widget,data); if (current_row < 0) return; link = g_slist_nth (curplrs, current_row); pp = (struct player_pattern *) link->data; curplrs = g_slist_remove_link (curplrs, link); if (pp->dirty) free_player_pattern (pp); row = current_row; current_row = -1; gtk_clist_remove (GTK_CLIST (pattern_clist), row); if (current_row < 0) pattern_clist_sync_selection (); } static void pattern_clist_adjust_visibility (int row, int direction) { GtkVisibility vis; debug(5,"pattern_clist_adjust_visibility(row=%d,direction=%d)",row,direction); vis = gtk_clist_row_is_visible (GTK_CLIST (pattern_clist), row); if (vis != GTK_VISIBILITY_FULL) { gtk_clist_moveto (GTK_CLIST (pattern_clist), row, 0, (direction == 0)? 0.5 : ((direction > 0)? 1.0 : 0.0), 0.0); } } static void move_up_down_pattern_callback (GtkWidget *widget, int dir) { int row = current_row; debug(5,"move_up_down_pattern_callback(widget=%x, dir=%d) row=%d",widget,dir,row); if ((dir != -1 || row <= 0) && (dir != 1 || row < 0 || row == g_slist_length (curplrs) - 1)) { return; } /* link = g_slist_nth (curplrs, row + dir); pp = (struct player_pattern *) link->data; curplrs = g_slist_remove_link (curplrs, link); curplrs = g_slist_insert (curplrs, pp, row); */ debug(5,"gtk_clist_swap_rows(..., %d,%d)",row,row+dir); gtk_clist_swap_rows (GTK_CLIST (pattern_clist), row, row + dir); // adjust current_row because pattern_clist_row_move_callback // does not know about the direction current_row = row+dir; pattern_clist_adjust_visibility (current_row, dir); } static void pattern_clist_row_move_callback (GtkWidget *widget, int source, int dest, gpointer data) { GtkCList *clist = GTK_CLIST (widget); GSList *link; struct player_pattern *pp; debug(5,"pattern_clist_row_move_callback(widget=%d,source=%d,dest=%d)",widget,source,dest); if (source < 0 || dest < 0 || source == dest || source > clist->rows || dest > clist->rows) { return; } link = g_slist_nth (curplrs, source); pp = (struct player_pattern *) link->data; curplrs = g_slist_remove_link (curplrs, link); curplrs = g_slist_insert (curplrs, pp, dest); current_row = dest; } static GtkWidget *aligned_pixmap (GdkPixmap *pix, GdkBitmap *mask) { GtkWidget *pixmap; GtkWidget *alignment; alignment = gtk_alignment_new (0.5, 0.5, 0, 0); pixmap = gtk_pixmap_new (pix, mask); gtk_container_add (GTK_CONTAINER (alignment), pixmap); gtk_widget_show (pixmap); return alignment; } static GtkWidget *player_filter_pattern_editor (void) { GtkWidget *vbox; GtkWidget *hbox; GtkWidget *table; GtkWidget *label; GtkWidget *frame; GtkWidget *vscrollbar; GSList *group; int i; vbox = gtk_vbox_new (FALSE, 8); frame = gtk_frame_new (NULL); gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0); table = gtk_table_new (2, 2, FALSE); gtk_table_set_row_spacings (GTK_TABLE (table), 2); gtk_table_set_col_spacings (GTK_TABLE (table), 4); gtk_container_set_border_width (GTK_CONTAINER (table), 6); gtk_container_add (GTK_CONTAINER (frame), table); /* Pattern Entry */ label = gtk_label_new (_("Pattern")); gtk_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1, 0, 0, 0, 0); gtk_widget_show (label); pattern_entry = gtk_entry_new_with_max_length (256); gtk_table_attach_defaults (GTK_TABLE (table), pattern_entry, 1, 2, 0, 1); gtk_signal_connect (GTK_OBJECT (pattern_entry), "activate", GTK_SIGNAL_FUNC (sync_pattern_data), NULL); gtk_widget_show (pattern_entry); /* Mode Buttons */ hbox = gtk_hbox_new (FALSE, 4); gtk_table_attach_defaults (GTK_TABLE (table), hbox, 1, 2, 1, 2); group = NULL; for (i = 0; i < 3; i++) { mode_buttons[i] = gtk_radio_button_new_with_label (group, _(mode_names[i])); group = gtk_radio_button_group (GTK_RADIO_BUTTON (mode_buttons[i])); gtk_signal_connect (GTK_OBJECT (mode_buttons[i]), "clicked", GTK_SIGNAL_FUNC (sync_pattern_data), NULL); gtk_box_pack_start (GTK_BOX (hbox), mode_buttons[i], FALSE, FALSE, 0); gtk_widget_show (mode_buttons[i]); } gtk_widget_show (hbox); gtk_widget_show (table); gtk_widget_show (frame); /* Comment */ frame = gtk_frame_new (_("Pattern Comment")); gtk_box_pack_end (GTK_BOX (vbox), frame, TRUE, TRUE, 0); hbox = gtk_hbox_new (FALSE, 0); gtk_container_set_border_width (GTK_CONTAINER (hbox), 6); gtk_container_add (GTK_CONTAINER (frame), hbox); comment_text = gtk_text_new (NULL, NULL); gtk_widget_set_usize (comment_text, -1, 80); gtk_box_pack_start (GTK_BOX (hbox), comment_text, TRUE, TRUE, 0); gtk_widget_show (comment_text); vscrollbar = gtk_vscrollbar_new (GTK_TEXT (comment_text)->vadj); gtk_box_pack_start (GTK_BOX (hbox), vscrollbar, FALSE, FALSE, 0); gtk_widget_show (vscrollbar); gtk_widget_show (hbox); gtk_widget_show (frame); gtk_widget_show (vbox); return vbox; } static void player_filter_page_init (void) { struct player_pattern *pp; GSList *list; curplrs = g_slist_copy (players); current_row = -1; for (list = players; list; list = list->next) { pp = (struct player_pattern *) list->data; pp->dirty = FALSE; pattern_clist_insert_row (pp, -1); } if (!curplrs) pattern_clist_sync_selection (); } void player_filter_page (GtkWidget *notebook) { GtkWidget *page_hbox; GtkWidget *scrollwin; GtkWidget *label; GtkWidget *vbox; GtkWidget *vbox2; GtkWidget *alignment; GtkWidget *pixmap; GtkWidget *button; GtkWidget *peditor; char *titles[5] = { "", "", "", _("Mode"), _("Pattern") }; int i; page_hbox = gtk_hbox_new (FALSE, 8); gtk_container_set_border_width (GTK_CONTAINER (page_hbox), 8); label = gtk_label_new (_("Player Filter")); gtk_widget_show (label); gtk_notebook_append_page (GTK_NOTEBOOK (notebook), page_hbox, label); /* Pattern CList */ scrollwin = gtk_scrolled_window_new (NULL, NULL); gtk_box_pack_start (GTK_BOX (page_hbox), scrollwin, FALSE, FALSE, 0); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrollwin), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); pattern_clist = gtk_clist_new_with_titles (5, titles); gtk_widget_set_usize (pattern_clist, 260, 200); gtk_clist_set_selection_mode (GTK_CLIST (pattern_clist), GTK_SELECTION_BROWSE); gtk_clist_set_reorderable (GTK_CLIST (pattern_clist), TRUE); gtk_signal_connect (GTK_OBJECT (pattern_clist), "event", GTK_SIGNAL_FUNC (pattern_clist_event_callback), NULL); gtk_signal_connect (GTK_OBJECT (pattern_clist), "select_row", GTK_SIGNAL_FUNC (pattern_clist_select_row_callback), NULL); gtk_signal_connect (GTK_OBJECT (pattern_clist), "row_move", GTK_SIGNAL_FUNC (pattern_clist_row_move_callback), NULL); for (i = 0; i < 3; i++) { pixmap = aligned_pixmap (group_pix[i].pix, group_pix[i].mask); gtk_clist_set_column_width (GTK_CLIST (pattern_clist), i, pixmap_width (group_pix[i].pix)); gtk_clist_set_column_widget (GTK_CLIST (pattern_clist), i, pixmap); gtk_widget_show (pixmap); gtk_clist_set_column_resizeable (GTK_CLIST (pattern_clist), i, FALSE); } gtk_clist_set_column_width (GTK_CLIST (pattern_clist), 3, 45); gtk_container_add (GTK_CONTAINER (scrollwin), pattern_clist); gtk_clist_column_titles_passive (GTK_CLIST (pattern_clist)); gtk_widget_show (pattern_clist); gtk_widget_show (scrollwin); gtk_widget_ensure_style (pattern_clist); /*FIXME_GTK2: style->font not working with gtk2*/ #ifndef USE_GTK2 i = MAX (pixmap_height (group_pix[0].pix), pattern_clist->style->font->ascent + pattern_clist->style->font->descent + 1); gtk_clist_set_row_height (GTK_CLIST (pattern_clist), i); #endif /* Buttons */ vbox = gtk_vbox_new (FALSE, 4); gtk_box_pack_start (GTK_BOX (page_hbox), vbox, FALSE, FALSE, 0); button = gtk_button_new_with_label (_("New")); gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0); gtk_signal_connect (GTK_OBJECT (button), "clicked", GTK_SIGNAL_FUNC (new_pattern_callback), NULL); gtk_widget_show (button); delete_button = gtk_button_new_with_label (_("Delete")); gtk_box_pack_start (GTK_BOX (vbox), delete_button, FALSE, FALSE, 0); gtk_signal_connect (GTK_OBJECT (delete_button), "clicked", GTK_SIGNAL_FUNC (delete_pattern_callback), NULL); gtk_widget_show (delete_button); alignment = gtk_alignment_new (0, 0.5, 1, 0); gtk_box_pack_end (GTK_BOX (vbox), alignment, TRUE, TRUE, 0); vbox2 = gtk_vbox_new (FALSE, 4); gtk_container_add (GTK_CONTAINER (alignment), vbox2); up_button = gtk_button_new_with_label (_("Up")); gtk_box_pack_start (GTK_BOX (vbox2), up_button, FALSE, FALSE, 0); gtk_signal_connect (GTK_OBJECT (up_button), "clicked", GTK_SIGNAL_FUNC (move_up_down_pattern_callback), (void *) -1); gtk_widget_show (up_button); down_button = gtk_button_new_with_label (_("Down")); gtk_box_pack_start (GTK_BOX (vbox2), down_button, FALSE, FALSE, 0); gtk_signal_connect (GTK_OBJECT (down_button), "clicked", GTK_SIGNAL_FUNC (move_up_down_pattern_callback), (void *) 1); gtk_widget_show (down_button); gtk_widget_show (vbox2); gtk_widget_show (alignment); gtk_widget_show (vbox); /* Pattern Editor */ peditor = player_filter_pattern_editor (); gtk_box_pack_end (GTK_BOX (page_hbox), peditor, TRUE, TRUE, 0); gtk_widget_show (page_hbox); player_filter_page_init (); } static int strings_are_same (const char *s1, const char *s2) { return ((!s1 || *s1 == '\0') && (!s2 || *s2 == '\0')) || (s1 && s2 && strcmp (s1, s2) == 0); } /* * 'FILTER_DATA_CHANGED' situations that are not catched by * player_pattern_lists_compare(): * * - string/substring mode: case change in pattern * - regexp mode: errorneous pattern is modified but * the error is not corrected */ static int player_pattern_lists_compare (GSList *list1, GSList *list2) { enum filter_status changed = FILTER_NOT_CHANGED; struct player_pattern *pp1, *pp2; GSList *tmp; if (g_slist_length (list1) != g_slist_length (list2)) return FILTER_CHANGED; while (list1) { pp1 = (struct player_pattern *) list1->data; pp2 = (struct player_pattern *) list2->data; if (pp1->mode == pp2->mode && pp1->groups == pp2->groups && strings_are_same (pp1->pattern, pp2->pattern)) { if (!strings_are_same (pp1->comment, pp2->comment)) changed = FILTER_DATA_CHANGED; list2 = list2->next; } else { changed = FILTER_DATA_CHANGED; for (tmp = list2->next; tmp; tmp = tmp->next) { pp2 = (struct player_pattern *) tmp->data; if (pp1->mode == pp2->mode && pp1->groups == pp2->groups && strings_are_same (pp1->pattern, pp2->pattern)) { break; } } if (!tmp) return FILTER_CHANGED; } list1 = list1->next; } return changed; } void player_filter_new_defaults (void) { struct player_pattern *pp; GSList *list; sync_pattern_data (); filters[FILTER_PLAYER].changed = player_pattern_lists_compare (players, curplrs); for (list = curplrs; list; list = list->next) { pp = (struct player_pattern *) list->data; pp->dirty = TRUE; } for (list = players; list; list = list->next) { pp = (struct player_pattern *) list->data; if (!pp->dirty) free_player_pattern (pp); } g_slist_free (players); players = curplrs; curplrs = NULL; switch (filters[FILTER_PLAYER].changed) { case FILTER_CHANGED: filters[FILTER_PLAYER].last_changed = filter_time_inc(); /* fall through */ case FILTER_DATA_CHANGED: player_filter_save_patterns (); break; case FILTER_NOT_CHANGED: default: break; } } void player_filter_cfg_clean_up (void) { struct player_pattern *pp; GSList *list; if (curplrs) { for (list = curplrs; list; list = list->next) { pp = (struct player_pattern *) list->data; if (pp->dirty) free_player_pattern (pp); } g_slist_free (curplrs); curplrs = NULL; } } int player_filter_add_player (char *name, unsigned mask) { GSList *list; struct player_pattern *pp; char *pattern; int changed = FALSE; pattern = strdup_strip (name); if (!pattern) return FALSE; for (list = players; list; list = list->next) { pp = (struct player_pattern *) list->data; if (pp->mode == PATTERN_MODE_STRING && pp->pattern && g_strcasecmp (pattern, pp->pattern) == 0) { break; } } if (!list) { pp = player_pattern_new (NULL); pp->pattern = pattern; pp->groups = 0; player_pattern_compile (pp); players = g_slist_append (players, pp); changed = TRUE; } mask &= PLAYER_GROUP_MASK; if ((pp->groups & mask) != mask) { pp->groups |= mask; filters[FILTER_PLAYER].last_changed = filter_time_inc(); player_filter_save_patterns (); changed = TRUE; } return changed; } static GScannerConfig patterns_scanner_config = { ( " \t\n" ) /* cset_skip_characters */, ( G_CSET_a_2_z "_" G_CSET_A_2_Z ) /* cset_identifier_first */, ( G_CSET_a_2_z "_0123456789" G_CSET_A_2_Z G_CSET_LATINS G_CSET_LATINC ) /* cset_identifier_nth */, ( "#\n" ) /* cpair_comment_single */, TRUE /* case_sensitive */, TRUE /* skip_comment_multi */, TRUE /* skip_comment_single */, FALSE /* scan_comment_multi */, TRUE /* scan_identifier */, FALSE /* scan_identifier_1char */, FALSE /* scan_identifier_NULL */, TRUE /* scan_symbols */, FALSE /* scan_binary */, FALSE /* scan_octal */, FALSE /* scan_float */, TRUE /* scan_hex */, FALSE /* scan_hex_dollar */, FALSE /* scan_string_sq */, TRUE /* scan_string_dq */, TRUE /* numbers_2_int */, FALSE /* int_2_float */, TRUE /* identifier_2_string */, TRUE /* char_2_token */, TRUE /* symbol_2_token */, }; static int skip_to_right_curly_bracket (GScanner *scanner) { int token; token = g_scanner_cur_token (scanner); while (1) { switch (token) { case G_TOKEN_EOF: case G_TOKEN_ERROR: return FALSE; case G_TOKEN_RIGHT_CURLY: return TRUE; } token = g_scanner_get_next_token (scanner); } } static int player_pattern_parse_statement (GScanner *scanner, char *fn) { struct player_pattern *pp; int token; token = g_scanner_get_next_token (scanner); switch (token) { case TOKEN_STRING: case TOKEN_SUBSTR: case TOKEN_REGEXP: pp = player_pattern_new (NULL); switch (token) { case TOKEN_REGEXP: pp->mode = PATTERN_MODE_REGEXP; break; case TOKEN_SUBSTR: pp->mode = PATTERN_MODE_SUBSTR; break; case TOKEN_STRING: default: pp->mode = PATTERN_MODE_STRING; break; } token = g_scanner_get_next_token (scanner); if (token != G_TOKEN_LEFT_CURLY) { free_player_pattern (pp); return skip_to_right_curly_bracket (scanner); } token = g_scanner_get_next_token (scanner); if (token != G_TOKEN_STRING) { free_player_pattern (pp); return skip_to_right_curly_bracket (scanner); } pp->pattern = strdup_strip (scanner->value.v_string); token = g_scanner_get_next_token (scanner); if (token != G_TOKEN_COMMA) { free_player_pattern (pp); return skip_to_right_curly_bracket (scanner); } token = g_scanner_get_next_token (scanner); if (token != G_TOKEN_INT) { free_player_pattern (pp); return skip_to_right_curly_bracket (scanner); } pp->groups = scanner->value.v_int & PLAYER_GROUP_MASK; token = g_scanner_get_next_token (scanner); if (token != G_TOKEN_COMMA) { free_player_pattern (pp); return skip_to_right_curly_bracket (scanner); } token = g_scanner_get_next_token (scanner); if (token != G_TOKEN_STRING) { free_player_pattern (pp); return skip_to_right_curly_bracket (scanner); } pp->comment = strdup_strip (scanner->value.v_string); token = g_scanner_get_next_token (scanner); if (token != G_TOKEN_RIGHT_CURLY) { free_player_pattern (pp); return skip_to_right_curly_bracket (scanner); } player_pattern_compile (pp); players = g_slist_append (players, pp); filters[FILTER_PLAYER].changed = FILTER_CHANGED; break; case G_TOKEN_EOF: return FALSE; default: fprintf (stderr, "%s[%d:%d] parse error\n\n", fn, scanner->line, scanner->position); return skip_to_right_curly_bracket (scanner); } return TRUE; } static void player_filter_load_patterns (void) { char *fn; int fd; GScanner *scanner; int retval; int i; fn = file_in_dir (user_rcdir, PLAYERS_FILE); fd = open (fn, O_RDONLY); if (fd < 0) { g_free (fn); return; } scanner = g_scanner_new (&patterns_scanner_config); for (i = TOKEN_STRING; i <= TOKEN_REGEXP; i++) { g_scanner_add_symbol (scanner, mode_symbols[i - TOKEN_STRING], GINT_TO_POINTER(i)); } g_scanner_input_file (scanner, fd); do { retval = player_pattern_parse_statement (scanner, fn); } while (retval); g_scanner_destroy (scanner); g_free (fn); close (fd); if (filters[FILTER_PLAYER].changed != FILTER_NOT_CHANGED) filters[FILTER_PLAYER].last_changed = filter_time_inc(); } static void player_filter_save_patterns (void) { GSList *list; struct player_pattern *pp; FILE *f; char *fn; fn = file_in_dir (user_rcdir, PLAYERS_FILE); if (!players) { unlink (fn); } else { f = fopen (fn, "w"); if (!f) { g_free (fn); return; } for (list = players; list; list = list->next) { pp = (struct player_pattern *) list->data; fprintf (f, "%s {\n ", mode_symbols[pp->mode]); print_dq_string (f, pp->pattern); fprintf (f, ",\n 0x%02X,\n ", pp->groups); print_dq_string (f, pp->comment); fprintf (f, "\n}\n\n"); } fclose (f); } g_free (fn); } void player_filter_init (void) { player_filter_done (); player_filter_load_patterns (); } void player_filter_done (void) { g_slist_foreach (players, (GFunc) free_player_pattern, NULL); g_slist_free (players); players = NULL; } xqf-1.0.5/src/flt-player.h0000644002404400000620000000314407520233650012253 00000000000000/* XQF - Quake server browser and launcher * Copyright (C) 1998-2000 Roman Pozlevich * * 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 */ #ifndef __FLT_PLAYER_H__ #define __FLT_PLAYER_H__ #include #include #include #include "xqf.h" #include "filter.h" /*For server_filter_vars */ enum pattern_mode { PATTERN_MODE_STRING = 0, PATTERN_MODE_SUBSTR = 1, PATTERN_MODE_REGEXP = 2 }; struct player_pattern { char *pattern; enum pattern_mode mode; unsigned groups; char *comment; char *error; void *data; int dirty; }; extern int player_filter (struct server *s); extern void player_filter_page (GtkWidget *notebook); extern void player_filter_new_defaults (void); extern void player_filter_cfg_clean_up (void); extern int player_filter_add_player (char *name, unsigned mask); extern void player_filter_init (void); extern void player_filter_done (void); #endif /* __FLT_PLAYER_H__ */ xqf-1.0.5/BUGS0000644002404400000620000000055707552706714007737 00000000000000Need to find a good format for this file. Would like to record who entered the bug, the date it was entered, who fixed it and when. ??/??/???? - If XQF queries a master server and it has no entries, it will wipe out the existing list for that master. - rcon for half-life is broken - In Player Filter, reported crashes. Up/Down buttons are plain whacky. (FIXED) xqf-1.0.5/NEWS0000644002404400000620000002443110523105166007732 00000000000000XQF 1.0.5 -- November 04, 2006 ~~~~~~~~~ Changes since 1.0.4: o new games: Warsow, Tremulous o fix Quake 4 RCON o add "Show only configured games" button again o fix SOF2 query o add new America's Army master server o support copying server info values to clipboard o fix build with newer GTK2 versions o don't pass -steam option to hl2 anymore o fix cursor navigation in server list o allow to also delete servers that are not in the Favorites list o split Half-Life support into old and new version o new Polish translation XQF 1.0.4 -- October 20, 2005 ~~~~~~~~~ Changes since 1.0.3: o new games: Nexuiz, Quake 4 o add Epic's second UT2004 master o new Finish translation o add q3a Excessive Plus gametypes o honor setting to ignore bots when copying server info to clipboard o add support for plugin scripts o support multiple sort modes per column XQF 1.0.3 -- April 03, 2005 ~~~~~~~~~ Changes since 1.0.2: o New games: Half-Life 2 (wine) o make all icons themeable o use GTK2 colors and Raleigh theme by default in GTK1 version o add --nomapscan command line parameter o fix ut2k4 and doom3 master query not working after starting xqf o fix saving of quake2 passwords o fix doom3 protocol detection o fix q1/qw/q2 skin list update o fix crashes in GTK2 version XQF 1.0.2 -- December 22, 2004 ~~~~~~~~~ Changes since 1.0: o New games: Netpanzer o Support for Gslist (http://aluigi.altervista.org/papers.htm#gslist) o Automatic detection of the Doom3 network protocol version o Check osmask of Doom3 servers and warn if the server has no Linux support o Configurable qstat source ip and port range for people with broken NAT o Country statistics for game servers o Additional Descent3 server listing o UT2004 Master support o xqf-rcon uses $XQF_RCON_PASSWORD for the rcon password if set o Requries qstat 2.7 XQF 1.0 -- August 15, 2004 ~~~~~~~ Changes since 0.9.14: o New games: Doom3, Jedi Academy (wine), America's Army 2.1 o Redial understands free private slots and won't connect to password protected servers if there is no password defined by the user o Support for the Half-Life steam master o Support for America's Army 2.1 o Export the variables XQF_SERVER_NAME, XQF_SERVER_MAP, XQF_SERVER_HOSTNAME and XQF_SERVER_GAME when launching a game o Custom arguments for RedOrchestra, Troopers, AlienSwarm UT2004 mods o Animated tray icon for the GTK2 version o Quake 3 gametypes for World of Padman o Copy/Copy+ also copies to the CLIPBOARD instead of only PRIMARY to allow paste via CTRL-v o Quick Filter on main screen to search in every server's name, hostname, map, game, gametype and rule value. o Requires qstat 2.6 XQF 0.9.14 -- March 21, 2004 ~~~~~~~~~~ Changes since 0.9.13: o New games: UT2004, Postal2, BF1942(wine). All without official master. o Improved --launch parameter, now only requires IP address and asks for type if needed. It's possible now to use this together with e.g. XChat. o Add --add parameter to just add a server to favorites o Fix LAN browsing o Add LAN masters by default o Support password on Savage servers o New server properties: Comment and "this server sucks" o Add exec function for hexenworld (anyone ever played that game?) o Switch to intltool for i18n o Install desktop files XQF 0.9.13 -- November 24, 2003 ~~~~~~~~~~ Changes since 0.9.12: o New games: America's Army, Savage, Medal of Honor, Call of Duty(wine) o New splash screen and desktop icons o GeoIP support allows filtering by country o Server side filtering for Half-Life o Updated Enemy Territory default protocol number o Quake III gametypes for TrueCombat 1.0 and Urban Terror 3 o Additional gametypes for some RTCW and ET mods o Added custom arguments for Death Ball and FragOps UT2003 mods o Detection of cheating-death on HalfLife servers o Added twilight to q1 and qw command suggestion o Display team of player for RTCW, ET and Q3 mods that provide the necessary information such as OSP and TrueCombat o Command line option --launch to automatically add a server to favorites, ping it and then launch the game o The environment variable XQF_SERVER_ANTICHEAT is now set before launching a game when the server requires some anti-cheat software. o Option to stop current song in XMMS when launching a game o Experimental GTK2 compilation support o New French translation XQF 0.9.12 -- June 10, 2003 ~~~~~~~~~~ Changes since 0.9.11: o Added Enemy Territory Support support o Added Serious Sam: The Second Encounter support o Map scan function for q1, qw, q2 and hl to verify that you have the map installed before connecting to the server o Ability to see level screenshot when clicking on the map column for jpg shots inside of PK3 files for Quake3 and Wolfenstein o XQF startup splash screen support using gdk-pixbuf o Allow filtering for map and server name o Fix high cpu load when dialogs are shown during launch phase o If more than 100 servers are to be updated, the screen is not immediately refreshed. This helps eliminate long delays with Half Life updates o Pass RCON password on command line when launching Half-Life o Minor memory leaks fixed o Added QuakeForge's HexenWorld master o Added Quake3 Western Q3 game type o Default custom args for Rocket Arena removed as 1.6 does not need them anymore o Now displays player team for Wolfenstein and Enemy Territory (skin column) o With Half Life, private clients now set based on reserve_slots variable o Display number of private clients in player column o Option to not count bots as players o Move server filter submenu to top level and remove rarely used buttons from toolbar o Added docs/PreLaunch.example o Hostname resolving now off by default o Automatically creates qstat config if required o gdk-pixbuf now required o New Danish translation o New French translation XQF 0.9.11 -- December 19, 2002 ~~~~~~~~~~ Changes since 0.9.10: o Serious Sam support (requires SMS gametype via ~/.qstatrc). Does not currently support any masters. o Fixed -game parameter for Half-Life o RTCW voteflags decoded in properties pane o Visual marker in the map column to show if you have the listed map installed on your computer. (Q3, RTCW, UT, Rune, UT2) XQF 0.9.10 -- November 16, 2002 ~~~~~~~~~~ Changes since 0.9.9: o File dialog boxes for adding game command line and directory o Greatly speed up the startup of XQF when loading large lists o Greatly speed up response time when applying filters to large lists o Ability to automatically set cl_punkbuster when connecting to a server in Q3A o Added Punkbuster icon to Priv column o Ability to define custom command-line arguments for a game based on the 'game' type o Q3A now searches for a matching mod directory. Should correctly launch even if mod directory is incorrect by case o Added sound disable support for Unreal based games o Can now hide games that are not configured o Changed default Quake3 protocol to 68 o Sound support for XQF events using external sound player o Busy server redial with reserved slots support o Soldier of Fortune 2 support (requires qstat sof2s gametype via ~/.qstatrc or qstat >2.5b) o Use correct parameters (-game,+connect,+password) when launching Half-Life o New master type of "file" to read IP addresses from a file o Unreal Tournament 2003 support o Fixed Half-Life rcon support o Player search visible improvements o Fixed Tribes2 master support and added additional masters o Updated QuakeWorld master list o Unlimited number of server filters instead of ten o Changed default Wolf protocol to 60 o Standalone rcon program that doesn't need X (xqf-rcon) o Quake3 launching now uses 'game' instead of 'gamename' to help prevent launch problems due to case o Various segfault fixes o XQF now requires qstat 2.5c XQF 0.9.9 -- July 3, 2002 ~~~~~~~~~ Changes since 0.9.8: o Added Voyager Elite Force support o Changed default Quake3 protocol to 67 o You can now select Quake3 and Wolfenstein's protocol o Added 20sec timeout for wget (nice if Gameaholic is down) o Added Tribes2 server statistics o Fixed Tribes2 and Quake3 masters o Added support for LAN broadcast queries o Improved master support handling o Added preferences tab for Quake3 memory settings o New Catalan translation XQF 0.9.8 -- December 17, 2001 ~~~~~~~~~ Changes since 0.9.7: o Repackaged with libtool 1.4, so it builds on all Linux architectures o Fixed trasparency of Gamespy's pixmap o Don't distribute debian stuff XQF 0.9.7 -- December 16, 2001 ~~~~~~~~~ Changes since 0.9.6g: o Support for games using the GameSpy protocol o Support for Descent3 with qstat 2.4e (please note Descent can't be launched from within XQF at the moment) o Support for Rune o Reorganization of settings dialogs o New gametypes for Quake3 mods Threewave and TribalCTF o Support for Wolfenstein retail (protocol 57) o Server statistics for Wolfenstein, Kingpin and Half-Life o Works on PowerPC again XQF 0.9.6g -- September 25, 2001 ~~~~~~~~~~ Changes since 0.9.6f: o Internationalization (gettext) support, Spanish and German translations o Initial Return to Castle Wolfenstein support o Tribes2 support o Support for Q3A protocol v66 o Added "Quake3" preferences page which allows the protocol version and other options to be changed o Added "General" preferences page, which hosts many of the options which were in "Appearance" previously o Added "game type" filter o New man page o New documentation in html format (docs/xqfdocs.html) o XQF now requires qstat 2.4c XQF 0.9.6f -- March 23, 2001 ~~~~~~~~~~ Changes since 0.9.5: o Multiple server filters; Filter name configurable and appears in the status bar o Lock Icon to show if server is private or not; icon next to number of players turns yellow if all of the public client spaces are full o Pressing "Insert" brings up the add server dialog; pressing SHIFT+Insert adds the currently selected server to ones favorites o Added support for new Team Arena Game types o Protocol 48 (1.27) Q3A servers get queried with protocol 48 in qstat o Execute "PreLaunch" script when launching game (for use with ICQ scripts, etc.) o Improved support for Half-Life servers o Improved support for Unreal Tournament o Improved support for Quake2 o Hack for supporting multiple Q3A protocols i.e. xqf can run different Q3A's depending on if it is a 1.17 or 1.27 server: see the README file o Q3A hack for connecting to arena servers so that all of the vm_* settings are correct on the command line o Resolved one major source of core dumps. It should be much more stable now xqf-1.0.5/TODO0000644002404400000620000000165010517742112007722 00000000000000If there is nothing interesting on TV: - clean TODO list - Configure option for home directory as well as global directory - update game types for Q3 mods - move to external file - Ability to delete servers from non-Favorites (really? -- ln) - Game specific filters. No use seeing a Lithium filter choice when looking at UT2003 servers - More general server filters so one can filter based on any server var. - Search for server like control f does for player - Ability to launch a game without connecting to a server - right click on game in source list - Launch - get rid of the switch for saving player info, make seperate functions for each game - Redial feature: User configurable options - make rcon window non-modal - display text why a server sucks in warning popop Jobs you can do if your holidays are boring: - dynamic dialogs using libglade - GTK2 - Multiple Favorites - parse text file(xml?) to fill struct games[] xqf-1.0.5/docs/0000777002404400000620000000000010523106504010240 500000000000000xqf-1.0.5/docs/xqfdocs.html0000644002404400000620000025756410523105364012537 00000000000000 XQF Documentation
XQF 1.0.5

November 04, 2006
Documentatiom written by:
Alex Burger <alex_b@users.sourceforge.net>

Documentation contributors:
Jordi Mallach <jordi@debian.org>
 

Table of Contents

  1. Table of Contents
  2. Overview
  3. System Requirements
  4. Downloading
  5. Change Log 
  6. Installation / Compiling
    1. Loki-Setup installer
    2. RPM Binary package
    3. DEB Binary package
    4. TAR.GZ source code
    5. CVS source code
  7. Using XQF
    1. Launching XQF
    2. Configuring XQF
    3. Game Specific Information
      1. Quake3
      2. Soldier of Fortune (1.06)
      3. Soldier of Fortune 2
      4. Unreal Tournament (436) and Rune
      5. Half-Life
      6. Descent 3
      7. Serious Sam
      8. Medal of Honor
      9. Call of Duty
      10. Savage
      11. Jedi Knight: Jedi Academy
  8.  Troubleshooting / FAQ
    1. Q: Do you know of any good web sites with technical information on playing games on Linux?
    2. Q: When I refresh or update a list, all servers come back with a ping of 'n/a'
    3. Q: QStat is installed, but when I refresh or update a list, all servers come back with a ping of 'n/a'
    4. Q:  When I try to launch XQF, I get 'command not found'
    5. Q:  I have added master0.gamespy.com to XQF, but I can not retreive any servers from that master
    6. Q:  I deleted one of the default master servers.  How do I get it back?
    7. Q: Why do LAN searches not find any servers?
    8. Q: I am behind a firewall / proxy server and can not retrieve http master lists
    9. Q: My game is not launching properly.  What do I do?
    10. Q: XQF sounds are not playing when XMMS or another sound program is running.  What do I do?
    11. Q: When updating server lists for Quake3, Wolfenstein or Enemy Territory, XQF only shows servers for an old version or the demo. What's wrong?
    12. Q: Can XQF integrate with any chat programs such as IRC or ICQ?
    13. Q: Will XQF be availble for Windows?
  9. XQF-Rcon

Overview

XQF is a 3D action game (such as Quake, sequels and derivatives) server browser. It uses X and is written using the GIMP Tool Kit.

XQF is a front-end to QStat, a program by Steve Jankowsk which is used to retrieve server info.

With  XQF you can search for the following games:

Quake
Quake World
Quake2
Quake3
Quake4
Return to Castle Wolfenstein
Enemy Territory
Doom3
Voyager Elite Force (wine)
Hexen2
HexenWorld
Sin
Half-Life (wine)
Half-Life 2 (wine)
Kingpin
Soldier of Fortune
Soldier of Fortune 2 (wine)
Tribes 2
Heretic 2
Unreal Tournament
Unreal Tournament 2003
Unreal Tournament 2004
Rune
Postal2
America's Army
Descent 3
Serious Sam: The First Encounter
Serious Sam: The Second Encounter
Tremulous
Medal of Honor: Allied Assault
Call of Duty (wine)
Savage
Battlefield 1942 (wine)
Jedi Knight: Jedi Academy (wine)
Netpanzer
Nexuiz
Warsow

Searching for games involves communicating with 'master servers' on the Internet which game servers advertise to on the Internet.  XQF can spawn your client into a selected server with customized options.  You can also apply filters while searching for servers, trimming full or empty servers, for example.

The program has been translated to the following languages: English, Spanish, German, Catalan, Danish and French.

Highlight of features:
  - Supports (unauthenticated) Gamespy style master servers using QStat 2.4a
  - Displays server rules and player info
  - Players and servers sorting
  - Favorite servers list
  - Simple filtering for servers
  - Player Filter (Buddy Lists)
  - Player name, color, skin and model selection
  - QuakeWorld skin visualization with coloring
  - Custom configs
  - Decodes and displays extended bit-field server flags (dmfalgs,
      teamplay, etc...)
  - Remote server administration tool (rcon) for QuakeWorld, HexenWorld,
      Quake2, Quake3, Quake4, RTCW, Enemy Territory, Doom3, Half-Life, Sin, Kingpin, Heretic2 servers 
  - Busy server redial

 

System Requirements

The minimum system requirements are:

  • A Computer with Linux or similar operating system running X
  • QSTAT 2.11 (latest version recommended to ensure full functionality, RPM available from XQF hompage)
  • GTK+ 1.2.x
  • gdk-pixbuf
  • wget to retrieve html server listings from the Web
  • optionally gslist if you want to access the Gamespy master. See below for instructions.

XQF has been tested as is known to run on Intel / AMD and PowerPC platforms.
 

Downloading

XQF can be downloaded as a pre-compiled binary for some distributions, or as source code. The source code can be downloaded as either a .tar.gz file, or via CVS.  See the file section of http://www.linuxgames.com/xqf for downloading instructions.

Change Log 

XQF 1.0.5 -- November 04, 2006
  • new games: Warsow, Tremulous
  • fix Quake 4 RCON
  • add "Show only configured games" button again
  • fix SOF2 query
  • add new America's Army master server
  • support copying server info values to clipboard
  • fix build with newer GTK2 versions
  • don't pass -steam option to hl2 anymore
  • fix cursor navigation in server list
  • allow to also delete servers that are not in the Favorites list
  • split Half-Life support into old and new version
  • new Polish translation
XQF 1.0.4 -- October 20, 2005
  • New games: new games: Nexuiz, Quake 4
  • add Epic's second UT2004 master
  • new Finish translation
  • add q3a Excessive Plus gametypes
  • honor setting to ignore bots when copying server info to clipboard
  • add support for plugin scripts
  • support multiple sort modes per column 
XQF 1.0.3 -- April 03, 2005
  • New games:  Half-Life 2 (wine)
  • make all icons themeable
  • use GTK2 colors and Raleigh theme by default in GTK1 version
  • add --nomapscan command line parameter
  • fix ut2k4 and doom3 master query not working after starting xqf
  • fix saving of quake2 passwords
  • fix doom3 protocol detection
  • fix q1/qw/q2 skin list update
  • fix crashes in GTK2 version
XQF 1.0.2 -- December 22, 2004
  • New games: Netpanzer
  • Support for Gslist (http://aluigi.altervista.org/papers.htm#gslist)
  • Automatic detection of the Doom3 network protocol version
  • Check osmask of Doom3 servers and warn if the server has no Linux support
  • Configurable qstat source ip and port range for people with broken NAT
  • Contry statistics for game servers
  • Additional Descent3 server listing
  • UT2004 Master support (requires qstat 2.7)
  • xqf-rcon uses $XQF_RCON_PASSWORD for the rcon password if set
  • Various bugfixes as usual
XQF 1.0 -- August 15, 2004
  • New games: Doom3, Jedi Academy (wine), America's Army 2.1
  • Redial also when only private slots are free and no password is set
  • Support for the Half-Life steam master
  • Support for America's Army 2.1
  • Export the variables XQF_SERVER_NAME, XQF_SERVER_MAP, XQF_SERVER_HOSTNAME
    and XQF_SERVER_GAME when launching a game
  • Custom arguments for RedOrchestra, Troopers, AlienSwarm UT2004 mods
  • Animated tray icon for the GTK2 version
  • Quake 3 gametypes for World of Padman
  • Also copy to CLIPBOARD instead of only PRIMARY to allow paste via CTRL-v
  • Quick Filter
  • Requires qstat 2.6
XQF 0.9.14 -- March 21, 2004
  • New games: UT2004, Postal2, BF1942(wine). All without official master.
  • Improved --launch parameter, now only requires IP address and asks for type if needed. It's possible now to use this together with e.g. XChat.
  • Add --add parameter to just add a server to favorites
  • Fix LAN browsing
  • Add LAN masters by default
  • Support password on Savage servers
  • New server properties: Comment and "this server sucks"
  • Add exec function for hexenworld (anyone ever played that game?)
  • Switch to intltool for i18n
  • Install desktop files
XQF 0.9.13 -- November 24, 2003
  • New games: America's Army, Savage, Medal of Honor, Call of Duty(wine)
  • New splash screen and desktop icons
  • GeoIP support allows filtering by country
  • Server side filtering for Half-Life
  • Updated Enemy Territory default protocol number
  • Quake III gametypes for TrueCombat 1.0 and Urban Terror 3
  • Additional gametypes for some RTCW and ET mods
  • Added custom arguments for Death Ball and FragOps UT2003 mods
  • Detection of cheating-death on HalfLife servers
  • Added twilight to q1 and qw command suggestion
  • Display team of player for RTCW, ET and Q3 mods that provide the necessary information such as OSP and TrueCombat
  • Command line option --launch to automatically add a server to favorites, ping it and then launch the game
  • The environment variable XQF_SERVER_ANTICHEAT is now set before launching a game when the server requires some anti-cheat software.
  • Option to stop current song in XMMS when launching a game
  • Experimental GTK2 compilation support
  • New French translation
XQF 0.9.12 -- June 10, 2003
  • Added Enemy Territory Support support
  • Added Serious Sam: The Second Encounter support
  • Map scan function for q1, qw, q2 and hl tverify that you have the map installed before connecting tthe server
  • Ability tsee level screenshot when clicking on the map column for jpg shots inside of PK3 files for Quake3 and Wolfenstein
  • XQF startup splash screen support using gdk-pixbuf
  • Allow filtering for map and server name
  • Fix high cpu load when dialogs are shown during launch phase
  • If more than 100 servers are to be updated, the screen is not immediately refreshed.  This helps eliminate long delays with Half Life updates
  • Pass RCON password on command line when launching Half-Life
  • Minor memory leaks fixed
  • Added QuakeForge's HexenWorld master
  • Added Quake3 Western Q3 game type
  • Default custom args for Rocket Arena removed as 1.6 does not need them anymore
  • Now displays player team for Wolfenstein and Enemy Territory (skin column)
  • With Half Life, private clients now set based on reserve_slots variable
  • Display number of private clients in player column
  • Option tnot count bots as players
  • Move server filter submenu ttop level and remove rarely used buttons from toolbar
  • Added docs/PreLaunch.example
  • Hostname resolving now off by default
  • Automatically creates qstat config if required
  • gdk-pixbuf now required
  • New Danish translation
  • New French translation
XQF 0.9.11 -- December 18, 2002
  • Serious Sam support (requires SMS gametype via ~/.qstatrc).  Does not currently support any masters.
  • Fixed -game parameter for Half-Life
  • RTCW voteflags decoded in properties pane
  • Visual marker in Map column to show if you have the listed map installed on your comptuer. (Q3, RTCW, UT, Rune, UT2)
XQF 0.9.10 -- November 16, 2002
  • File dialog boxes for adding game command line and directory
  • Greatly speed up the startup of XQF when loading large lists
  • Greatly speed up response time when applying filters to large lists
  • Ability to automatically set cl_punkbuster when connecting to a server in Q3A
  • Added Punkbuster icon to Priv column
  • Ability to define custom command-line arguments for a game based on the 'game type
  • Q3A now searches for a matching mod directory.  Should correctly launch even if mod directory is incorrect by case
  • Added sound disable support for Unreal based games
  • Can now hide games that are not configured
  • Changed default Quake3 protocol to 68
  • Sound support for XQF events using external sound player
  • Busy server redial with reserved slots support
  • Soldier of Fortune 2 support (requires qstat sof2s gametype via ~/.qstatrc or qstat >2.5b)
  • Use correct parameters (-game,+connect,+password) when launching Half-Life
  • New master type of "file" to read IP addresses from a file
  • Unreal Tournament 2003 support
  • Fixed Half-Life rcon support
  • Player search visible improvements
  • Fixed Tribes2 master support and added additional masters
  • Updated QuakeWorld master list
  • Unlimited number of server filters instead of ten
  • Changed default Wolf protocol to 60
  • Standalone rcon program that doesn't need X (xqf-rcon)
  • Quake3 launching now uses 'game' instead of 'gamename' to help prevent launch problems due to case
  • Various segfault fixes
  • XQF now requires qstat 2.5c
XQF 0.9.9 -- July 3, 2002
  • Added Voyager Elite Force support
  • Changed default Quake3 protocol to 67
  • You can now select Quake3 and Wolfenstein's protocol
  • Added 20sec timeout for wget (nice if Gameaholic is down)
  • Added Tribes2 server statistics
  • Fixed Tribes2 and Quake3 masters
  • Added support for LAN broadcast queries
  • Improved master support handling
  • Added preferences tab for Quake3 memory settings
  • New Catalan translation
XQF 0.9.8 -- December 17, 2001
  • Repackaged with libtool 1.4, so it builds on all Linux architectures
  • Fixed trasparency of Gamespy's pixmap
  • Don't distribute debian stuff
XQF 0.9.7 -- December 16, 2001
  • Support for games using the GameSpy protocol
  • Support for Descent3 with qstat 2.4e (please note Descent can't be launched from within XQF at the moment)
  • Support for Rune
  • Reorganization of settings dialogs
  • New gametypes for Quake3 mods Threewave and TribalCTF
  • Support for Wolfenstein retail (protocol 57)
  • Server statistics for Wolfenstein, Kingpin and Half-Life
  • Works on PowerPC again
XQF 0.9.6g -- September 25, 2001
  • Internationalization (gettext) support, Spanish and German translations
  • Initial Return to Castle Wolfenstein support
  • Tribes2 support
  • Support for Q3A protocol v66
  • Added "Quake3" preferences page which allows the protocol version and other options to be changed
  • Added "General" preferences page, which hosts many of the options which were in "Appearance" previously
  • Added "game type" filter
  • New man page
  • New documentation in html format (docs/xqfdocs.html)
  • XQF now requires qstat 2.4c
XQF 0.9.6f -- March 23, 2001
  • Multiple server filters; Filter name configurable and appears in the status bar
  • Lock Icon to show if server is private or not; icon next to number of players turns yellow if all of the public client spaces are full
  • Pressing "Insert" brings up the add server dialog; pressing SHIFT+Insert adds the currently selected server to ones favorites
  • Added support for new Team Arena Game types
  • Protocol 48 (1.27) Q3A servers get queried with protocol 48 in qstat
  • Execute "PreLaunch" script when launching game (for use with ICQ scripts, etc.)
  • Improved support for Half-Life servers
  • Improved support for Unreal Tournament
  • Improved support for Quake2
  • Hack for supporting multiple Q3A protocols i.e. xqf can run different Q3A's depending on if it is a 1.17 or 1.27 server: see the README file
  • Q3A hack for connecting to arena servers so that all of the vm_* settings are correct on the command line
  • Resolved one major source of core dumps. It should be much more stable now

Installation / Compiling

Loki-Setup installer

Execute the commands (substitute xxx with the actual version number):

chmod 755 xqf-xxx.x86.run
./
xqf-xxx.x86.run

The installer alreay includes suitable versions of qstat and GeoIP. You still need to install the gdk-pixbuf package provided by your distribution. The installer itself additionally depends on libxml1 and libglade.

RPM Binary package

As root, execute the command (substitute xxx with the actual version number):

rpm -Uvh xqf.xxx.i586.rpm

The RPM package depends on qstat, GeoIP and gdk-pixbuf. The latter is usually provided by your distribution whereas qstat and GeoIP packages can be downloaded from the XQF home page.

DEB Binary package

As root, execute the command (substitute xxx with the actual version number):

dpkg -i xqf_xxx-v_arch.deb

TAR.GZ source code

Make sure you have the development packages of GTK, gdk-pixbuf, GLIB and X installed.

Extract the source code (substitute xxx with the actual version number):

tar xvfz xqf-xxx.tar.gz

cd into the directory:

cd xqf-*

Run configure script:

./configure

Compile source code:

make

Install compiled binary and man page (this step may require root privileges):

make install

The default location for XQF is /usr/local/bin.

You can optionally compile XQF with support for GeoIP (http://www.maxmind.com/download/geoip/api/c/).

CVS source code

Compiling CVS snapshots requires that you have recent versions of automake (at least 1.6), autoconf, libtool and gettext installed. You also need to have both GTK1 and GTK2 development packages installed.

Create the 'configure' script:

./autogen.sh

Run configure script:

./configure

Compile source code:

make

Install compiled binary and man page (this step must be done as root):

make install

The default location for XQF is /usr/local/bin.

Using XQF

Launching XQF


The first time you launch XQF, it will attempt to search for games in your path.  If any are found, it will automatically configure the command line for the game and attempt to configure the game directory based on the command line found.  This should work with most native games. Wine games need to be configured manually.

If no games are found, the Source list will show ALL supported games.  If XQF finds one or more supported games, it will only show CONFIGURED games in the Source column.  See the Preferences / Appearance menu documentation for more information.

 XQF accepts several command line parameters:
  • --launch "[SERVERTYPE] IP":  adds the server specified with IP (e.g. 10.10.0.1:27666) to the favorites, queries it and launches the game. XQF tries to automatically determine the correct game based on the port. If the autodetections fails XQF will ask you for the game. Alternatively you may directly specify the game type on the command line (e.g. Q3S).
  • --add    "[SERVERTYPE] IP": adds the specified server to the favories and queries it. Basically the same as --launch except that the game is not launched ;-)
  • --debug <level>:  set the specified debug level. Use this if you experience problems with XQF. Level 3 is usually sufficient for debugging most problems. Higher levels product lots of output.
  • --version: prints the version of XQF.

XQF is normally installed into /usr/local/bin.  If /usr/local/bin is not in your path, launch xqf with:

/usr/local/bin/xqf

You can also add the directory to your path, or simply make a symbolic link in /usr/bin.  For example, as root:

ln -s /usr/local/bin/xqf /usr/bin/xqf

XQF can be customized via GTK's rc files.  XQF parses $HOME/.qf/gtkrc in addition to the built in defaults of GTK.
 

Configuring XQF


Please see the Menu Bar / Preferences section for a description of the Preferences menu items.

Toolbar:

Update, Refresh, Refresh Selected, Stop, Connect, Observe, Record S Filter, P Filter, SF Cfg, PF Cfg

Update:

See 'View - Update from Master'
Refresh:
See 'View - Refresh'
Refresh Selected:
See 'View - Refresh Selected'
Stop:
Abort the current task
Connect:
See 'Server - Connect'
Observe:
See 'Server - Observer'
Record:
See 'Server - Record Demo'
S Filter:
Enable the currently selected Server filter
P Filter:
Enable the currently selected Player filter
Window Panes:
 
Left pane:  Source
Top pane:  Server list
Middle bottom pane:  Player list
Bottom right pane:  Server info

While in the Server pane:

  • Left double-click launches game on selected server.
  • Right click pops up server option menu.
  • Middle click selects one server and refreshes its information.
  • Clicking on a map name for Quake3 based games (Wolfenstein etc) will bring up a map screen shot if it exists in the .PK3 file.  Otherwise an 'X' will appear.
  • The Map column will show red -- if the map has not been detected on your computer.  Works with Q3, RTCW, UT, Rune and UT2.
  • The Players column will show the number of private clients reserved on the server in brackets ().  Example: 5/14(-2) is 5 players out of 14 with 2 reserved.
While in the Server, Player or Server info pane:
  • Clicking on a column name causes the list to be re-sorted
Bottom status bar:
 
Left bar: Current XQF activity
Middle bar: Filter information
Right bar: Moving activity bar
Menu bar:

File, Edit, View, Server, Preferences

File:

Statistics:
Servers tab:

Display server statistics for all games such as number of servers, # up, times on, # down, # info not available, # of players

O/S tab:

Quake2, Quake3, Wolfenstein, Kingpin and Half-Life server statistics based on CPU/architecture and operating system


Exit:

Exit / quit XQF


Edit:
 

Add new Server:
Add a new server to the Favorites list
Add to Favorites:
Add the currently selected server(s) to the Favorites list
Remove from Favorites:
Delete server entry from Favorites list.  This is only available when viewing the Favorites list.
Copy:
Copy basic server information to clip board:

ip:port

Example:

24.101.93.126:27912

Copy+:
Copy more detailed server information to clip board:

ping ip:port name map curplayers maxplayers

Example:

0 24.101.93.126:27912 Toronto_NH_BatCave q2dm2 0 of 5

Add Default Masters:

Adds all the default masters that would normally appear when XQF is run for the very first time. Use this if new masters have been added to XQF, or you accidentally deleted a master.

Add Master:
Add a master server to the 'Source' pane.

Enter the name of the master server, the type of game, and the master server address. XQF supports the following types of master servers in the address field:

master://

Considered a standard master server. When XQF calls QSTAT, it will use use QSTAT's standard master support. For example, Quake2 would use the qstat option '-q2m'

Example:

master://q2master.planetquake.com

gmaster://
When XQF calls QSTAT, it will use the '-gps' option to query 'Gamespy' style master servers. This will not allow you to query master servers at gamespy.com, as they use an key to only allow Gamespy users to use their master servers.

Unreal Tournament uses this type of master server protocol, but does not require the key.

Example:

gmaster://unreal.epicgames.com

http://
Parses html pages for server listings. Common in Quake1, Quake2, Kingpin and Heretic II.

Example:

http://www.gameaholic.com/servers/qspy-heretic2
 

lan://
Issues a broadcast search for servers in your LAN. This does not work with all games. UT and Rune use the Gamespy protocol for LAN queries and will therefore be listed under "Generic Gamespy".

Example:

lan://255.255.255.255
 

file://

Parses a list of servers from a local text file that is in the html master format.

Example:

file://~/quake3-servers
file:///home/alex/quake3-servers

Sample text file:

61.139.69.204:27960
68.41.236.152:27960
213.40.130.42:27961
Note:  Not specifying a prefix will default to master://

gslist://

This protocol type is used for querying the Gamespy master server using the 'gslist' program. You need to run gslist -u to fetch the list of supported games before you can actually use it. The URL accepts options separated by semicolon:
  • gsmtype: the gamespy name of the game to query. This parameter is mandatory. See ~/.gslist/gslist.cfg for a list of valid names.
  • portadjust (optional): integer value to add to the port number before adding the server to XQF. Useful if the native query protocol has a fixed port offset.

Example:

gslist://master.gamespy.com;portadjust=-1;gsmtype=rune

Rename Master:
Allow you to change the name of the master.  You can not modify the address or game type.
Delete Master:
Removes a master from the Source list
Find Player:
Search for a player by name using an exact match string, sub string or regular expression.
Find Again:
Find the next player that matches the previously defined search string.
Properties:
Displays the following server properties:
  • IP address
  • game port
  • host name (if available)
  • date and time of last refresh
  • number of reserved slots (see below)
  • sources - what master(s) the server is listed in
  • custom cfg (see below)
  • server password (if supported for this game)
  • spectator password (if supported for this game)
  • RCon password (if supported for this game)

Number of reserved slots is used by the redial feature to determine how many free slots must be free on a server before it attempts to connect.  For example, if the reserved slots are set to 2 and there are a max of 8 players in the game, there must be 3 free slots avabilabe (5/8 players in the game) for it to launch the game.

Server, spectator and RCon password allow you to set the password for that particular server so you will not be prompted when connecting.  The password is stored in the configuration file (~/.qf/config).  The selected game determines which of these options are available.

For custom cfg, enter a custom configuration file to be executed when the game starts.  For example:  custom2.cfg.  If you have specified a custom configuration file for the game in Preferences / Games, they will both be executed.
View:
Refresh:
Refresh (ping) all servers for the current game / source.  Note:  If more than 100 servers are to be updated, the screen is not immediately refreshed.  This helps eliminate long delays when a large number of serves is being updated / refreshed.
Refresh selected:
Refresh (ping) all servers for the currently selected / highlighted servers.  Note:  If more than 100 servers are to be updated, the screen is not immediately refreshed.  This helps eliminate long delays when a large number of serves is being updated / refreshed.
Update from Master:
Fetch the latest list of servers from the master server.  Note:  If more than 100 servers are to be updated, the screen is not immediately refreshed.  This helps eliminate long delays when a large number of serves is being updated / refreshed.
Show host names:
Configure XQF to attempt to convert IP addresses to host names.  Also available in Preferences menu.
Show default port:
Configure XQF to display the port next to the IP address if it is considered the default port for the game.  Also available in the Preferences menu. 

For example:

When on, a Quake2 server on port 27910 would be displayed as:

quake2.somedomain.com:27910

When off, a Quake2 server on port 27910 would be displayed as:

quake2.somedomain.com

Server:
Server Filters:
Select a custom filter.  The bottom status bar will update showing your selection.  The filter is not activated until you click the 'S Filter' button on the tool bar.
Connect:
Connect to selected server.

The server is 'pinged / refreshed' before the connection is attempted.  If the server is found to be down, you will be warned before the game is launched.

If the game is busy (no free player slots) you can choose to Launch anyways, Cancel or Redial.  When redialing, XQF will refresh the server every 5 seconds until a free slot is available.  For servers that reserve slots for administrators, you can define the number of free slots by right clicking on the server and entering the number of reserved slots.

If the server has a password set, a password prompt will appear.

Observe:
Launches the game in observer / spectator mode. Only effective for some games.
Record Demo:
Launches game with +record option. Only works in Quake1, Quake2 and Quake3.
Add new Server:
Add a new server to the list.
Add to Favorites:
Add the currently selected server(s) to the Favorites list.
Remove from Favorites:
Delete server entry from Favorites list.
DNS Lookup:
Attempt to convert IP addresses to host names of the selected servers.
RCON:
Remote Console to Quake2 servers. Will be prompted for rcon password.
Properties:
See Edit / Properties
Preferences:
General:
On Startup
Refresh Favorites:

Refresh / ping servers in Favorites when XQF starts

Show splash screen:

Show the splash screen if it exists when XQF starts.  File should be in $datadir/xqf/pixmaps/xqflogo.png (usually /usr/share/xqf/pixmaps).

Scan for Maps:

Scans your game directories for maps you have installed for the following games:

  • Quake
  • Quake World
  • Quake2
  • Quake3
  • Return to Castle Wolfenstein
  • Enemy Territory
  • Medal of Honor
  • Call of Duty
  • Jedi Knight: Jedi Academy
  • Half-Life
  • Unreal Tournament
  • Unreal Tournament 2003
  • Unreal Tournament 2004
  • Rune
The Game column will contain a red -- before the game name if you do not have the map installed on your computer. For some games a small preview window with a picture of the map is also shown when clicking the map column

Note:  This will increase the time it takes for XQF to launch and you will notice a lot of disk activity during startup.

To re-scan for maps, click the 'scan now' button.
On Exit
Save Server lists:

Save list of servers when you quit XQF.  Recommended if you have a slow connection

Save server information:

Save server information such as map name, game type, flags etc when you quit XQF. Recommended if you have a slow connection

Save player information:

Save list of players and scores when you quit XQF.

When Launching a Game
Terminate XQF:

Quit XQF when you launch a game. Not normally necessary unless you areextremely low on RAM

Create Launchinfo.txt:

A Launchinfo.txt file will be created in the (home directory)/.qf directory. This can be used by external programs such as IRC scripts that notify other people in IRC that you are playing a game.  Usually used in combination with 'Execute prelaunch'.  Saves the same information as Copy+ does:

ping ip:port name map curplayers maxplayers

Iconify XQF window:

Iconify / minimize the XQF window when you launch a game.

Execute prelaunch:

A file (if exists) PreLaunch will be launched / executed from the (home directory)/.qf directory before launching the game. This can be used by external programs such as IRC scripts that notify other people in IRC that you are playing a game. Two arguments are passed, the qstat type name (e.g. Q3S) and the address of the server (e.g. 10.0.0.1:27960). Also Useful in combination with 'Create Launchinfo.txt'.

A sample PreLaunch script is included in the XQF source in the docs folder..

Games
For each game supported by XQF there are one or more configuration tabs.  

Following are the common options for all games.

Invoking:

Command Line:
Command to execute the game

Example with game in your path: quake2

Example with game not in your path: /usr/bin/quake2

Note: If the command you enter is in your path, it will be expanded to the full path when you click OK, if you press &ltenter> inside the text box, or you click on the Guess button.

The Suggest button will search for the game in the search path and if found, will populate the command line. This should work with Quake1, QuakeWorld, Quake2, Quake3, Return to Castle Wolfenstein, Soldier of Fortune, Descent3, Tribes 2, Unreal Tournament 1 / 2003 and Rune.

Working directory:
Directory to run the game from

Example: /games/quake2

The Guess button will try to determine the correct directory for the game. This is done by using the following rules:

  • If Command Line is a symbolic link, use path of the directory of the file it is linked to

  • If Command Line is NOT a symbolic link, use path of the defined Command Line


For example:
  • quake2 is in your path and is a sym link to /games/quake2/quake2 would result in /games/quake2/

  • /usr/bin/quake2 sym linked to /games/quake2/quake2 would result in /games/quake2/

  • /games/quake2/quake2 (not a sym link) would result in /games/quake2/

Note: If the Command Line does not contain a path and is not in your search path, or a symbolic link contains any '..'s (such as ../../games/quake2) then nothing is returned.

Disable sound:
Disable sound if the game supports the option on the command line. For example, Quake2 would be called with the

+nosound switch
Disable CD audio:
Disable cd audio if the game supports the option on the command line. For example, Quake2 would be called with the

+nocd switch

Following are the game specific options:

Quake

Invoking:
Custom CFG:
Enter a custom configuration file to be executed when the game starts.  For example:  custom.cfg
Player Profile
Enter your player name. Can also define your player's colour, skin or model
QuakeWorld
Weapons
The highest weapon that Quake should switch to
upon a weapon pickup:
Choose the highest weapon that Quake should switch to when you pick up a new weapon. Passed to Quakeworld as the 'setinfo w_switch x' switch
upon a backpack pickup:
Choose the highest weapon that Quake should switch to when you pick up a backpack. Passed to Quakeworld as the 'setinfo b_switch x' switch
Disable auto-aiming:
Disable automatic aiming

This is passed to Quakeworld as the 'noaim' switch.

Options:
Skins:
Use skins:

Allow skins to be used during the game.

Don't use skins:

Disable skins.  This is passed to Quakeworld as the 'noskins' switch.

Don't download new skins:

QuakeWorld and Quake2 can automatically download skins from servers you play on if you donot already have the skins on your computer.  This options disables the downloading of skins.

Rate:
This controls network packets so that your connection bandwidth does not get saturated.  Lowering the number reduces the number of packets sent / received.  Slower connections should use a lower rate setting.

Default is 2500.

This is passed to Quakeworld/Quake2 as the 'noaim' switch.

Pushlatency:
Do not set (use game default)
Use whatever the Quakeworld default is
Automatically calculate from server ping time
Use the following formula to determine pushlatency setting.

If ping is <= 0, set to 10 (minimum)

If ping is >= 2000, set to 1000 (maximum)

Otherwise, set to (((ping / 2) +9 ) / 10 ) * 10

This is passed to Quakeworld as the 'pushlatency' switch.

Fixed value
Enter a value to be passed to Quakeworld
Troubleshooting: special options for those who know what they mean ;-)

                    Disable delta-compression (cl_nodelta)
                    Disable player/entity prediction (cl_predict_players)

Player Profile:
Name
Enter your player name. Can also define your player's team, skin and colors.  Uses pictures from your Quake directory.
Quake2

Invoking:
Custom CFG:
Enter a custom configuration file to be executed when the game starts.  For example:  custom.cfg
Options:
Skins:                   
Use skins:

Allow skins to be used during the game.

Don't use skins:

Disable skins.  This is passed to Quakeworld as the 'noskins' switch.

Don't download new skins:

QuakeWorld and Quake2 can automatically download skins from servers you play on if you donot already have the skins on your computer.  This options disables the downloading of skins.

Rate:
This controls network packets so that your connection bandwidth does not get saturated.  Lowering the number reduces the number of packets sent / received.  Slower connections should use a lower rate setting.

Default is 2500.

This is passed to Quakeworld/Quake2 as the 'noaim' switch.

Troubleshooting: special options for those who know what they mean ;-)

                    Disable delta-compression (cl_nodelta)                     
                    Disable player/entity prediction (cl_predict_players)

Player Profile:
Name
Enter your player name


Model / Skin

Define your player's model and skin.  Uses pictures from your Quake2 directory.
Quake3: Arena

Invoking:
Custom CFG:

Enter a custom configuration file to be executed when the game starts.  For example:  custom.cfg
Custom Args:
Custom command line arguments can be defined for any game type based on the Game column.

Some game modifications (mods) require special command line options for the game to start correctly.  An example is Rocket Arena.  For Rocket Arena to launch correctly, the vm_game, vm_cgame and vm_ui variables must be set to 0.  Note: Rocket Arena 1.6 and higher does not require custom args.

To create a new argument, click New and enter the name of the game that appears in the game column (example: arena), and in the second box enter the arguments separated by spaces (example: +set vm_game 0 +set vm_cgame 0 +set vm_ui 0).  Click Add / Update to insert into the list.

There can only be one definition for each unique game at one.  Case is ignored for the game name.

Clicking 'Add Defaults' will add any default arguments that are included with XQF.

Options:
Master server protocol version:
Passes the defined protocol version to QSTAT when finding servers.  Each patch for Quake3 usually changes this value.

This is passed to QSTAT as -q3m,## where ## is the protocol version.  Defaults to 68 (v1.32).

vm_cgame_fix:
Sets command line options to make Quake3 prefer QVM to shared objects (.so).  This should only be required if there are .so files from an older release floating around in baseq3.
Rocketarena fix:
Sets command line options to make Quake3 prefer shared objects (.so) to QVM.  Rocket Arena uses shared objects.  Only affects Rocket Arena (game type of arena).
set fs_game on connect:
XQF will pass the game directory the server is using on the command line to ensure the game launches and connects properly.
set cl_punkbuster on connect:
Sets command line options to ensure cl_punkbuster is set to 1 if the server has it enabled (server punkbuster variable)
Memory
Pass memory settings on command line:
Enable or disable the passing of the memory options specified below
com_hunkmegs, com_zonemegs, com_soundmegs, cg_precacheddmodels:
Allow you to set the values passed for each of the above variables.
Preset values:
Click a button to set the memory options based on the amount of memory you have, or the defaults.
Wolfenstein
Options:
Master server protocol version:
Passes the defined protocol version to QSTAT when finding servers.  Each patch for Wolfenstein usually changes this value.

This is passed to QSTAT as -q3m,## where ## is the protocol version.  Defaults to 60 (v1.4)

set fs_game on connect:
XQF will pass the game directory the server is using on the command line to ensure the game launches and connects properly.
Enemy Territory
Options:
Master server protocol version:
Passes the defined protocol version to QSTAT when finding servers.  Each patch for Enemy Territory usually changes this value.

This is passed to QSTAT as -q3m,## where ## is the protocol version.  Defaults to 82 (v2.55)

set fs_game on connect:
XQF will pass the game directory the server is using on the command line to ensure the game launches and connects properly.

Voyager Elite Force
Options:
Master server protocol version:
Passes the defined protocol version to QSTAT when finding servers.  Each patch for Voyager Elite Force usually changes this value.

This is passed to QSTAT as -q3m,## where ## is the protocol version.  Defaults to 24.

set fs_game on connect:
XQF will pass the game directory the server is using on the command line to ensure the game launches and connects properly
Tribes 2 - Player Profile:
Login Name:
Login name to use to log into Tribes 2.  If present, it will be passed on the command line.  To prevent a password prompt, you must save your password inside of Tribes 2.

Unreal / UT / UT 2003
Custom Args:
Custom command line arguments can be defined for any game type based on the Game column.

Some game modifications (mods) require special command line options for the game to start correctly.

To create a new argument, click New and enter the name of the game that appears in the game column, and in the second box enter the arguments separated by spaces.  Click Add / Update to insert into the list.

There can only be one definition for each unique game at one.  Case is ignored for the game name.

Clicking 'Add Defaults' will add any default arguments that are included with XQF.

See the Quake3 section above for an example.
Appearance
Server List:
Show host names:
Attempt to convert IP addresses to host names.
Show default port:
Configure XQF to display the port next to the IP address if it is considered the default port for the game.  Also available in the Preferences menu.

For example

When on, a Quake2 server on port 27910 would be displayed as:

quake2.somedomain.com:27910

When off, a Quake2 server on port 27910 would be displayed as:

quake2.somedomain.com

Do not count bots as players:
Prevents users with 0 ping as being reported as a player for the 'Players' column.  This will not be 100% accurate as users running non-dedicated servers normally have a 0 ping.
Sort servers real-time during refresh:
Sort servers names while refreshing the list.
Refresh on Update:
Automatically refresh server list after updating list of servers.
Show only configured games:
If enabled, will only show games in the Source column that have a command line configured.  
Toolbar:
Icons / Text / Both
Show top toolbar as icons, text or icons/text
Tooltips:
Enable or disable tooltips. Gives a description of a button when you hold the mouse pointer over it for a couple seconds
Qstat:
Qstat Options:
 
Number of simultaneous servers to query
How many servers QSTAT should query at once. This number is passed to QSTAT as the -maxsim switch.  Defaults to 20.  Increase if you have a high speed connection, lower it if xqf reports bad ping times.
Number of retries
Number of times QSTAT should retry a server if it doesn't reply to status queries. This number is passed to QSTAT as the -retry switch.  Defaults to 3

Sounds: 
Sound Enable / Disable  
Enable Sound
Enable or disable the playing of sounds in XQF when an event occurs.
Player Program
The program used to play sounds.  For example:  
esdplay

play
If the program is not in your path, you must specify the entire path.  For example:
/myfolder/bin/theplayer
Note:  You may experience sound blocking problems depending on the programs you are running.  For example, while playing a song on a cheap sound card with XMMS configured for OSS output, play (sox) waits until XMMS is finished before playing the sound.  Results may vary depending on your system.
Sounds
Enter the sound file to play for each event.   If the entry does not start with a /, the user's ~/.qf/ directory is assumed.  For example:

/home/alex/sounds/stop.wav        (absolute path)

sounds/stop.wav                            (same as ~/.qf/sounds/stop.wav)

Server Filters:
Configure:
Server Filter:

Server filters can be used to reduce and or fine tune the servers listed.  An unlimited number of custom filters can be defined.

To create a new filter, click New.  To select an existing filter to edit, click the top left menu selector and select the filter.

The current filter can be renamed or deleted by clicking the Rename or Delete buttons.

The following options can be defined for each filter:

Server would pass filter if:

ping is less than:
The server's ping must be less than this number to be displayed
The number of retries is fewer than:
If XQF must retry more than this number to contact a server, remove it from the list
It is not full:
The server has room for another player
Is not empty:
Has someone playing on it.  BOTS on the server are considered as players
Cheats are not allowed:
Cheats is not enabled on the server
No password required:
Server is a public access server
The game contains the string:
Enter text that must be in the game name.  For example: 'arena'
The game type contains the string:
Enter text that must be in the game name.  For example: 'ctf'
The version contains the string:
Only servers that have the text in the 'version' variable
The map contains the string:

Enter text that must be in the map name.  For example: 'q3dm'
The server name contains the string:

Enter text that must be in the server name.  For example: 'Batcave'
Player:

Player filters can be used to help you find your friends on servers.  Each player defined has a colour assigned to it - red, green or blue.  The server list will display the coloured dot next to the server name if the player is found on that server.

Click 'New' and enter a player name using an exact match (string), a partial match (substing) or by using a regular expression.

Note:  You can also add a player to the player filter by right-clicking the player name in the Players pane.

Quick Filter:

  Words typed here are searched in every server's name, hostname, map, game, gametype and rule value.

Game Specific Information

 
Following are notes on using specific games with XQF.  Most games should work with basic setup in XQF, but some may require special configuration.

Quake3

Under Preferences - Games, enter the 'command line' and 'working directory'. Nothing special is normally needed.

XQF uses the 'game' server variable to determine how to launch Quake3. For example, if the server reports a game of q3ut2, Quake3 will be launched with +set fs_game q3ut2. In some cases, a server may report the incorrect case such as Q3UT2. This would cause XQF to launch Quake3 using+set fs_game Q3UT2 which would result in a new directory being created in your Quake3 directory, and none of the mods files being found.

In XQF 0.9.10 and newer, if an exact match is not found in the Quake3 / ~/.q3a directory, a search will be performed to find a matching directory regardless of case. In the above example, Quake3 would be launched with +set fs_game q3ut2even if the server reported Q3UT2 and you had the mod installed as q3ut2.

QUAKE 3 ARENA SPECIAL INSTRUCTIONS (AKA HACK) for v1.17 and 1.27

This may also apply to newer versions of Quake3 as they are released.

In Q3A, clients and servers can only talk with each other if they are using the same protocol.  The protocol in Q3A is defined by a  number.  So, for instance, Q3A 1.17 uses  protocol 45 wile 1.27 uses protocol 48.  During the switch-over time after ID releases a new point release, it can be  frustrating to not be able to connect to any server one wants. However, if you have lots of disk space, it is possible to get around this problem.

I (Bill 'EvilBill' Adams) will outline what I did to get it so I can play both 1.17 and 1.27 Q3A games without much fuss.
For reference, my Q3A is installed under /usr/local/games/... and I have a symlink from /usr/local/bin/quake3 to ../games/quake3/quake3.

(1) Rename /usr/local/games/quake3 (as I used to have it) to /usr/local/games/quake3-1.17.

(2) mkdir /usr/local/games/quake3; cd /usr/local/games/quake3

(3) cp -Rav ../quake3-1.17 .

(4) Install the point release, copy all of the TA pk3 files into baseq3.  Remove any old mods from 1.17.

(5) cd..; mv quake3 quake3-1.27

(6) Edit both of the quake3 scripts so the directories all match, here is the script I use for 1.17: (/usr/local/games/quake3-1.17/quake3)

==begin==
#!/bin/sh
# Needed to make symlinks/shortcuts work.
# Run Quake III with some default arguments

LD_LIBRARY_PATH="/usr/local/games/quake3-1.17"
export LD_LIBRARY_PATH

cd "/usr/local/games/quake3-1.17"
quake="./quake3.x86"
"$quake" +set in_dgamouse 1 $*
exit $?
==cut==

(7) [as root], cd into /usr/local/bin.  Make symlinks for each of the Q3A directories that correspond to the protocol each uses. So:

  ln -s ../games/quake3-1.17 quake3proto45
  ln -s ../games/quake3-1.27 quake3proto48
  ln -s ../games/quake3-1.27 quake3

Note the last one is there as the default.

(8) Get a very (CVS) recent version of xqf. You will need >=0.9.6e-beta. Set up the executable for quake3 such that it is the FULL path to  quake3, in my case I entered /usr/local/bin/quake3.  This is VERY important because of the hack I used where I put 'protoNN' on the end of whatever you entered for the program and see if xqf can fopen it.  Without the full path, chances are that xqf will not find it.

If you have problems, run xqf with "-d 5" on the command line.  This will give you some hints as to that which it is looking.
 

Soldier of Fortune (1.06)

Create a script in your sof directory called 'startsof-xqf' that contains: ./sof +set console 1 +won_login username password "$@"

Replace username and password with your WoN username and password

Make the script executable with: chmod +x startsof-xqf

Under Preferences - Games, enter startsof-xqf for 'command line' and enter the directory sof is installed in for 'working directory'.

When you connect to a server, SoF will authenticate to WoN and you will have to click 'OK' to the hopefully successful login screen.  You should then be connected to the selected server

Soldier of Fortune 2

Qstat 2.5c supports Soldier of Fortune 2 by using a ,qstatrc configuration file (normally stored in your home directory or /etc/qstat.cfg).  You must properly install qstat with the qstatrc configuration file for XQF to work with this game.  See the qstat documentation for more information.

Unreal Tournament (436) and Rune

The startup scripts of Unreal Tournament and Rune have a bug that prevents them from automatically connecting to servers when beeing started by xqf. Fortunately it's easy to fix (for Rune the startup script is called 'rune' instead of 'ut):

Inside of the directory where Unreal Tournament is installed, backup your ut file: cp ut ut.org (ut is a script that finds and launches ut-bin)

Edit the ut file and change the line near the bottom from exec "./ut-bin" -log $* to exec "./ut-bin" $* -log

(-log and $* need to be swapped)

Under Preferences - Games, enter ut for 'command line' and enter the directory UnrealTournament is installed in for 'working directory'.

Half-Life

Nothing special required anymore, just enter a command that launches a normal Half-Life such as:
wine hl.exe -- hl.exe -console
You should no longer need to specify a special script to launch Half-Life.

To play Half-Life under Linux, see the following sites:

Linux Half-Life
TransGaming

Descent 3

Descent 3 does not currently launch from XQF.  This appears to be a problem with the Descent3 program, and not XQF.  Descent3 for Linux does not accept connections to servers from the command line.

Serious Sam

For Serious Sam to query properly, a QStat configuration file is required. XQF since version 0.9.12 installs a working one for you.

Note:  At the time of this release, there are no known public Serious Sam master servers that work with QStat / XQF.

Medal of Honor

For Medal of Honor to query properly, a QStat configuration file is required. XQF since version 0.9.13 installs a working one for you.

Call of Duty

There is currently no native client for Call of Duty, you need wine to run it. You can find an installer at http://liflg.org/?catid=7&gameid=1

Savage

The shell script shipped with Savage is broken. You need to adjust it to pass command line parameters to the game itself. Change the line that looks like
LD_LIBRARY_PATH=libs:$LD_LIBRARY_PATH ./savage.bin /usr/local/games/Savage_Demo
to
LD_LIBRARY_PATH=libs:$LD_LIBRARY_PATH ./silverback.bin "$@" /usr/local/games/Savage_Demo

Jedi Knight: Jedi Academy

There is currently no native client for Jedi Knight: Jedi Academy, you need wine to run it. You can find an installer at http://www.liflg.org/?catid=7&gameid=44

 Troubleshooting / FAQ

Please report problems to the XQF home page Forum at http://www.linuxgames.com/xqfor the user mail list at http://sourceforge.net/projects/xqf.

Most problems can be solved by deleting the '.qf' directory in your home directory.  This directory contains the configuration of XQF including game preferences, server lists, player lists etc.

Q: Do you know of any good web sites with technical information on playing games on Linux?

A: http://www.icculus.org/lgfaq/

Q: When I refresh or update a list, all servers come back with a ping of 'n/a'

A:  Make sure qstat is in your path.  Go to a shell and type qstat.  If a screen full of qstat command options does not appear, qstat is not installed, or it is not in your path.  After compiling QStat, copy qstat to the /usr/bin directory.  See the QStat home page for installation instructions.

Q: QStat is installed, but when I refresh or update a list, all servers come back with a ping of 'n/a'

A:  If you are behind a firewall such as a LinkSys or Dlink router, or are using filtering on your machine (iptables or ipchains) you are probably blocking the game's traffic from entering your computer.  Games generally use UDP, not TCP.  Because of this, your firewall needs special configuration.  Search the internet for 'gamename firewall port' and you should find something helpful.  


Q:  When I try to launch XQF, I get 'command not found'

A:  XQF is not in your path.  See the Launching XQF section


Q:  I have added master0.gamespy.com to XQF, but I can not retreive any servers from that master

A:  Gamespy's master servers use an authentication sequence that is not supported by QStat.  This means that you can not query a Gamespy master using QStat and XQF.  Other games such as Unreal Tournament use the Gamespy style master server but do not require authentication which is why they work.

Q:  I deleted one of the default master servers.  How do I get it back?

A:  Edit - Add Default Masters to add ALL the default master servers back into the list.  If you know the address, you can add a single master with Edit - Add Master.


Q: Why do LAN searches not find any servers?

A: You either need a default route to your ethernet device or a host route for the broadcast address (try e.g. route add -host 255.255.255.255 eth0).


Q: I am behind a firewall / proxy server and can not retrieve http master lists

A: XQF uses wget to retreive http master lists.  To configure wget to use a proxy server, set the environment variable 'http_proxy' before launching XQF.  For example:

export http_proxy=http://address-of-proxy-server:port/

Q: My game is not launching properly.  What do I do?

A: The command line arguments passed by XQF may not be correct due to a configuration problem or maybe a bug.  Launch XQF from a command prompt using:

xqf -d 1

and 'Connect' to the server.  The command line used by XQF to launch the game will be displayed in the console.  Use that to figure out what is wrong.  If you can determine it is a but, please fill out a bug report at http://sourceforge.net/projects/xqf.


Q: XQF sounds are not playing when XMMS or another sound program is running.  What do I do?

A: The Enlightened Sound Daemon (ESD or ESounD) allows multiple programs to play sounds at the same time.  The software you are running may or may not be using ESD to play sounds.

To have XQF use ESD, configure the sound player to be /usr/bin/esdplay instead of play or sox.

Configure your other applications to use ESD.  For example, to configure XMMS to use ESD, press Control P inside of XMMS and on the Audio I/O Plugins page select 'eSound Output Plugin' for the Output Plugin.

On an RPM based system, use 'rpm -q esound' to see if it ESD is installed.

For more information on ESD, see /usr/share/doc/esound*.

Under KDE you may want to use arts and artsplay instead

Q: When updating server lists for Quake3, Wolfenstein or Enemy Territory, XQF only shows servers for an old version or the demo. What's wrong?

A: You need to choose a suitable Masterserver protcol version. If xqf doesn't know about the newest version yet, manually add a server running the new version and enter the value of the server rule "protocol"


Q: Can XQF integrate with any chat programs such as IRC or ICQ?

A: To integrate XQF with XChat or LICQ, use XQF -> XChat.  When you start a game with XQF, this script notifies other chat channel users that you are playing a game and (optionally) changes your nick to reflect your gaming status.  Also, your Licq status can be changed (n/a, occupied, etc) and the autoresponse message will be changed to the stats of the server you are using.


Q: Will XQF be availble for Windows?

A: We have no plans to port XQF to Windows, however there are many Windows game browser applications available.  You may try aGSM (alternative Game Server Monitor) which supports both LAN and Internet gaming for many popular online games and is freeware (but no free software unfortunately).

XQF-Rcon


Included in the XQF source is a program called XQF-Rcon.  XQF-Rcon is a text mode (does NOT require X) remote console program for Quake2 and other games.  The program is completely independant of XQF, but uses some XQF source files to compile.  It does NOT replace or alter the existing RCON support inside of XQF.

To use xqf-rcon, type:
xqf-rcon ip port
You will be prompted for the rcon password and then it behaves like a normal shell.

It will always waits for an answer after sending a line.  It will time out and return to the prompt if no answer is received within five seconds.

To compile xqf-rcon, make sure you have readline and ncurses development packages.  For example, readline-devel and ncurses5-devel (depends on distribution).

To compile xqf-rcon, the steps are the same as compiling XQF except for the ./configure line.  See below:

Extract the source code:

tar xvfz xqf-xxx.tar.gz

cd into the directory:

cd xqf-*

Run configure script:

./configure --enable-externalrcon

Compile source code:

make

After compiling, you should have the program 'xqf-rcon' in src/, along with xqf.

Note:  To compile from CVS, make sure you are running automake 1.6 or newer.

xqf-1.0.5/docs/Makefile.am0000644002404400000620000000005407666171542012231 00000000000000EXTRA_DIST = xqfdocs.html PreLaunch.example xqf-1.0.5/docs/Makefile.in0000644002404400000620000002367210523105433012233 00000000000000# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = docs DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/src/gnuconfig.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_XQFRCON_FALSE = @BUILD_XQFRCON_FALSE@ BUILD_XQFRCON_TRUE = @BUILD_XQFRCON_TRUE@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COMPRESSION = @COMPRESSION@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEBUG = @DEBUG@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DUMMY_LIBGDKPIXBUF_FALSE = @DUMMY_LIBGDKPIXBUF_FALSE@ DUMMY_LIBGDKPIXBUF_ORIG = @DUMMY_LIBGDKPIXBUF_ORIG@ DUMMY_LIBGDKPIXBUF_SONAME = @DUMMY_LIBGDKPIXBUF_SONAME@ DUMMY_LIBGDKPIXBUF_TRUE = @DUMMY_LIBGDKPIXBUF_TRUE@ DUMMY_LIBGEOIP_FALSE = @DUMMY_LIBGEOIP_FALSE@ DUMMY_LIBGEOIP_ORIG = @DUMMY_LIBGEOIP_ORIG@ DUMMY_LIBGEOIP_SONAME = @DUMMY_LIBGEOIP_SONAME@ DUMMY_LIBGEOIP_TRUE = @DUMMY_LIBGEOIP_TRUE@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GDK_PIXBUF_CFLAGS = @GDK_PIXBUF_CFLAGS@ GDK_PIXBUF_CONFIG = @GDK_PIXBUF_CONFIG@ GDK_PIXBUF_LIBS = @GDK_PIXBUF_LIBS@ GEOIP_LIB = @GEOIP_LIB@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_CONFIG = @GLIB_CONFIG@ GLIB_LIBS = @GLIB_LIBS@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_CONFIG = @GTK_CONFIG@ GTK_LIBS = @GTK_LIBS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@ INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@ INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_ICONV = @INTLTOOL_ICONV@ INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@ INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_MSGFMT = @INTLTOOL_MSGFMT@ INTLTOOL_MSGMERGE = @INTLTOOL_MSGMERGE@ INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@ INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@ INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@ INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@ INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@ INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@ INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@ INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@ INTLTOOL_XGETTEXT = @INTLTOOL_XGETTEXT@ INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@ INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MSGFMT = @MSGFMT@ OBJEXT = @OBJEXT@ OLD_GTK_SUPPORT = @OLD_GTK_SUPPORT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_CFLAGS = @PACKAGE_CFLAGS@ PACKAGE_LIBS = @PACKAGE_LIBS@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ QSTATEXEC = @QSTATEXEC@ RANLIB = @RANLIB@ RELEASE = @RELEASE@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ XQFRCON_LIBS = @XQFRCON_LIBS@ ac_ct_CC = @ac_ct_CC@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ datadir = @datadir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ EXTRA_DIST = xqfdocs.html PreLaunch.example all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu docs/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu docs/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh uninstall-info-am: tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-info-am .PHONY: all all-am check check-am clean clean-generic distclean \ distclean-generic distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-exec \ install-exec-am install-info install-info-am install-man \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am \ uninstall-info-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xqf-1.0.5/docs/PreLaunch.example0000755002404400000620000000057107666171542013442 00000000000000#!/bin/sh # # example PreLaunch script. Make it executable and copy it to # ~/.qf/PreLauch if you are running a webserver on your box. # # You can create your own "master server" that reports only the # server you were last playing on. Your buddy just needs to add a # master e.g. with the URL http://your.host/~username/xqfserver.txt # echo "$@" > ~/public_html/xqfserver.txt xqf-1.0.5/compile0000755002404400000620000000717310422550571010617 00000000000000#! /bin/sh # Wrapper for compilers which do not understand `-c -o'. scriptversion=2005-05-14.22 # Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc. # Written by Tom Tromey . # # 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, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # This file is maintained in Automake, please report # bugs to or send patches to # . case $1 in '') echo "$0: No command. Try \`$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: compile [--help] [--version] PROGRAM [ARGS] Wrapper for compilers which do not understand `-c -o'. Remove `-o dest.o' from ARGS, run PROGRAM with the remaining arguments, and rename the output as expected. If you are trying to build a whole package this is not the right script to run: please start by reading the file `INSTALL'. Report bugs to . EOF exit $? ;; -v | --v*) echo "compile $scriptversion" exit $? ;; esac ofile= cfile= eat= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as `compile cc -o foo foo.c'. # So we strip `-o arg' only if arg is an object. eat=1 case $2 in *.o | *.obj) ofile=$2 ;; *) set x "$@" -o "$2" shift ;; esac ;; *.c) cfile=$1 set x "$@" "$1" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -z "$ofile" || test -z "$cfile"; then # If no `-o' option was seen then we might have been invoked from a # pattern rule where we don't need one. That is ok -- this is a # normal compilation that the losing compiler can handle. If no # `.c' file was seen then we are probably linking. That is also # ok. exec "$@" fi # Name of file we expect compiler to create. cofile=`echo "$cfile" | sed -e 's|^.*/||' -e 's/\.c$/.o/'` # Create the lock directory. # Note: use `[/.-]' here to ensure that we don't use the same name # that we are using for the .o file. Also, base the name on the expected # object file name, since that is what matters with a parallel build. lockdir=`echo "$cofile" | sed -e 's|[/.-]|_|g'`.d while true; do if mkdir "$lockdir" >/dev/null 2>&1; then break fi sleep 1 done # FIXME: race condition here if user kills between mkdir and trap. trap "rmdir '$lockdir'; exit 1" 1 2 15 # Run the compile. "$@" ret=$? if test -f "$cofile"; then mv "$cofile" "$ofile" elif test -f "${cofile}bj"; then mv "${cofile}bj" "$ofile" fi rmdir "$lockdir" exit $ret # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: xqf-1.0.5/depcomp0000755002404400000620000003710010422550571010607 00000000000000#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2005-07-09.11 # Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc. # 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, 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., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva . case $1 in '') echo "$0: No command. Try \`$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by `PROGRAMS ARGS'. object Object file output by `PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputing dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ## The second -e expression handles DOS-style file names with drive letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the `deleted header file' problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. tr ' ' ' ' < "$tmpdepfile" | ## Some versions of gcc put a space before the `:'. On the theory ## that the space means something, we add a space to the output as ## well. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like `#:fec' to the end of the # dependency line. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ tr ' ' ' ' >> $depfile echo >> $depfile # The second pass generates a dummy entry for each header file. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> $depfile else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts `$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'` tmpdepfile="$stripped.u" if test "$libtool" = yes; then "$@" -Wc,-M else "$@" -M fi stat=$? if test -f "$tmpdepfile"; then : else stripped=`echo "$stripped" | sed 's,^.*/,,'` tmpdepfile="$stripped.u" fi if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi if test -f "$tmpdepfile"; then outname="$stripped.o" # Each line is of the form `foo.o: dependent.h'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile" sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; icc) # Intel's C compiler understands `-MD -MF file'. However on # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c # ICC 7.0 will fill foo.d with something like # foo.o: sub/foo.c # foo.o: sub/foo.h # which is wrong. We want: # sub/foo.o: sub/foo.c # sub/foo.o: sub/foo.h # sub/foo.c: # sub/foo.h: # ICC 7.1 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using \ : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in `foo.d' instead, so we check for that too. # Subdirectories are respected. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then # With Tru64 cc, shared objects can also be used to make a # static library. This mecanism is used in libtool 1.4 series to # handle both shared and static libraries in a single compilation. # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. # # With libtool 1.5 this exception was removed, and libtool now # generates 2 separate objects for the 2 libraries. These two # compilations output dependencies in in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 tmpdepfile2=$dir$base.o.d # libtool 1.5 tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.o.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d tmpdepfile4=$dir$base.d "$@" -MD fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for `:' # in the target name. This is to cope with DOS-style filenames: # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. "$@" $dashmflag | sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" tr ' ' ' ' < "$tmpdepfile" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # X makedepend shift cleared=no for arg in "$@"; do case $cleared in no) set ""; shift cleared=yes ;; esac case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix="`echo $object | sed 's/^.*\././'`" touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" sed '1,2d' "$tmpdepfile" | tr ' ' ' ' | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o, # because we must use -o when running libtool. "$@" || exit $? IFS=" " for arg do case "$arg" in "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" echo " " >> "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: xqf-1.0.5/intltool-extract.in0000755002404400000620000005363010520653073013107 00000000000000#!@INTLTOOL_PERL@ -w # -*- Mode: perl; indent-tabs-mode: nil; c-basic-offset: 4 -*- # # The Intltool Message Extractor # # Copyright (C) 2000-2001, 2003 Free Software Foundation. # # Intltool 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. # # Intltool 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., 675 Mass Ave, Cambridge, MA 02139, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # # Authors: Kenneth Christiansen # Darin Adler # ## Release information my $PROGRAM = "intltool-extract"; my $PACKAGE = "intltool"; my $VERSION = "0.34.1"; ## Loaded modules use strict; use File::Basename; use Getopt::Long; ## Scalars used by the option stuff my $TYPE_ARG = "0"; my $LOCAL_ARG = "0"; my $HELP_ARG = "0"; my $VERSION_ARG = "0"; my $UPDATE_ARG = "0"; my $QUIET_ARG = "0"; my $SRCDIR_ARG = "."; my $FILE; my $OUTFILE; my $gettext_type = ""; my $input; my %messages = (); my %loc = (); my %count = (); my %comments = (); my $strcount = 0; my $XMLCOMMENT = ""; ## Use this instead of \w for XML files to handle more possible characters. my $w = "[-A-Za-z0-9._:]"; ## Always print first $| = 1; ## Handle options GetOptions ( "type=s" => \$TYPE_ARG, "local|l" => \$LOCAL_ARG, "help|h" => \$HELP_ARG, "version|v" => \$VERSION_ARG, "update" => \$UPDATE_ARG, "quiet|q" => \$QUIET_ARG, "srcdir=s" => \$SRCDIR_ARG, ) or &error; &split_on_argument; ## Check for options. ## This section will check for the different options. sub split_on_argument { if ($VERSION_ARG) { &version; } elsif ($HELP_ARG) { &help; } elsif ($LOCAL_ARG) { &place_local; &extract; } elsif ($UPDATE_ARG) { &place_normal; &extract; } elsif (@ARGV > 0) { &place_normal; &message; &extract; } else { &help; } } sub place_normal { $FILE = $ARGV[0]; $OUTFILE = "$FILE.h"; } sub place_local { $FILE = $ARGV[0]; $OUTFILE = fileparse($FILE, ()); if (!-e "tmp/") { system("mkdir tmp/"); } $OUTFILE = "./tmp/$OUTFILE.h" } sub determine_type { if ($TYPE_ARG =~ /^gettext\/(.*)/) { $gettext_type=$1 } } ## Sub for printing release information sub version{ print <<_EOF_; ${PROGRAM} (${PACKAGE}) $VERSION Copyright (C) 2000, 2003 Free Software Foundation, Inc. Written by Kenneth Christiansen, 2000. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. _EOF_ exit; } ## Sub for printing usage information sub help { print <<_EOF_; Usage: ${PROGRAM} [OPTION]... [FILENAME] Generates a header file from an XML source file. It grabs all strings between <_translatable_node> and its end tag in XML files. Read manpage (man ${PROGRAM}) for more info. --type=TYPE Specify the file type of FILENAME. Currently supports: "gettext/glade", "gettext/ini", "gettext/keys" "gettext/rfc822deb", "gettext/schemas", "gettext/scheme", "gettext/xml" -l, --local Writes output into current working directory (conflicts with --update) --update Writes output into the same directory the source file reside (conflicts with --local) --srcdir Root of the source tree -v, --version Output version information and exit -h, --help Display this help and exit -q, --quiet Quiet mode Report bugs to http://bugzilla.gnome.org/ (product name "$PACKAGE") or send email to . _EOF_ exit; } ## Sub for printing error messages sub error{ print STDERR "Try `${PROGRAM} --help' for more information.\n"; exit; } sub message { print "Generating C format header file for translation.\n" unless $QUIET_ARG; } sub extract { &determine_type; &convert; open OUT, ">$OUTFILE"; binmode (OUT) if $^O eq 'MSWin32'; &msg_write; close OUT; print "Wrote $OUTFILE\n" unless $QUIET_ARG; } sub convert { ## Reading the file { local (*IN); local $/; #slurp mode open (IN, "<$SRCDIR_ARG/$FILE") || die "can't open $SRCDIR_ARG/$FILE: $!"; $input = ; } &type_ini if $gettext_type eq "ini"; &type_keys if $gettext_type eq "keys"; &type_xml if $gettext_type eq "xml"; &type_glade if $gettext_type eq "glade"; &type_scheme if $gettext_type eq "scheme"; &type_schemas if $gettext_type eq "schemas"; &type_rfc822deb if $gettext_type eq "rfc822deb"; } sub entity_decode_minimal { local ($_) = @_; s/'/'/g; # ' s/"/"/g; # " s/&/&/g; return $_; } sub entity_decode { local ($_) = @_; s/'/'/g; # ' s/"/"/g; # " s/&/&/g; s/<//g; return $_; } sub escape_char { return '\"' if $_ eq '"'; return '\n' if $_ eq "\n"; return '\\' if $_ eq '\\'; return $_; } sub escape { my ($string) = @_; return join "", map &escape_char, split //, $string; } sub type_ini { ### For generic translatable desktop files ### while ($input =~ /^_.*=(.*)$/mg) { $messages{$1} = []; } } sub type_keys { ### For generic translatable mime/keys files ### while ($input =~ /^\s*_\w+=(.*)$/mg) { $messages{$1} = []; } } sub type_xml { ### For generic translatable XML files ### my $tree = readXml($input); parseTree(0, $tree); } sub print_var { my $var = shift; my $vartype = ref $var; if ($vartype =~ /ARRAY/) { my @arr = @{$var}; print "[ "; foreach my $el (@arr) { print_var($el); print ", "; } print "] "; } elsif ($vartype =~ /HASH/) { my %hash = %{$var}; print "{ "; foreach my $key (keys %hash) { print "$key => "; print_var($hash{$key}); print ", "; } print "} "; } else { print $var; } } # Same syntax as getAttributeString in intltool-merge.in.in, similar logic (look for ## differences comment) sub getAttributeString { my $sub = shift; my $do_translate = shift || 1; my $language = shift || ""; my $translate = shift; my $result = ""; foreach my $e (reverse(sort(keys %{ $sub }))) { my $key = $e; my $string = $sub->{$e}; my $quote = '"'; $string =~ s/^[\s]+//; $string =~ s/[\s]+$//; if ($string =~ /^'.*'$/) { $quote = "'"; } $string =~ s/^['"]//g; $string =~ s/['"]$//g; ## differences from intltool-merge.in.in if ($key =~ /^_/) { $comments{entity_decode($string)} = $XMLCOMMENT if $XMLCOMMENT; $messages{entity_decode($string)} = []; $$translate = 2; } ## differences end here from intltool-merge.in.in $result .= " $key=$quote$string$quote"; } return $result; } # Verbatim copy from intltool-merge.in.in sub getXMLstring { my $ref = shift; my $spacepreserve = shift || 0; my @list = @{ $ref }; my $result = ""; my $count = scalar(@list); my $attrs = $list[0]; my $index = 1; $spacepreserve = 1 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?preserve["']?$/)); $spacepreserve = 0 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?default["']?$/)); while ($index < $count) { my $type = $list[$index]; my $content = $list[$index+1]; if (! $type ) { # We've got CDATA if ($content) { # lets strip the whitespace here, and *ONLY* here $content =~ s/\s+/ /gs if (!$spacepreserve); $result .= $content; } } elsif ( "$type" ne "1" ) { # We've got another element $result .= "<$type"; $result .= getAttributeString(@{$content}[0], 0); # no nested translatable elements if ($content) { my $subresult = getXMLstring($content, $spacepreserve); if ($subresult) { $result .= ">".$subresult . ""; } else { $result .= "/>"; } } else { $result .= "/>"; } } $index += 2; } return $result; } # Verbatim copy from intltool-merge.in.in, except for MULTIPLE_OUTPUT handling removed # Translate list of nodes if necessary sub translate_subnodes { my $fh = shift; my $content = shift; my $language = shift || ""; my $singlelang = shift || 0; my $spacepreserve = shift || 0; my @nodes = @{ $content }; my $count = scalar(@nodes); my $index = 0; while ($index < $count) { my $type = $nodes[$index]; my $rest = $nodes[$index+1]; traverse($fh, $type, $rest, $language, $spacepreserve); $index += 2; } } # Based on traverse() in intltool-merge.in.in sub traverse { my $fh = shift; # unused, to allow us to sync code between -merge and -extract my $nodename = shift; my $content = shift; my $language = shift || ""; my $spacepreserve = shift || 0; if ($nodename && "$nodename" eq "1") { $XMLCOMMENT = $content; } elsif ($nodename) { # element my @all = @{ $content }; my $attrs = shift @all; my $translate = 0; my $outattr = getAttributeString($attrs, 1, $language, \$translate); if ($nodename =~ /^_/) { $translate = 1; $nodename =~ s/^_//; } my $lookup = ''; $spacepreserve = 0 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?default["']?$/)); $spacepreserve = 1 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?preserve["']?$/)); if ($translate) { $lookup = getXMLstring($content, $spacepreserve); if (!$spacepreserve) { $lookup =~ s/^\s+//s; $lookup =~ s/\s+$//s; } if ($lookup && $translate != 2) { $comments{$lookup} = $XMLCOMMENT if $XMLCOMMENT; $messages{$lookup} = []; } elsif ($translate == 2) { translate_subnodes($fh, \@all, $language, 1, $spacepreserve); } } else { $XMLCOMMENT = ""; my $count = scalar(@all); if ($count > 0) { my $index = 0; while ($index < $count) { my $type = $all[$index]; my $rest = $all[$index+1]; traverse($fh, $type, $rest, $language, $spacepreserve); $index += 2; } } } $XMLCOMMENT = ""; } } # Verbatim copy from intltool-merge.in.in, $fh for compatibility sub parseTree { my $fh = shift; my $ref = shift; my $language = shift || ""; my $name = shift @{ $ref }; my $cont = shift @{ $ref }; while (!$name || "$name" eq "1") { $name = shift @{ $ref }; $cont = shift @{ $ref }; } my $spacepreserve = 0; my $attrs = @{$cont}[0]; $spacepreserve = 1 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?preserve["']?$/)); traverse($fh, $name, $cont, $language, $spacepreserve); } # Verbatim copy from intltool-merge.in.in sub intltool_tree_comment { my $expat = shift; my $data = shift; my $clist = $expat->{Curlist}; my $pos = $#$clist; push @$clist, 1 => $data; } # Verbatim copy from intltool-merge.in.in sub intltool_tree_cdatastart { my $expat = shift; my $clist = $expat->{Curlist}; my $pos = $#$clist; push @$clist, 0 => $expat->original_string(); } # Verbatim copy from intltool-merge.in.in sub intltool_tree_cdataend { my $expat = shift; my $clist = $expat->{Curlist}; my $pos = $#$clist; $clist->[$pos] .= $expat->original_string(); } # Verbatim copy from intltool-merge.in.in sub intltool_tree_char { my $expat = shift; my $text = shift; my $clist = $expat->{Curlist}; my $pos = $#$clist; # Use original_string so that we retain escaped entities # in CDATA sections. # if ($pos > 0 and $clist->[$pos - 1] eq '0') { $clist->[$pos] .= $expat->original_string(); } else { push @$clist, 0 => $expat->original_string(); } } # Verbatim copy from intltool-merge.in.in sub intltool_tree_start { my $expat = shift; my $tag = shift; my @origlist = (); # Use original_string so that we retain escaped entities # in attribute values. We must convert the string to an # @origlist array to conform to the structure of the Tree # Style. # my @original_array = split /\x/, $expat->original_string(); my $source = $expat->original_string(); # Remove leading tag. # $source =~ s|^\s*<\s*(\S+)||s; # Grab attribute key/value pairs and push onto @origlist array. # while ($source) { if ($source =~ /^\s*([\w:-]+)\s*[=]\s*["]/) { $source =~ s|^\s*([\w:-]+)\s*[=]\s*["]([^"]*)["]||s; push @origlist, $1; push @origlist, '"' . $2 . '"'; } elsif ($source =~ /^\s*([\w:-]+)\s*[=]\s*[']/) { $source =~ s|^\s*([\w:-]+)\s*[=]\s*[']([^']*)[']||s; push @origlist, $1; push @origlist, "'" . $2 . "'"; } else { last; } } my $ol = [ { @origlist } ]; push @{ $expat->{Lists} }, $expat->{Curlist}; push @{ $expat->{Curlist} }, $tag => $ol; $expat->{Curlist} = $ol; } # Copied from intltool-merge.in.in and added comment handler. sub readXml { my $xmldoc = shift || return; my $ret = eval 'require XML::Parser'; if(!$ret) { die "You must have XML::Parser installed to run $0\n\n"; } my $xp = new XML::Parser(Style => 'Tree'); $xp->setHandlers(Char => \&intltool_tree_char); $xp->setHandlers(Start => \&intltool_tree_start); $xp->setHandlers(CdataStart => \&intltool_tree_cdatastart); $xp->setHandlers(CdataEnd => \&intltool_tree_cdataend); ## differences from intltool-merge.in.in $xp->setHandlers(Comment => \&intltool_tree_comment); ## differences end here from intltool-merge.in.in my $tree = $xp->parse($xmldoc); #print_var($tree); # Hello thereHowdydo # would be: # [foo, [{}, 1, "comment", head, [{id => "a"}, 0, "Hello ", em, [{}, 0, "there"]], bar, # [{}, 0, "Howdy", ref, [{}]], 0, "do" ] ] return $tree; } sub type_schemas { ### For schemas XML files ### # FIXME: We should handle escaped < (less than) while ($input =~ / \s* (\s*(?:\s*)?(.*?)\s*<\/default>\s*)? (\s*(?:\s*)?(.*?)\s*<\/short>\s*)? (\s*(?:\s*)?(.*?)\s*<\/long>\s*)? <\/locale> /sgx) { my @totranslate = ($3,$6,$9); my @eachcomment = ($2,$5,$8); foreach (@totranslate) { my $currentcomment = shift @eachcomment; next if !$_; s/\s+/ /g; $messages{entity_decode_minimal($_)} = []; $comments{entity_decode_minimal($_)} = $currentcomment if (defined($currentcomment)); } } } sub type_rfc822deb { ### For rfc822-style Debian configuration files ### my $lineno = 1; my $type = ''; while ($input =~ /\G(.*?)(^|\n)(_+)([^:]+):[ \t]*(.*?)(?=\n\S|$)/sg) { my ($pre, $newline, $underscore, $tag, $text) = ($1, $2, $3, $4, $5); while ($pre =~ m/\n/g) { $lineno ++; } $lineno += length($newline); my @str_list = rfc822deb_split(length($underscore), $text); for my $str (@str_list) { $strcount++; $messages{$str} = []; $loc{$str} = $lineno; $count{$str} = $strcount; my $usercomment = ''; while($pre =~ s/(^|\n)#([^\n]*)$//s) { $usercomment = "\n" . $2 . $usercomment; } $comments{$str} = $tag . $usercomment; } $lineno += ($text =~ s/\n//g); } } sub rfc822deb_split { # Debian defines a special way to deal with rfc822-style files: # when a value contain newlines, it consists of # 1. a short form (first line) # 2. a long description, all lines begin with a space, # and paragraphs are separated by a single dot on a line # This routine returns an array of all paragraphs, and reformat # them. # When first argument is 2, the string is a comma separated list of # values. my $type = shift; my $text = shift; $text =~ s/^[ \t]//mg; return (split(/, */, $text, 0)) if $type ne 1; return ($text) if $text !~ /\n/; $text =~ s/([^\n]*)\n//; my @list = ($1); my $str = ''; for my $line (split (/\n/, $text)) { chomp $line; if ($line =~ /^\.\s*$/) { # New paragraph $str =~ s/\s*$//; push(@list, $str); $str = ''; } elsif ($line =~ /^\s/) { # Line which must not be reformatted $str .= "\n" if length ($str) && $str !~ /\n$/; $line =~ s/\s+$//; $str .= $line."\n"; } else { # Continuation line, remove newline $str .= " " if length ($str) && $str !~ /\n$/; $str .= $line; } } $str =~ s/\s*$//; push(@list, $str) if length ($str); return @list; } sub type_glade { ### For translatable Glade XML files ### my $tags = "label|title|text|format|copyright|comments|preview_text|tooltip|message"; while ($input =~ /<($tags)>([^<]+)<\/($tags)>/sg) { # Glade sometimes uses tags that normally mark translatable things for # little bits of non-translatable content. We work around this by not # translating strings that only includes something like label4 or window1. $messages{entity_decode($2)} = [] unless $2 =~ /^(window|label|dialog)[0-9]+$/; } while ($input =~ /(..[^<]*)<\/items>/sg) { for my $item (split (/\n/, $1)) { $messages{entity_decode($item)} = []; } } ## handle new glade files while ($input =~ /<(property|atkproperty)\s+[^>]*translatable\s*=\s*"yes"(?:\s+[^>]*comments\s*=\s*"([^"]*)")?[^>]*>([^<]+)<\/\1>/sg) { $messages{entity_decode($3)} = [] unless $3 =~ /^(window|label)[0-9]+$/; if (defined($2) and !($3 =~ /^(window|label)[0-9]+$/)) { $comments{entity_decode($3)} = entity_decode($2) ; } } while ($input =~ /]*)"\s+description="([^>]+)"\/>/sg) { $messages{entity_decode_minimal($2)} = []; } } sub type_scheme { my ($line, $i, $state, $str, $trcomment, $char); for $line (split(/\n/, $input)) { $i = 0; $state = 0; # 0 - nothing, 1 - string, 2 - translatable string while ($i < length($line)) { if (substr($line,$i,1) eq "\"") { if ($state == 2) { $comments{$str} = $trcomment if ($trcomment); $messages{$str} = []; $str = ''; $state = 0; $trcomment = ""; } elsif ($state == 1) { $str = ''; $state = 0; $trcomment = ""; } else { $state = 1; $str = ''; if ($i>0 && substr($line,$i-1,1) eq '_') { $state = 2; } } } elsif (!$state) { if (substr($line,$i,1) eq ";") { $trcomment = substr($line,$i+1); $trcomment =~ s/^;*\s*//; $i = length($line); } elsif ($trcomment && substr($line,$i,1) !~ /\s|\(|\)|_/) { $trcomment = ""; } } else { if (substr($line,$i,1) eq "\\") { $char = substr($line,$i+1,1); if ($char ne "\"" && $char ne "\\") { $str = $str . "\\"; } $i++; } $str = $str . substr($line,$i,1); } $i++; } } } sub msg_write { my @msgids; if (%count) { @msgids = sort { $count{$a} <=> $count{$b} } keys %count; } else { @msgids = sort keys %messages; } for my $message (@msgids) { my $offsetlines = 1; $offsetlines++ if $message =~ /%/; if (defined ($comments{$message})) { while ($comments{$message} =~ m/\n/g) { $offsetlines++; } } print OUT "# ".($loc{$message} - $offsetlines). " \"$FILE\"\n" if defined $loc{$message}; print OUT "/* ".$comments{$message}." */\n" if defined $comments{$message}; print OUT "/* xgettext:no-c-format */\n" if $message =~ /%/; my @lines = split (/\n/, $message, -1); for (my $n = 0; $n < @lines; $n++) { if ($n == 0) { print OUT "char *s = N_(\""; } else { print OUT " \""; } print OUT escape($lines[$n]); if ($n < @lines - 1) { print OUT "\\n\"\n"; } else { print OUT "\");\n"; } } } } xqf-1.0.5/aclocal.m40000644002404400000620000113531510523105431011073 00000000000000# generated automatically by aclocal 1.9.6 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. # Configure paths for gdk-pixbuf # Elliot Lee 2000-01-10 # stolen from Raph Levien 98-11-18 # stolen from Manish Singh 98-9-30 # stolen back from Frank Belew # stolen from Manish Singh # Shamelessly stolen from Owen Taylor dnl AM_PATH_GDK_PIXBUF([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) dnl Test for GDK_PIXBUF, and define GDK_PIXBUF_CFLAGS and GDK_PIXBUF_LIBS dnl AC_DEFUN([AM_PATH_GDK_PIXBUF], [dnl dnl Get the cflags and libraries from the gdk-pixbuf-config script dnl AC_ARG_WITH(gdk-pixbuf-prefix,[ --with-gdk-pixbuf-prefix=PFX Prefix where GDK_PIXBUF is installed (optional)], gdk_pixbuf_prefix="$withval", gdk_pixbuf_prefix="") AC_ARG_WITH(gdk-pixbuf-exec-prefix,[ --with-gdk-pixbuf-exec-prefix=PFX Exec prefix where GDK_PIXBUF is installed (optional)], gdk_pixbuf_exec_prefix="$withval", gdk_pixbuf_exec_prefix="") AC_ARG_ENABLE(gdk_pixbuftest, [ --disable-gdk_pixbuftest Do not try to compile and run a test GDK_PIXBUF program], , enable_gdk_pixbuftest=yes) if test x$gdk_pixbuf_exec_prefix != x ; then gdk_pixbuf_args="$gdk_pixbuf_args --exec-prefix=$gdk_pixbuf_exec_prefix" if test x${GDK_PIXBUF_CONFIG+set} = xset ; then GDK_PIXBUF_CONFIG=$gdk_pixbuf_exec_prefix/gdk-pixbuf-config fi fi if test x$gdk_pixbuf_prefix != x ; then gdk_pixbuf_args="$gdk_pixbuf_args --prefix=$gdk_pixbuf_prefix" if test x${GDK_PIXBUF_CONFIG+set} = xset ; then GDK_PIXBUF_CONFIG=$gdk_pixbuf_prefix/bin/gdk-pixbuf-config fi fi AC_PATH_PROG(GDK_PIXBUF_CONFIG, gdk-pixbuf-config, no) min_gdk_pixbuf_version=ifelse([$1], ,0.2.5,$1) AC_MSG_CHECKING(for GDK_PIXBUF - version >= $min_gdk_pixbuf_version) no_gdk_pixbuf="" if test "$GDK_PIXBUF_CONFIG" = "no" ; then no_gdk_pixbuf=yes else GDK_PIXBUF_CFLAGS=`$GDK_PIXBUF_CONFIG $gdk_pixbufconf_args --cflags` GDK_PIXBUF_LIBS=`$GDK_PIXBUF_CONFIG $gdk_pixbufconf_args --libs` gdk_pixbuf_major_version=`$GDK_PIXBUF_CONFIG $gdk_pixbuf_args --version | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` gdk_pixbuf_minor_version=`$GDK_PIXBUF_CONFIG $gdk_pixbuf_args --version | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` gdk_pixbuf_micro_version=`$GDK_PIXBUF_CONFIG $gdk_pixbuf_config_args --version | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` if test "x$enable_gdk_pixbuftest" = "xyes" ; then ac_save_CFLAGS="$CFLAGS" ac_save_LIBS="$LIBS" CFLAGS="$CFLAGS $GDK_PIXBUF_CFLAGS" LIBS="$LIBS $GDK_PIXBUF_LIBS" dnl dnl Now check if the installed GDK_PIXBUF is sufficiently new. (Also sanity dnl checks the results of gdk-pixbuf-config to some extent dnl rm -f conf.gdk_pixbuftest AC_TRY_RUN([ #include #include #include #include char* my_strdup (char *str) { char *new_str; if (str) { new_str = malloc ((strlen (str) + 1) * sizeof(char)); strcpy (new_str, str); } else new_str = NULL; return new_str; } int main () { int major, minor, micro; char *tmp_version; system ("touch conf.gdk_pixbuftest"); /* HP/UX 9 (%@#!) writes to sscanf strings */ tmp_version = my_strdup("$min_gdk_pixbuf_version"); if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { printf("%s, bad version string\n", "$min_gdk_pixbuf_version"); exit(1); } if (($gdk_pixbuf_major_version > major) || (($gdk_pixbuf_major_version == major) && ($gdk_pixbuf_minor_version > minor)) || (($gdk_pixbuf_major_version == major) && ($gdk_pixbuf_minor_version == minor) && ($gdk_pixbuf_micro_version >= micro))) { return 0; } else { printf("\n*** 'gdk-pixbuf-config --version' returned %d.%d.%d, but the minimum version\n", $gdk_pixbuf_major_version, $gdk_pixbuf_minor_version, $gdk_pixbuf_micro_version); printf("*** of GDK_PIXBUF required is %d.%d.%d. If gdk-pixbuf-config is correct, then it is\n", major, minor, micro); printf("*** best to upgrade to the required version.\n"); printf("*** If gdk-pixbuf-config was wrong, set the environment variable GDK_PIXBUF_CONFIG\n"); printf("*** to point to the correct copy of gdk-pixbuf-config, and remove the file\n"); printf("*** config.cache before re-running configure\n"); return 1; } } ],, no_gdk_pixbuf=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi fi if test "x$no_gdk_pixbuf" = x ; then AC_MSG_RESULT(yes) ifelse([$2], , :, [$2]) else AC_MSG_RESULT(no) if test "$GDK_PIXBUF_CONFIG" = "no" ; then echo "*** The gdk-pixbuf-config script installed by GDK_PIXBUF could not be found" echo "*** If GDK_PIXBUF was installed in PREFIX, make sure PREFIX/bin is in" echo "*** your path, or set the GDK_PIXBUF_CONFIG environment variable to the" echo "*** full path to gdk-pixbuf-config." else if test -f conf.gdk_pixbuftest ; then : else echo "*** Could not run GDK_PIXBUF test program, checking why..." CFLAGS="$CFLAGS $GDK_PIXBUF_CFLAGS" LIBS="$LIBS $GDK_PIXBUF_LIBS" AC_TRY_LINK([ #include #include ], [ return 0; ], [ echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding GDK_PIXBUF or finding the wrong" echo "*** version of GDK_PIXBUF. If it is not finding GDK_PIXBUF, you'll need to set your" echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" echo "*** to the installed location Also, make sure you have run ldconfig if that" echo "*** is required on your system" echo "***" echo "*** If you have an old version installed, it is best to remove it, although" echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"], [ echo "*** The test program failed to compile or link. See the file config.log for the" echo "*** exact error that occured. This usually means GDK_PIXBUF was incorrectly installed" echo "*** or that you have moved GDK_PIXBUF since it was installed. In the latter case, you" echo "*** may want to edit the gdk-pixbuf-config script: $GDK_PIXBUF_CONFIG" ]) CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi fi GDK_PIXBUF_CFLAGS="" GDK_PIXBUF_LIBS="" ifelse([$3], , :, [$3]) fi AC_SUBST(GDK_PIXBUF_CFLAGS) AC_SUBST(GDK_PIXBUF_LIBS) rm -f conf.gdk_pixbuftest ]) # Copyright (C) 1995-2002 Free Software Foundation, Inc. # Copyright (C) 2001-2003,2004 Red Hat, Inc. # # This file is free software, distributed under the terms of the GNU # General Public License. As a special exception to the GNU General # Public License, this file may be distributed as part of a program # that contains a configuration script generated by Autoconf, under # the same distribution terms as the rest of that program. # # This file can be copied and used freely without restrictions. It can # be used in projects which are not available under the GNU Public License # but which still want to provide support for the GNU gettext functionality. # # Macro to add for using GNU gettext. # Ulrich Drepper , 1995, 1996 # # Modified to never use included libintl. # Owen Taylor , 12/15/1998 # # Major rework to remove unused code # Owen Taylor , 12/11/2002 # # Added better handling of ALL_LINGUAS from GNU gettext version # written by Bruno Haible, Owen Taylor 5/30/3002 # # Modified to require ngettext # Matthias Clasen 08/06/2004 # # We need this here as well, since someone might use autoconf-2.5x # to configure GLib then an older version to configure a package # using AM_GLIB_GNU_GETTEXT AC_PREREQ(2.53) dnl dnl We go to great lengths to make sure that aclocal won't dnl try to pull in the installed version of these macros dnl when running aclocal in the glib directory. dnl m4_copy([AC_DEFUN],[glib_DEFUN]) m4_copy([AC_REQUIRE],[glib_REQUIRE]) dnl dnl At the end, if we're not within glib, we'll define the public dnl definitions in terms of our private definitions. dnl # GLIB_LC_MESSAGES #-------------------- glib_DEFUN([GLIB_LC_MESSAGES], [AC_CHECK_HEADERS([locale.h]) if test $ac_cv_header_locale_h = yes; then AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES, [AC_TRY_LINK([#include ], [return LC_MESSAGES], am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)]) if test $am_cv_val_LC_MESSAGES = yes; then AC_DEFINE(HAVE_LC_MESSAGES, 1, [Define if your file defines LC_MESSAGES.]) fi fi]) # GLIB_PATH_PROG_WITH_TEST #---------------------------- dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) glib_DEFUN([GLIB_PATH_PROG_WITH_TEST], [# Extract the first word of "$2", so it can be a program name with args. set dummy $2; ac_word=[$]2 AC_MSG_CHECKING([for $ac_word]) AC_CACHE_VAL(ac_cv_path_$1, [case "[$]$1" in /*) ac_cv_path_$1="[$]$1" # Let the user override the test with a path. ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in ifelse([$5], , $PATH, [$5]); do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then if [$3]; then ac_cv_path_$1="$ac_dir/$ac_word" break fi fi done IFS="$ac_save_ifs" dnl If no 4th arg is given, leave the cache variable unset, dnl so AC_PATH_PROGS will keep looking. ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" ])dnl ;; esac])dnl $1="$ac_cv_path_$1" if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then AC_MSG_RESULT([$]$1) else AC_MSG_RESULT(no) fi AC_SUBST($1)dnl ]) # GLIB_WITH_NLS #----------------- glib_DEFUN([GLIB_WITH_NLS], dnl NLS is obligatory [USE_NLS=yes AC_SUBST(USE_NLS) gt_cv_have_gettext=no CATOBJEXT=NONE XGETTEXT=: INTLLIBS= AC_CHECK_HEADER(libintl.h, [gt_cv_func_dgettext_libintl="no" libintl_extra_libs="" # # First check in libc # AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc, [AC_TRY_LINK([ #include ], [return !ngettext ("","", 1)], gt_cv_func_ngettext_libc=yes, gt_cv_func_ngettext_libc=no) ]) if test "$gt_cv_func_ngettext_libc" = "yes" ; then AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc, [AC_TRY_LINK([ #include ], [return !dgettext ("","")], gt_cv_func_dgettext_libc=yes, gt_cv_func_dgettext_libc=no) ]) fi if test "$gt_cv_func_ngettext_libc" = "yes" ; then AC_CHECK_FUNCS(bind_textdomain_codeset) fi # # If we don't have everything we want, check in libintl # if test "$gt_cv_func_dgettext_libc" != "yes" \ || test "$gt_cv_func_ngettext_libc" != "yes" \ || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then AC_CHECK_LIB(intl, bindtextdomain, [AC_CHECK_LIB(intl, ngettext, [AC_CHECK_LIB(intl, dgettext, gt_cv_func_dgettext_libintl=yes)])]) if test "$gt_cv_func_dgettext_libintl" != "yes" ; then AC_MSG_CHECKING([if -liconv is needed to use gettext]) AC_MSG_RESULT([]) AC_CHECK_LIB(intl, ngettext, [AC_CHECK_LIB(intl, dcgettext, [gt_cv_func_dgettext_libintl=yes libintl_extra_libs=-liconv], :,-liconv)], :,-liconv) fi # # If we found libintl, then check in it for bind_textdomain_codeset(); # we'll prefer libc if neither have bind_textdomain_codeset(), # and both have dgettext and ngettext # if test "$gt_cv_func_dgettext_libintl" = "yes" ; then glib_save_LIBS="$LIBS" LIBS="$LIBS -lintl $libintl_extra_libs" unset ac_cv_func_bind_textdomain_codeset AC_CHECK_FUNCS(bind_textdomain_codeset) LIBS="$glib_save_LIBS" if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then gt_cv_func_dgettext_libc=no else if test "$gt_cv_func_dgettext_libc" = "yes" \ && test "$gt_cv_func_ngettext_libc" = "yes"; then gt_cv_func_dgettext_libintl=no fi fi fi fi if test "$gt_cv_func_dgettext_libc" = "yes" \ || test "$gt_cv_func_dgettext_libintl" = "yes"; then gt_cv_have_gettext=yes fi if test "$gt_cv_func_dgettext_libintl" = "yes"; then INTLLIBS="-lintl $libintl_extra_libs" fi if test "$gt_cv_have_gettext" = "yes"; then AC_DEFINE(HAVE_GETTEXT,1, [Define if the GNU gettext() function is already present or preinstalled.]) GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl if test "$MSGFMT" != "no"; then glib_save_LIBS="$LIBS" LIBS="$LIBS $INTLLIBS" AC_CHECK_FUNCS(dcgettext) AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) AC_TRY_LINK(, [extern int _nl_msg_cat_cntr; return _nl_msg_cat_cntr], [CATOBJEXT=.gmo DATADIRNAME=share], [case $host in *-*-solaris*) dnl On Solaris, if bind_textdomain_codeset is in libc, dnl GNU format message catalog is always supported, dnl since both are added to the libc all together. dnl Hence, we'd like to go with DATADIRNAME=share and dnl and CATOBJEXT=.gmo in this case. AC_CHECK_FUNC(bind_textdomain_codeset, [CATOBJEXT=.gmo DATADIRNAME=share], [CATOBJEXT=.mo DATADIRNAME=lib]) ;; *) CATOBJEXT=.mo DATADIRNAME=lib ;; esac]) LIBS="$glib_save_LIBS" INSTOBJEXT=.mo else gt_cv_have_gettext=no fi fi ]) if test "$gt_cv_have_gettext" = "yes" ; then AC_DEFINE(ENABLE_NLS, 1, [always defined to indicate that i18n is enabled]) fi dnl Test whether we really found GNU xgettext. if test "$XGETTEXT" != ":"; then dnl If it is not GNU xgettext we define it as : so that the dnl Makefiles still can work. if $XGETTEXT --omit-header /dev/null 2> /dev/null; then : ; else AC_MSG_RESULT( [found xgettext program is not GNU xgettext; ignore it]) XGETTEXT=":" fi fi # We need to process the po/ directory. POSUB=po AC_OUTPUT_COMMANDS( [case "$CONFIG_FILES" in *po/Makefile.in*) sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile esac]) dnl These rules are solely for the distribution goal. While doing this dnl we only have to keep exactly one list of the available catalogs dnl in configure.in. for lang in $ALL_LINGUAS; do GMOFILES="$GMOFILES $lang.gmo" POFILES="$POFILES $lang.po" done dnl Make all variables we use known to autoconf. AC_SUBST(CATALOGS) AC_SUBST(CATOBJEXT) AC_SUBST(DATADIRNAME) AC_SUBST(GMOFILES) AC_SUBST(INSTOBJEXT) AC_SUBST(INTLLIBS) AC_SUBST(PO_IN_DATADIR_TRUE) AC_SUBST(PO_IN_DATADIR_FALSE) AC_SUBST(POFILES) AC_SUBST(POSUB) ]) # AM_GLIB_GNU_GETTEXT # ------------------- # Do checks necessary for use of gettext. If a suitable implementation # of gettext is found in either in libintl or in the C library, # it will set INTLLIBS to the libraries needed for use of gettext # and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable # gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST() # on various variables needed by the Makefile.in.in installed by # glib-gettextize. dnl glib_DEFUN([GLIB_GNU_GETTEXT], [AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_HEADER_STDC])dnl GLIB_LC_MESSAGES GLIB_WITH_NLS if test "$gt_cv_have_gettext" = "yes"; then if test "x$ALL_LINGUAS" = "x"; then LINGUAS= else AC_MSG_CHECKING(for catalogs to be installed) NEW_LINGUAS= for presentlang in $ALL_LINGUAS; do useit=no if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then desiredlanguages="$LINGUAS" else desiredlanguages="$ALL_LINGUAS" fi for desiredlang in $desiredlanguages; do # Use the presentlang catalog if desiredlang is # a. equal to presentlang, or # b. a variant of presentlang (because in this case, # presentlang can be used as a fallback for messages # which are not translated in the desiredlang catalog). case "$desiredlang" in "$presentlang"*) useit=yes;; esac done if test $useit = yes; then NEW_LINGUAS="$NEW_LINGUAS $presentlang" fi done LINGUAS=$NEW_LINGUAS AC_MSG_RESULT($LINGUAS) fi dnl Construct list of names of catalog files to be constructed. if test -n "$LINGUAS"; then for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done fi fi dnl Generate list of files to be processed by xgettext which will dnl be included in po/Makefile. test -d po || mkdir po if test "x$srcdir" != "x."; then if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then posrcprefix="$srcdir/" else posrcprefix="../$srcdir/" fi else posrcprefix="../" fi rm -f po/POTFILES sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ < $srcdir/po/POTFILES.in > po/POTFILES ]) # AM_GLIB_DEFINE_LOCALEDIR(VARIABLE) # ------------------------------- # Define VARIABLE to the location where catalog files will # be installed by po/Makefile. glib_DEFUN([GLIB_DEFINE_LOCALEDIR], [glib_REQUIRE([GLIB_GNU_GETTEXT])dnl glib_save_prefix="$prefix" glib_save_exec_prefix="$exec_prefix" test "x$prefix" = xNONE && prefix=$ac_default_prefix test "x$exec_prefix" = xNONE && exec_prefix=$prefix if test "x$CATOBJEXT" = "x.mo" ; then localedir=`eval echo "${libdir}/locale"` else localedir=`eval echo "${datadir}/locale"` fi prefix="$glib_save_prefix" exec_prefix="$glib_save_exec_prefix" AC_DEFINE_UNQUOTED($1, "$localedir", [Define the location where the catalogs will be installed]) ]) dnl dnl Now the definitions that aclocal will find dnl ifdef(glib_configure_in,[],[ AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)]) AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)]) ])dnl # Configure paths for GLIB # Owen Taylor 97-11-3 dnl AM_PATH_GLIB([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]]) dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if "gmodule" or dnl gthread is specified in MODULES, pass to glib-config dnl AC_DEFUN([AM_PATH_GLIB], [dnl dnl Get the cflags and libraries from the glib-config script dnl AC_ARG_WITH(glib-prefix,[ --with-glib-prefix=PFX Prefix where GLIB is installed (optional)], glib_config_prefix="$withval", glib_config_prefix="") AC_ARG_WITH(glib-exec-prefix,[ --with-glib-exec-prefix=PFX Exec prefix where GLIB is installed (optional)], glib_config_exec_prefix="$withval", glib_config_exec_prefix="") AC_ARG_ENABLE(glibtest, [ --disable-glibtest Do not try to compile and run a test GLIB program], , enable_glibtest=yes) if test x$glib_config_exec_prefix != x ; then glib_config_args="$glib_config_args --exec-prefix=$glib_config_exec_prefix" if test x${GLIB_CONFIG+set} != xset ; then GLIB_CONFIG=$glib_config_exec_prefix/bin/glib-config fi fi if test x$glib_config_prefix != x ; then glib_config_args="$glib_config_args --prefix=$glib_config_prefix" if test x${GLIB_CONFIG+set} != xset ; then GLIB_CONFIG=$glib_config_prefix/bin/glib-config fi fi for module in . $4 do case "$module" in gmodule) glib_config_args="$glib_config_args gmodule" ;; gthread) glib_config_args="$glib_config_args gthread" ;; esac done AC_PATH_PROG(GLIB_CONFIG, glib-config, no) min_glib_version=ifelse([$1], ,0.99.7,$1) AC_MSG_CHECKING(for GLIB - version >= $min_glib_version) no_glib="" if test "$GLIB_CONFIG" = "no" ; then no_glib=yes else GLIB_CFLAGS=`$GLIB_CONFIG $glib_config_args --cflags` GLIB_LIBS=`$GLIB_CONFIG $glib_config_args --libs` glib_config_major_version=`$GLIB_CONFIG $glib_config_args --version | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` glib_config_minor_version=`$GLIB_CONFIG $glib_config_args --version | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` glib_config_micro_version=`$GLIB_CONFIG $glib_config_args --version | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` if test "x$enable_glibtest" = "xyes" ; then ac_save_CFLAGS="$CFLAGS" ac_save_LIBS="$LIBS" CFLAGS="$CFLAGS $GLIB_CFLAGS" LIBS="$GLIB_LIBS $LIBS" dnl dnl Now check if the installed GLIB is sufficiently new. (Also sanity dnl checks the results of glib-config to some extent dnl rm -f conf.glibtest AC_TRY_RUN([ #include #include #include int main () { int major, minor, micro; char *tmp_version; system ("touch conf.glibtest"); /* HP/UX 9 (%@#!) writes to sscanf strings */ tmp_version = g_strdup("$min_glib_version"); if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { printf("%s, bad version string\n", "$min_glib_version"); exit(1); } if ((glib_major_version != $glib_config_major_version) || (glib_minor_version != $glib_config_minor_version) || (glib_micro_version != $glib_config_micro_version)) { printf("\n*** 'glib-config --version' returned %d.%d.%d, but GLIB (%d.%d.%d)\n", $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version, glib_major_version, glib_minor_version, glib_micro_version); printf ("*** was found! If glib-config was correct, then it is best\n"); printf ("*** to remove the old version of GLIB. You may also be able to fix the error\n"); printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); printf("*** required on your system.\n"); printf("*** If glib-config was wrong, set the environment variable GLIB_CONFIG\n"); printf("*** to point to the correct copy of glib-config, and remove the file config.cache\n"); printf("*** before re-running configure\n"); } else if ((glib_major_version != GLIB_MAJOR_VERSION) || (glib_minor_version != GLIB_MINOR_VERSION) || (glib_micro_version != GLIB_MICRO_VERSION)) { printf("*** GLIB header files (version %d.%d.%d) do not match\n", GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION); printf("*** library (version %d.%d.%d)\n", glib_major_version, glib_minor_version, glib_micro_version); } else { if ((glib_major_version > major) || ((glib_major_version == major) && (glib_minor_version > minor)) || ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro))) { return 0; } else { printf("\n*** An old version of GLIB (%d.%d.%d) was found.\n", glib_major_version, glib_minor_version, glib_micro_version); printf("*** You need a version of GLIB newer than %d.%d.%d. The latest version of\n", major, minor, micro); printf("*** GLIB is always available from ftp://ftp.gtk.org.\n"); printf("***\n"); printf("*** If you have already installed a sufficiently new version, this error\n"); printf("*** probably means that the wrong copy of the glib-config shell script is\n"); printf("*** being found. The easiest way to fix this is to remove the old version\n"); printf("*** of GLIB, but you can also set the GLIB_CONFIG environment to point to the\n"); printf("*** correct copy of glib-config. (In this case, you will have to\n"); printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); printf("*** so that the correct libraries are found at run-time))\n"); } } return 1; } ],, no_glib=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi fi if test "x$no_glib" = x ; then AC_MSG_RESULT(yes) ifelse([$2], , :, [$2]) else AC_MSG_RESULT(no) if test "$GLIB_CONFIG" = "no" ; then echo "*** The glib-config script installed by GLIB could not be found" echo "*** If GLIB was installed in PREFIX, make sure PREFIX/bin is in" echo "*** your path, or set the GLIB_CONFIG environment variable to the" echo "*** full path to glib-config." else if test -f conf.glibtest ; then : else echo "*** Could not run GLIB test program, checking why..." CFLAGS="$CFLAGS $GLIB_CFLAGS" LIBS="$LIBS $GLIB_LIBS" AC_TRY_LINK([ #include #include ], [ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ], [ echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding GLIB or finding the wrong" echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your" echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" echo "*** to the installed location Also, make sure you have run ldconfig if that" echo "*** is required on your system" echo "***" echo "*** If you have an old version installed, it is best to remove it, although" echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" echo "***" echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that" echo "*** came with the system with the command" echo "***" echo "*** rpm --erase --nodeps gtk gtk-devel" ], [ echo "*** The test program failed to compile or link. See the file config.log for the" echo "*** exact error that occured. This usually means GLIB was incorrectly installed" echo "*** or that you have moved GLIB since it was installed. In the latter case, you" echo "*** may want to edit the glib-config script: $GLIB_CONFIG" ]) CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi fi GLIB_CFLAGS="" GLIB_LIBS="" ifelse([$3], , :, [$3]) fi AC_SUBST(GLIB_CFLAGS) AC_SUBST(GLIB_LIBS) rm -f conf.glibtest ]) # Configure paths for GTK+ # Owen Taylor 97-11-3 dnl AM_PATH_GTK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]]) dnl Test for GTK, and define GTK_CFLAGS and GTK_LIBS dnl AC_DEFUN([AM_PATH_GTK], [dnl dnl Get the cflags and libraries from the gtk-config script dnl AC_ARG_WITH(gtk-prefix,[ --with-gtk-prefix=PFX Prefix where GTK is installed (optional)], gtk_config_prefix="$withval", gtk_config_prefix="") AC_ARG_WITH(gtk-exec-prefix,[ --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed (optional)], gtk_config_exec_prefix="$withval", gtk_config_exec_prefix="") AC_ARG_ENABLE(gtktest, [ --disable-gtktest Do not try to compile and run a test GTK program], , enable_gtktest=yes) for module in . $4 do case "$module" in gthread) gtk_config_args="$gtk_config_args gthread" ;; esac done if test x$gtk_config_exec_prefix != x ; then gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix" if test x${GTK_CONFIG+set} != xset ; then GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config fi fi if test x$gtk_config_prefix != x ; then gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix" if test x${GTK_CONFIG+set} != xset ; then GTK_CONFIG=$gtk_config_prefix/bin/gtk-config fi fi AC_PATH_PROG(GTK_CONFIG, gtk-config, no) min_gtk_version=ifelse([$1], ,0.99.7,$1) AC_MSG_CHECKING(for GTK - version >= $min_gtk_version) no_gtk="" if test "$GTK_CONFIG" = "no" ; then no_gtk=yes else GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags` GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs` gtk_config_major_version=`$GTK_CONFIG $gtk_config_args --version | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` gtk_config_minor_version=`$GTK_CONFIG $gtk_config_args --version | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` gtk_config_micro_version=`$GTK_CONFIG $gtk_config_args --version | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` if test "x$enable_gtktest" = "xyes" ; then ac_save_CFLAGS="$CFLAGS" ac_save_LIBS="$LIBS" CFLAGS="$CFLAGS $GTK_CFLAGS" LIBS="$GTK_LIBS $LIBS" dnl dnl Now check if the installed GTK is sufficiently new. (Also sanity dnl checks the results of gtk-config to some extent dnl rm -f conf.gtktest AC_TRY_RUN([ #include #include #include int main () { int major, minor, micro; char *tmp_version; system ("touch conf.gtktest"); /* HP/UX 9 (%@#!) writes to sscanf strings */ tmp_version = g_strdup("$min_gtk_version"); if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { printf("%s, bad version string\n", "$min_gtk_version"); exit(1); } if ((gtk_major_version != $gtk_config_major_version) || (gtk_minor_version != $gtk_config_minor_version) || (gtk_micro_version != $gtk_config_micro_version)) { printf("\n*** 'gtk-config --version' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n", $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version, gtk_major_version, gtk_minor_version, gtk_micro_version); printf ("*** was found! If gtk-config was correct, then it is best\n"); printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n"); printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); printf("*** required on your system.\n"); printf("*** If gtk-config was wrong, set the environment variable GTK_CONFIG\n"); printf("*** to point to the correct copy of gtk-config, and remove the file config.cache\n"); printf("*** before re-running configure\n"); } #if defined (GTK_MAJOR_VERSION) && defined (GTK_MINOR_VERSION) && defined (GTK_MICRO_VERSION) else if ((gtk_major_version != GTK_MAJOR_VERSION) || (gtk_minor_version != GTK_MINOR_VERSION) || (gtk_micro_version != GTK_MICRO_VERSION)) { printf("*** GTK+ header files (version %d.%d.%d) do not match\n", GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION); printf("*** library (version %d.%d.%d)\n", gtk_major_version, gtk_minor_version, gtk_micro_version); } #endif /* defined (GTK_MAJOR_VERSION) ... */ else { if ((gtk_major_version > major) || ((gtk_major_version == major) && (gtk_minor_version > minor)) || ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro))) { return 0; } else { printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n", gtk_major_version, gtk_minor_version, gtk_micro_version); printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n", major, minor, micro); printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n"); printf("***\n"); printf("*** If you have already installed a sufficiently new version, this error\n"); printf("*** probably means that the wrong copy of the gtk-config shell script is\n"); printf("*** being found. The easiest way to fix this is to remove the old version\n"); printf("*** of GTK+, but you can also set the GTK_CONFIG environment to point to the\n"); printf("*** correct copy of gtk-config. (In this case, you will have to\n"); printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); printf("*** so that the correct libraries are found at run-time))\n"); } } return 1; } ],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi fi if test "x$no_gtk" = x ; then AC_MSG_RESULT(yes) ifelse([$2], , :, [$2]) else AC_MSG_RESULT(no) if test "$GTK_CONFIG" = "no" ; then echo "*** The gtk-config script installed by GTK could not be found" echo "*** If GTK was installed in PREFIX, make sure PREFIX/bin is in" echo "*** your path, or set the GTK_CONFIG environment variable to the" echo "*** full path to gtk-config." else if test -f conf.gtktest ; then : else echo "*** Could not run GTK test program, checking why..." CFLAGS="$CFLAGS $GTK_CFLAGS" LIBS="$LIBS $GTK_LIBS" AC_TRY_LINK([ #include #include ], [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ], [ echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding GTK or finding the wrong" echo "*** version of GTK. If it is not finding GTK, you'll need to set your" echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" echo "*** to the installed location Also, make sure you have run ldconfig if that" echo "*** is required on your system" echo "***" echo "*** If you have an old version installed, it is best to remove it, although" echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" echo "***" echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that" echo "*** came with the system with the command" echo "***" echo "*** rpm --erase --nodeps gtk gtk-devel" ], [ echo "*** The test program failed to compile or link. See the file config.log for the" echo "*** exact error that occured. This usually means GTK was incorrectly installed" echo "*** or that you have moved GTK since it was installed. In the latter case, you" echo "*** may want to edit the gtk-config script: $GTK_CONFIG" ]) CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi fi GTK_CFLAGS="" GTK_LIBS="" ifelse([$3], , :, [$3]) fi AC_SUBST(GTK_CFLAGS) AC_SUBST(GTK_LIBS) rm -f conf.gtktest ]) dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml]) # serial 2 IT_PROG_INTLTOOL AC_DEFUN([IT_PROG_INTLTOOL], [ if test -n "$1"; then AC_MSG_CHECKING(for intltool >= $1) INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ printf "%d", $[1] * 100 + $[2]; }'` INTLTOOL_APPLIED_VERSION=`awk -F\" '/\\$VERSION / { printf $[2]; }' < ${ac_aux_dir}/intltool-update.in` changequote({{,}}) INTLTOOL_APPLIED_VERSION_AS_INT=`awk -F\" '/\\$VERSION / { split(${{2}}, VERSION, "."); printf "%d\n", VERSION[1] * 100 + VERSION[2];}' < ${ac_aux_dir}/intltool-update.in` changequote([,]) if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT"; then AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found]) else AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found. Your intltool is too old. You need intltool $1 or later.]) exit 1 fi fi INTLTOOL_DESKTOP_RULE='%.desktop: %.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_KEYS_RULE='%.keys: %.keys.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_PROP_RULE='%.prop: %.prop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< [$]@' INTLTOOL_PONG_RULE='%.pong: %.pong.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_SERVER_RULE='%.server: %.server.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_SHEET_RULE='%.sheet: %.sheet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_UI_RULE='%.ui: %.ui.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_XML_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< [$]@' INTLTOOL_XAM_RULE='%.xam: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_KBD_RULE='%.kbd: %.kbd.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_CAVES_RULE='%.caves: %.caves.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_SCHEMAS_RULE='%.schemas: %.schemas.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_THEME_RULE='%.theme: %.theme.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' AC_SUBST(INTLTOOL_DESKTOP_RULE) AC_SUBST(INTLTOOL_DIRECTORY_RULE) AC_SUBST(INTLTOOL_KEYS_RULE) AC_SUBST(INTLTOOL_PROP_RULE) AC_SUBST(INTLTOOL_OAF_RULE) AC_SUBST(INTLTOOL_PONG_RULE) AC_SUBST(INTLTOOL_SERVER_RULE) AC_SUBST(INTLTOOL_SHEET_RULE) AC_SUBST(INTLTOOL_SOUNDLIST_RULE) AC_SUBST(INTLTOOL_UI_RULE) AC_SUBST(INTLTOOL_XAM_RULE) AC_SUBST(INTLTOOL_KBD_RULE) AC_SUBST(INTLTOOL_XML_RULE) AC_SUBST(INTLTOOL_XML_NOMERGE_RULE) AC_SUBST(INTLTOOL_CAVES_RULE) AC_SUBST(INTLTOOL_SCHEMAS_RULE) AC_SUBST(INTLTOOL_THEME_RULE) # Use the tools built into the package, not the ones that are installed. INTLTOOL_EXTRACT='$(top_builddir)/intltool-extract' INTLTOOL_MERGE='$(top_builddir)/intltool-merge' INTLTOOL_UPDATE='$(top_builddir)/intltool-update' AC_SUBST(INTLTOOL_EXTRACT) AC_SUBST(INTLTOOL_MERGE) AC_SUBST(INTLTOOL_UPDATE) AC_PATH_PROG(INTLTOOL_PERL, perl) if test -z "$INTLTOOL_PERL"; then AC_MSG_ERROR([perl not found; required for intltool]) fi if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then AC_MSG_ERROR([perl 5.x required for intltool]) fi if test "x$2" != "xno-xml"; then AC_MSG_CHECKING([for XML::Parser]) if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then AC_MSG_RESULT([ok]) else AC_MSG_ERROR([XML::Parser perl module is required for intltool]) fi fi AC_PATH_PROG(INTLTOOL_ICONV, iconv, iconv) AC_PATH_PROG(INTLTOOL_MSGFMT, msgfmt, msgfmt) AC_PATH_PROG(INTLTOOL_MSGMERGE, msgmerge, msgmerge) AC_PATH_PROG(INTLTOOL_XGETTEXT, xgettext, xgettext) # Remove file type tags (using []) from po/POTFILES. ifdef([AC_DIVERSION_ICMDS],[ AC_DIVERT_PUSH(AC_DIVERSION_ICMDS) [mv -f po/POTFILES po/POTFILES.tmp sed -e '/[[]encoding.*]/d' -e 's/[[].*] *//' < po/POTFILES.tmp > po/POTFILES rm -f po/POTFILES.tmp ]dnl AC_DIVERT_POP() ],[ ifdef([AC_CONFIG_COMMANDS_PRE],[ AC_CONFIG_COMMANDS_PRE([ [mv -f po/POTFILES po/POTFILES.tmp sed -e '/[[]encoding.*]/d' -e 's/[[].*] *//' < po/POTFILES.tmp > po/POTFILES rm -f po/POTFILES.tmp ]dnl ]) ]) ]) # Manually sed perl in so people don't have to put the intltool scripts in AC_OUTPUT. AC_CONFIG_COMMANDS([intltool], [ intltool_edit="-e 's#@INTLTOOL_EXTRACT@#`pwd`/intltool-extract#g' \ -e 's#@INTLTOOL_ICONV@#${INTLTOOL_ICONV}#g' \ -e 's#@INTLTOOL_MSGFMT@#${INTLTOOL_MSGFMT}#g' \ -e 's#@INTLTOOL_MSGMERGE@#${INTLTOOL_MSGMERGE}#g' \ -e 's#@INTLTOOL_XGETTEXT@#${INTLTOOL_XGETTEXT}#g' \ -e 's#@INTLTOOL_PERL@#${INTLTOOL_PERL}#g'" eval sed ${intltool_edit} < ${ac_aux_dir}/intltool-extract.in \ > intltool-extract.out if cmp -s intltool-extract intltool-extract.out 2>/dev/null; then rm -f intltool-extract.out else mv -f intltool-extract.out intltool-extract fi chmod ugo+x intltool-extract chmod u+w intltool-extract eval sed ${intltool_edit} < ${ac_aux_dir}/intltool-merge.in \ > intltool-merge.out if cmp -s intltool-merge intltool-merge.out 2>/dev/null; then rm -f intltool-merge.out else mv -f intltool-merge.out intltool-merge fi chmod ugo+x intltool-merge chmod u+w intltool-merge eval sed ${intltool_edit} < ${ac_aux_dir}/intltool-update.in \ > intltool-update.out if cmp -s intltool-update intltool-update.out 2>/dev/null; then rm -f intltool-update.out else mv -f intltool-update.out intltool-update fi chmod ugo+x intltool-update chmod u+w intltool-update ], INTLTOOL_PERL='${INTLTOOL_PERL}' ac_aux_dir=${ac_aux_dir} INTLTOOL_EXTRACT='${INTLTOOL_EXTRACT}' ICONV='${INTLTOOL_ICONV}' MSGFMT='${INTLTOOL_MSGFMT}' MSGMERGE='${INTLTOOL_MSGMERGE}' XGETTEXT='${INTLTOOL_XGETTEXT}') ]) # deprecated macros AC_DEFUN([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL($@)]) # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # serial 48 AC_PROG_LIBTOOL # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) # ----------------------------------------------------------- # If this macro is not defined by Autoconf, define it here. m4_ifdef([AC_PROVIDE_IFELSE], [], [m4_define([AC_PROVIDE_IFELSE], [m4_ifdef([AC_PROVIDE_$1], [$2], [$3])])]) # AC_PROG_LIBTOOL # --------------- AC_DEFUN([AC_PROG_LIBTOOL], [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. AC_PROVIDE_IFELSE([AC_PROG_CXX], [AC_LIBTOOL_CXX], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX ])]) dnl And a similar setup for Fortran 77 support AC_PROVIDE_IFELSE([AC_PROG_F77], [AC_LIBTOOL_F77], [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 ])]) dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. AC_PROVIDE_IFELSE([AC_PROG_GCJ], [AC_LIBTOOL_GCJ], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], [AC_LIBTOOL_GCJ], [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], [AC_LIBTOOL_GCJ], [ifdef([AC_PROG_GCJ], [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) ifdef([A][M_PROG_GCJ], [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) ifdef([LT_AC_PROG_GCJ], [define([LT_AC_PROG_GCJ], defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) ])])# AC_PROG_LIBTOOL # _AC_PROG_LIBTOOL # ---------------- AC_DEFUN([_AC_PROG_LIBTOOL], [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl # Prevent multiple expansion define([AC_PROG_LIBTOOL], []) ])# _AC_PROG_LIBTOOL # AC_LIBTOOL_SETUP # ---------------- AC_DEFUN([AC_LIBTOOL_SETUP], [AC_PREREQ(2.50)dnl AC_REQUIRE([AC_ENABLE_SHARED])dnl AC_REQUIRE([AC_ENABLE_STATIC])dnl AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_PROG_LD])dnl AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl AC_REQUIRE([AC_PROG_NM])dnl AC_REQUIRE([AC_PROG_LN_S])dnl AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! AC_REQUIRE([AC_OBJEXT])dnl AC_REQUIRE([AC_EXEEXT])dnl dnl AC_LIBTOOL_SYS_MAX_CMD_LEN AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE AC_LIBTOOL_OBJDIR AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl _LT_AC_PROG_ECHO_BACKSLASH case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed='sed -e 1s/^X//' [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] # Same as above, but do not quote variable references. [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' # Constants: rm="rm -f" # Global variables: default_ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a ltmain="$ac_aux_dir/ltmain.sh" ofile="$default_ofile" with_gnu_ld="$lt_cv_prog_gnu_ld" AC_CHECK_TOOL(AR, ar, false) AC_CHECK_TOOL(RANLIB, ranlib, :) AC_CHECK_TOOL(STRIP, strip, :) old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$AR" && AR=ar test -z "$AR_FLAGS" && AR_FLAGS=cru test -z "$AS" && AS=as test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$DLLTOOL" && DLLTOOL=dlltool test -z "$LD" && LD=ld test -z "$LN_S" && LN_S="ln -s" test -z "$MAGIC_CMD" && MAGIC_CMD=file test -z "$NM" && NM=nm test -z "$SED" && SED=sed test -z "$OBJDUMP" && OBJDUMP=objdump test -z "$RANLIB" && RANLIB=: test -z "$STRIP" && STRIP=: test -z "$ac_objext" && ac_objext=o # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi _LT_CC_BASENAME([$compiler]) # Only perform the check for file, if the check method requires it case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then AC_PATH_MAGIC fi ;; esac AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], enable_win32_dll=yes, enable_win32_dll=no) AC_ARG_ENABLE([libtool-lock], [AC_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes AC_ARG_WITH([pic], [AC_HELP_STRING([--with-pic], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], [pic_mode="$withval"], [pic_mode=default]) test -z "$pic_mode" && pic_mode=default # Use C for the default configuration in the libtool script tagname= AC_LIBTOOL_LANG_C_CONFIG _LT_AC_TAGCONFIG ])# AC_LIBTOOL_SETUP # _LT_AC_SYS_COMPILER # ------------------- AC_DEFUN([_LT_AC_SYS_COMPILER], [AC_REQUIRE([AC_PROG_CC])dnl # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC ])# _LT_AC_SYS_COMPILER # _LT_CC_BASENAME(CC) # ------------------- # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. AC_DEFUN([_LT_CC_BASENAME], [for cc_temp in $1""; do case $cc_temp in compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` ]) # _LT_COMPILER_BOILERPLATE # ------------------------ # Check for compiler boilerplate output or warnings with # the simple compiler test code. AC_DEFUN([_LT_COMPILER_BOILERPLATE], [ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ])# _LT_COMPILER_BOILERPLATE # _LT_LINKER_BOILERPLATE # ---------------------- # Check for linker boilerplate output or warnings with # the simple link test code. AC_DEFUN([_LT_LINKER_BOILERPLATE], [ac_outfile=conftest.$ac_objext printf "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm conftest* ])# _LT_LINKER_BOILERPLATE # _LT_AC_SYS_LIBPATH_AIX # ---------------------- # Links a minimal program and checks the executable # for the system default hardcoded library path. In most cases, # this is /usr/lib:/lib, but when the MPI compilers are used # the location of the communication and MPI libs are included too. # If we don't find anything, use the default library path according # to the aix ld manual. AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], [AC_LINK_IFELSE(AC_LANG_PROGRAM,[ aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi],[]) if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ])# _LT_AC_SYS_LIBPATH_AIX # _LT_AC_SHELL_INIT(ARG) # ---------------------- AC_DEFUN([_LT_AC_SHELL_INIT], [ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], [AC_DIVERT_PUSH(NOTICE)]) $1 AC_DIVERT_POP ])# _LT_AC_SHELL_INIT # _LT_AC_PROG_ECHO_BACKSLASH # -------------------------- # Add some code to the start of the generated configure script which # will find an echo command which doesn't interpret backslashes. AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], [_LT_AC_SHELL_INIT([ # Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} case X$ECHO in X*--fallback-echo) # Remove one level of quotation (which was required for Make). ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` ;; esac echo=${ECHO-echo} if test "X[$]1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X[$]1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then # Yippee, $echo works! : else # Restart under the correct shell. exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} fi if test "X[$]1" = X--fallback-echo; then # used as fallback echo shift cat </dev/null 2>&1 && unset CDPATH if test -z "$ECHO"; then if test "X${echo_test_string+set}" != Xset; then # find a string as large as possible, as long as the shell can cope with it for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... if (echo_test_string=`eval $cmd`) 2>/dev/null && echo_test_string=`eval $cmd` && (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null then break fi done fi if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then : else # The Solaris, AIX, and Digital Unix default echo programs unquote # backslashes. This makes it impossible to quote backslashes using # echo "$something" | sed 's/\\/\\\\/g' # # So, first we look for a working echo in the user's PATH. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for dir in $PATH /usr/ucb; do IFS="$lt_save_ifs" if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$dir/echo" break fi done IFS="$lt_save_ifs" if test "X$echo" = Xecho; then # We didn't find a better echo, so look for alternatives. if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # This shell has a builtin print -r that does the trick. echo='print -r' elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && test "X$CONFIG_SHELL" != X/bin/ksh; then # If we have ksh, try running configure again with it. ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} export ORIGINAL_CONFIG_SHELL CONFIG_SHELL=/bin/ksh export CONFIG_SHELL exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} else # Try using printf. echo='printf %s\n' if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # Cool, printf works : elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL export CONFIG_SHELL SHELL="$CONFIG_SHELL" export SHELL echo="$CONFIG_SHELL [$]0 --fallback-echo" elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$CONFIG_SHELL [$]0 --fallback-echo" else # maybe with a smaller string... prev=: for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null then break fi prev="$cmd" done if test "$prev" != 'sed 50q "[$]0"'; then echo_test_string=`eval $prev` export echo_test_string exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} else # Oops. We lost completely, so just stick with echo. echo=echo fi fi fi fi fi fi # Copy echo and quote the copy suitably for passing to libtool from # the Makefile, instead of quoting the original, which is used later. ECHO=$echo if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" fi AC_SUBST(ECHO) ])])# _LT_AC_PROG_ECHO_BACKSLASH # _LT_AC_LOCK # ----------- AC_DEFUN([_LT_AC_LOCK], [AC_ARG_ENABLE([libtool-lock], [AC_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '[#]line __oline__ "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_LANG_PUSH(C) AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) AC_LANG_POP]) if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; sparc*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) LD="${LD-ld} -m elf64_sparc" ;; *) LD="${LD-ld} -64" ;; esac ;; esac fi rm -rf conftest* ;; AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], [*-*-cygwin* | *-*-mingw* | *-*-pw32*) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) ;; ]) esac need_locks="$enable_libtool_lock" ])# _LT_AC_LOCK # AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------------------- # Check whether the given compiler option works AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [AC_REQUIRE([LT_AC_PROG_SED]) AC_CACHE_CHECK([$1], [$2], [$2=no ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$3" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi fi $rm conftest* ]) if test x"[$]$2" = xyes; then ifelse([$5], , :, [$5]) else ifelse([$6], , :, [$6]) fi ])# AC_LIBTOOL_COMPILER_OPTION # AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [ACTION-SUCCESS], [ACTION-FAILURE]) # ------------------------------------------------------------ # Check whether the given compiler option works AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $3" printf "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&AS_MESSAGE_LOG_FD $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi else $2=yes fi fi $rm conftest* LDFLAGS="$save_LDFLAGS" ]) if test x"[$]$2" = xyes; then ifelse([$4], , :, [$4]) else ifelse([$5], , :, [$5]) fi ])# AC_LIBTOOL_LINKER_OPTION # AC_LIBTOOL_SYS_MAX_CMD_LEN # -------------------------- AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [# find the maximum length of command line arguments AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ = "XX$teststring") >/dev/null 2>&1 && new_result=`expr "X$teststring" : ".*" 2>&1` && lt_cv_sys_max_cmd_len=$new_result && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done teststring= # Add a significant safety factor because C++ compilers can tack on massive # amounts of additional arguments before passing them to the linker. # It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` ;; esac ]) if test -n $lt_cv_sys_max_cmd_len ; then AC_MSG_RESULT($lt_cv_sys_max_cmd_len) else AC_MSG_RESULT(none) fi ])# AC_LIBTOOL_SYS_MAX_CMD_LEN # _LT_AC_CHECK_DLFCN # ------------------ AC_DEFUN([_LT_AC_CHECK_DLFCN], [AC_CHECK_HEADERS(dlfcn.h)dnl ])# _LT_AC_CHECK_DLFCN # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) # --------------------------------------------------------------------- AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl if test "$cross_compiling" = yes; then : [$4] else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } else puts (dlerror ()); exit (status); }] EOF if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) $1 ;; x$lt_dlneed_uscore) $2 ;; x$lt_dlunknown|x*) $3 ;; esac else : # compilation failed $3 fi fi rm -fr conftest* ])# _LT_AC_TRY_DLOPEN_SELF # AC_LIBTOOL_DLOPEN_SELF # ---------------------- AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) ;; *) AC_CHECK_FUNC([shl_load], [lt_cv_dlopen="shl_load"], [AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen="dlopen"], [AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) ]) ]) ]) ]) ]) ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" AC_CACHE_CHECK([whether a program can dlopen itself], lt_cv_dlopen_self, [dnl _LT_AC_TRY_DLOPEN_SELF( lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl _LT_AC_TRY_DLOPEN_SELF( lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) ]) fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi ])# AC_LIBTOOL_DLOPEN_SELF # AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) # --------------------------------- # Check to see if options -c and -o are simultaneously supported by compiler AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes fi fi chmod u+w . 2>&AS_MESSAGE_LOG_FD $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* ]) ])# AC_LIBTOOL_PROG_CC_C_O # AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) # ----------------------------------------- # Check to see if we can do hard links to lock some files if needed AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_REQUIRE([_LT_AC_LOCK])dnl hard_links="nottested" if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user AC_MSG_CHECKING([if we can lock with hard links]) hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no AC_MSG_RESULT([$hard_links]) if test "$hard_links" = no; then AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) need_locks=warn fi else need_locks=no fi ])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS # AC_LIBTOOL_OBJDIR # ----------------- AC_DEFUN([AC_LIBTOOL_OBJDIR], [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], [rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null]) objdir=$lt_cv_objdir ])# AC_LIBTOOL_OBJDIR # AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) # ---------------------------------------------- # Check hardcoding attributes. AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_MSG_CHECKING([how to hardcode library paths into programs]) _LT_AC_TAGVAR(hardcode_action, $1)= if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \ test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then # We can hardcode non-existant directories. if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then # Linking always hardcodes the temporary library directory. _LT_AC_TAGVAR(hardcode_action, $1)=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. _LT_AC_TAGVAR(hardcode_action, $1)=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. _LT_AC_TAGVAR(hardcode_action, $1)=unsupported fi AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi ])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH # AC_LIBTOOL_SYS_LIB_STRIP # ------------------------ AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], [striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" AC_MSG_RESULT([yes]) else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi ;; *) AC_MSG_RESULT([no]) ;; esac fi ])# AC_LIBTOOL_SYS_LIB_STRIP # AC_LIBTOOL_SYS_DYNAMIC_LINKER # ----------------------------- # PORTME Fill in your ld.so characteristics AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_MSG_CHECKING([dynamic linker characteristics]) library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix4* | aix5*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[[01]] | aix4.[[01]].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[[45]]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` else sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' fi sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; kfreebsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU ld.so' ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[[123]]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[[01]]* | freebsdelf3.[[01]]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; freebsd*) # from 4.6 on shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix3*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; knetbsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[[89]] | openbsd2.[[89]].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' shlibpath_overrides_runpath=no else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' shlibpath_overrides_runpath=yes case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac AC_MSG_RESULT([$dynamic_linker]) test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER # _LT_AC_TAGCONFIG # ---------------- AC_DEFUN([_LT_AC_TAGCONFIG], [AC_ARG_WITH([tags], [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], [include additional configurations @<:@automatic@:>@])], [tagnames="$withval"]) if test -f "$ltmain" && test -n "$tagnames"; then if test ! -f "${ofile}"; then AC_MSG_WARN([output file `$ofile' does not exist]) fi if test -z "$LTCC"; then eval "`$SHELL ${ofile} --config | grep '^LTCC='`" if test -z "$LTCC"; then AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) else AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) fi fi if test -z "$LTCFLAGS"; then eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" fi # Extract list of available tagged configurations in $ofile. # Note that this assumes the entire list is on one line. available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for tagname in $tagnames; do IFS="$lt_save_ifs" # Check whether tagname contains only valid characters case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in "") ;; *) AC_MSG_ERROR([invalid tag name: $tagname]) ;; esac if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null then AC_MSG_ERROR([tag name \"$tagname\" already exists]) fi # Update the list of available tags. if test -n "$tagname"; then echo appending configuration tag \"$tagname\" to $ofile case $tagname in CXX) if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then AC_LIBTOOL_LANG_CXX_CONFIG else tagname="" fi ;; F77) if test -n "$F77" && test "X$F77" != "Xno"; then AC_LIBTOOL_LANG_F77_CONFIG else tagname="" fi ;; GCJ) if test -n "$GCJ" && test "X$GCJ" != "Xno"; then AC_LIBTOOL_LANG_GCJ_CONFIG else tagname="" fi ;; RC) AC_LIBTOOL_LANG_RC_CONFIG ;; *) AC_MSG_ERROR([Unsupported tag name: $tagname]) ;; esac # Append the new tag name to the list of available tags. if test -n "$tagname" ; then available_tags="$available_tags $tagname" fi fi done IFS="$lt_save_ifs" # Now substitute the updated list of available tags. if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then mv "${ofile}T" "$ofile" chmod +x "$ofile" else rm -f "${ofile}T" AC_MSG_ERROR([unable to update list of available tagged configurations.]) fi fi ])# _LT_AC_TAGCONFIG # AC_LIBTOOL_DLOPEN # ----------------- # enable checks for dlopen support AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) ])# AC_LIBTOOL_DLOPEN # AC_LIBTOOL_WIN32_DLL # -------------------- # declare package support for building win32 DLLs AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) ])# AC_LIBTOOL_WIN32_DLL # AC_ENABLE_SHARED([DEFAULT]) # --------------------------- # implement the --enable-shared flag # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. AC_DEFUN([AC_ENABLE_SHARED], [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE([shared], [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_shared=]AC_ENABLE_SHARED_DEFAULT) ])# AC_ENABLE_SHARED # AC_DISABLE_SHARED # ----------------- # set the default shared flag to --disable-shared AC_DEFUN([AC_DISABLE_SHARED], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_SHARED(no) ])# AC_DISABLE_SHARED # AC_ENABLE_STATIC([DEFAULT]) # --------------------------- # implement the --enable-static flag # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. AC_DEFUN([AC_ENABLE_STATIC], [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE([static], [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_static=]AC_ENABLE_STATIC_DEFAULT) ])# AC_ENABLE_STATIC # AC_DISABLE_STATIC # ----------------- # set the default static flag to --disable-static AC_DEFUN([AC_DISABLE_STATIC], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_STATIC(no) ])# AC_DISABLE_STATIC # AC_ENABLE_FAST_INSTALL([DEFAULT]) # --------------------------------- # implement the --enable-fast-install flag # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. AC_DEFUN([AC_ENABLE_FAST_INSTALL], [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE([fast-install], [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT) ])# AC_ENABLE_FAST_INSTALL # AC_DISABLE_FAST_INSTALL # ----------------------- # set the default to --disable-fast-install AC_DEFUN([AC_DISABLE_FAST_INSTALL], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_FAST_INSTALL(no) ])# AC_DISABLE_FAST_INSTALL # AC_LIBTOOL_PICMODE([MODE]) # -------------------------- # implement the --with-pic flag # MODE is either `yes' or `no'. If omitted, it defaults to `both'. AC_DEFUN([AC_LIBTOOL_PICMODE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl pic_mode=ifelse($#,1,$1,default) ])# AC_LIBTOOL_PICMODE # AC_PROG_EGREP # ------------- # This is predefined starting with Autoconf 2.54, so this conditional # definition can be removed once we require Autoconf 2.54 or later. m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], [AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], [if echo a | (grep -E '(a|b)') >/dev/null 2>&1 then ac_cv_prog_egrep='grep -E' else ac_cv_prog_egrep='egrep' fi]) EGREP=$ac_cv_prog_egrep AC_SUBST([EGREP]) ])]) # AC_PATH_TOOL_PREFIX # ------------------- # find a file program which can recognise shared library AC_DEFUN([AC_PATH_TOOL_PREFIX], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, [case $MAGIC_CMD in [[\\/*] | ?:[\\/]*]) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR dnl $ac_dummy forces splitting on constant user-supplied paths. dnl POSIX.2 word splitting is done only on the output of word expansions, dnl not every word. This closes a longstanding sh security hole. ac_dummy="ifelse([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$1; then lt_cv_path_MAGIC_CMD="$ac_dir/$1" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac]) MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then AC_MSG_RESULT($MAGIC_CMD) else AC_MSG_RESULT(no) fi ])# AC_PATH_TOOL_PREFIX # AC_PATH_MAGIC # ------------- # find a file program which can recognise a shared library AC_DEFUN([AC_PATH_MAGIC], [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) else MAGIC_CMD=: fi fi ])# AC_PATH_MAGIC # AC_PROG_LD # ---------- # find the pathname to the GNU or non-GNU linker AC_DEFUN([AC_PROG_LD], [AC_ARG_WITH([gnu-ld], [AC_HELP_STRING([--with-gnu-ld], [assume the C compiler uses GNU ld @<:@default=no@:>@])], [test "$withval" = no || with_gnu_ld=yes], [with_gnu_ld=no]) AC_REQUIRE([LT_AC_PROG_SED])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by $CC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]]* | ?:[[\\/]]*) re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the pathname of ld ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(lt_cv_path_LD, [if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix3*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be Linux ELF. linux*) lt_cv_deplibs_check_method=pass_all ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; nto-qnx*) lt_cv_deplibs_check_method=unknown ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; esac ]) file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown ])# AC_DEPLIBS_CHECK_METHOD # AC_PROG_NM # ---------- # find the pathname to a BSD-compatible name lister AC_DEFUN([AC_PROG_NM], [AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm fi]) NM="$lt_cv_path_NM" ])# AC_PROG_NM # AC_CHECK_LIBM # ------------- # check for math library AC_DEFUN([AC_CHECK_LIBM], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") ;; *) AC_CHECK_LIB(m, cos, LIBM="-lm") ;; esac ])# AC_CHECK_LIBM # AC_LIBLTDL_CONVENIENCE([DIRECTORY]) # ----------------------------------- # sets LIBLTDL to the link flags for the libltdl convenience library and # LTDLINCL to the include flags for the libltdl header and adds # --enable-ltdl-convenience to the configure arguments. Note that # AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, # it is assumed to be `libltdl'. LIBLTDL will be prefixed with # '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/' # (note the single quotes!). If your package is not flat and you're not # using automake, define top_builddir and top_srcdir appropriately in # the Makefiles. AC_DEFUN([AC_LIBLTDL_CONVENIENCE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl case $enable_ltdl_convenience in no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; "") enable_ltdl_convenience=yes ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; esac LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) # For backwards non-gettext consistent compatibility... INCLTDL="$LTDLINCL" ])# AC_LIBLTDL_CONVENIENCE # AC_LIBLTDL_INSTALLABLE([DIRECTORY]) # ----------------------------------- # sets LIBLTDL to the link flags for the libltdl installable library and # LTDLINCL to the include flags for the libltdl header and adds # --enable-ltdl-install to the configure arguments. Note that # AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, # and an installed libltdl is not found, it is assumed to be `libltdl'. # LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with # '${top_srcdir}/' (note the single quotes!). If your package is not # flat and you're not using automake, define top_builddir and top_srcdir # appropriately in the Makefiles. # In the future, this macro may have to be called after AC_PROG_LIBTOOL. AC_DEFUN([AC_LIBLTDL_INSTALLABLE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_CHECK_LIB(ltdl, lt_dlinit, [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], [if test x"$enable_ltdl_install" = xno; then AC_MSG_WARN([libltdl not installed, but installation disabled]) else enable_ltdl_install=yes fi ]) if test x"$enable_ltdl_install" = x"yes"; then ac_configure_args="$ac_configure_args --enable-ltdl-install" LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) else ac_configure_args="$ac_configure_args --enable-ltdl-install=no" LIBLTDL="-lltdl" LTDLINCL= fi # For backwards non-gettext consistent compatibility... INCLTDL="$LTDLINCL" ])# AC_LIBLTDL_INSTALLABLE # AC_LIBTOOL_CXX # -------------- # enable support for C++ libraries AC_DEFUN([AC_LIBTOOL_CXX], [AC_REQUIRE([_LT_AC_LANG_CXX]) ])# AC_LIBTOOL_CXX # _LT_AC_LANG_CXX # --------------- AC_DEFUN([_LT_AC_LANG_CXX], [AC_REQUIRE([AC_PROG_CXX]) AC_REQUIRE([_LT_AC_PROG_CXXCPP]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) ])# _LT_AC_LANG_CXX # _LT_AC_PROG_CXXCPP # ------------------ AC_DEFUN([_LT_AC_PROG_CXXCPP], [ AC_REQUIRE([AC_PROG_CXX]) if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then AC_PROG_CXXCPP fi ])# _LT_AC_PROG_CXXCPP # AC_LIBTOOL_F77 # -------------- # enable support for Fortran 77 libraries AC_DEFUN([AC_LIBTOOL_F77], [AC_REQUIRE([_LT_AC_LANG_F77]) ])# AC_LIBTOOL_F77 # _LT_AC_LANG_F77 # --------------- AC_DEFUN([_LT_AC_LANG_F77], [AC_REQUIRE([AC_PROG_F77]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) ])# _LT_AC_LANG_F77 # AC_LIBTOOL_GCJ # -------------- # enable support for GCJ libraries AC_DEFUN([AC_LIBTOOL_GCJ], [AC_REQUIRE([_LT_AC_LANG_GCJ]) ])# AC_LIBTOOL_GCJ # _LT_AC_LANG_GCJ # --------------- AC_DEFUN([_LT_AC_LANG_GCJ], [AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) ])# _LT_AC_LANG_GCJ # AC_LIBTOOL_RC # ------------- # enable support for Windows resource files AC_DEFUN([AC_LIBTOOL_RC], [AC_REQUIRE([LT_AC_PROG_RC]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC]) ])# AC_LIBTOOL_RC # AC_LIBTOOL_LANG_C_CONFIG # ------------------------ # Ensure that the configuration vars for the C compiler are # suitably defined. Those variables are subsequently used by # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) AC_DEFUN([_LT_AC_LANG_C_CONFIG], [lt_save_CC="$CC" AC_LANG_PUSH(C) # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;\n" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}\n' _LT_AC_SYS_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) AC_LIBTOOL_PROG_COMPILER_PIC($1) AC_LIBTOOL_PROG_CC_C_O($1) AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) AC_LIBTOOL_PROG_LD_SHLIBS($1) AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) AC_LIBTOOL_SYS_LIB_STRIP AC_LIBTOOL_DLOPEN_SELF # Report which library types will actually be built AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix4* | aix5*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) AC_LIBTOOL_CONFIG($1) AC_LANG_POP CC="$lt_save_CC" ])# AC_LIBTOOL_LANG_C_CONFIG # AC_LIBTOOL_LANG_CXX_CONFIG # -------------------------- # Ensure that the configuration vars for the C compiler are # suitably defined. Those variables are subsequently used by # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) AC_DEFUN([_LT_AC_LANG_CXX_CONFIG], [AC_LANG_PUSH(C++) AC_REQUIRE([AC_PROG_CXX]) AC_REQUIRE([_LT_AC_PROG_CXXCPP]) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(allow_undefined_flag, $1)= _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(archive_expsym_cmds, $1)= _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= _LT_AC_TAGVAR(hardcode_minus_L, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(hardcode_automatic, $1)=no _LT_AC_TAGVAR(module_cmds, $1)= _LT_AC_TAGVAR(module_expsym_cmds, $1)= _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_AC_TAGVAR(no_undefined_flag, $1)= _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Dependencies to place before and after the object being linked: _LT_AC_TAGVAR(predep_objects, $1)= _LT_AC_TAGVAR(postdep_objects, $1)= _LT_AC_TAGVAR(predeps, $1)= _LT_AC_TAGVAR(postdeps, $1)= _LT_AC_TAGVAR(compiler_lib_search_path, $1)= # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;\n" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }\n' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_AC_SYS_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} compiler=$CC _LT_AC_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) # We don't want -fno-exception wen compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' else _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration AC_PROG_LD # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ grep 'no-whole-archive' > /dev/null; then _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) _LT_AC_TAGVAR(ld_shlibs, $1)=yes case $host_os in aix3*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_AC_TAGVAR(archive_cmds, $1)='' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes if test "$GXX" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 _LT_AC_TAGVAR(hardcode_direct, $1)=yes else # We have old collect2 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_AC_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared libraries. _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; darwin* | rhapsody*) case $host_os in rhapsody* | darwin1.[[012]]) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[[012]]) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_automatic, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes if test "$GXX" = yes ; then lt_int_apple_cc_single_mod=no output_verbose_link_cmd='echo' if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then lt_int_apple_cc_single_mod=yes fi if test "X$lt_int_apple_cc_single_mod" = Xyes ; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' fi _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds if test "X$lt_int_apple_cc_single_mod" = Xyes ; then _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' fi _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else case $cc_basename in xlc*) output_verbose_link_cmd='echo' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac fi ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; freebsd[[12]]*) # C++ shared libraries reported to be fairly broken before switch to ELF _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; freebsd-elf*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; freebsd* | kfreebsd*-gnu | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_AC_TAGVAR(ld_shlibs, $1)=yes ;; gnu*) ;; hpux9*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; aCC*) _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' ;; *) _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; aCC*) case $host_cpu in hppa*64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; interix3*) _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' fi fi _LT_AC_TAGVAR(link_all_deplibs, $1)=yes ;; esac _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ;; linux*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc*) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC*) # Portland Group C++ compiler _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; esac ;; lynxos*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; m88k*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; openbsd2*) # C++ shared libraries are fairly broken _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; openbsd*) _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd='echo' ;; osf3*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; cxx*) _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # the KAI C++ compiler. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; cxx*) _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~ $rm $lib.exp' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The C++ compiler is used as linker so we must use $wl # flag to pass the commands to the underlying system # linker. We must also pass each convience library through # to the system linker between allextract/defaultextract. # The C++ compiler will combine linker options so we # cannot just pass the convience library names through # without $wl. # Supported since Solaris 2.6 (maybe 2.5.1?) _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; esac _LT_AC_TAGVAR(link_all_deplibs, $1)=yes output_verbose_link_cmd='echo' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' if $CC --version | grep -v '^2\.7' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. # So that behaviour is only enabled if SCOABSPATH is set to a # non-empty value in the environment. Most likely only useful for # creating official distributions of packages. # This is a hack until libtool officially supports absolute path # names for shared libraries. _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_AC_TAGVAR(GCC, $1)="$GXX" _LT_AC_TAGVAR(LD, $1)="$LD" AC_LIBTOOL_POSTDEP_PREDEP($1) AC_LIBTOOL_PROG_COMPILER_PIC($1) AC_LIBTOOL_PROG_CC_C_O($1) AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) AC_LIBTOOL_PROG_LD_SHLIBS($1) AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) AC_LIBTOOL_CONFIG($1) AC_LANG_POP CC=$lt_save_CC LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ldcxx=$with_gnu_ld with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld ])# AC_LIBTOOL_LANG_CXX_CONFIG # AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME]) # ------------------------------------ # Figure out "hidden" library dependencies from verbose # compiler output when linking a shared library. # Parse the compiler output and extract the necessary # objects, libraries and library flags. AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[ dnl we can't use the lt_simple_compile_test_code here, dnl because it contains code intended for an executable, dnl not a library. It's possible we should let each dnl tag define a new lt_????_link_test_code variable, dnl but it's only used here... ifelse([$1],[],[cat > conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext <> "$cfgfile" ifelse([$1], [], [#! $SHELL # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 # Free Software Foundation, Inc. # # This file is part of GNU Libtool: # Originally by Gordon Matzigkeit , 1996 # # 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="$SED -e 1s/^X//" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # The names of the tagged configurations supported by this script. available_tags= # ### BEGIN LIBTOOL CONFIG], [# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_[]_LT_AC_TAGVAR(compiler, $1) # Is the compiler the GNU C compiler? with_gcc=$_LT_AC_TAGVAR(GCC, $1) # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_[]_LT_AC_TAGVAR(LD, $1) # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) # Commands used to build and install a shared archive. archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1) module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) # Flag that forces no undefined symbols. no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1) # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)" # Set to yes if exported symbols are required. always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) # The commands to list exported symbols. export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) # Symbols that must always be exported. include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) ifelse([$1],[], [# ### END LIBTOOL CONFIG], [# ### END LIBTOOL TAG CONFIG: $tagname]) __EOF__ ifelse([$1],[], [ case $host_os in aix3*) cat <<\EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi EOF ;; esac # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || \ (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ]) else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ])# AC_LIBTOOL_CONFIG # AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) # ------------------------------------------- AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= if test "$GCC" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], lt_cv_prog_compiler_rtti_exceptions, [-fno-rtti -fno-exceptions], [], [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) fi ])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE # --------------------------------- AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([AC_PROG_NM]) AC_REQUIRE([AC_OBJEXT]) # Check for command to grab the raw symbol name followed by C symbol from nm. AC_MSG_CHECKING([command to parse $NM output from $compiler object]) AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [ # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[[BCDEGRST]]' # Regexp to match symbols that can be accessed directly from C. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' # Transform an extracted symbol line into a proper C declaration lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" # Define system-specific variables. case $host_os in aix*) symcode='[[BCDT]]' ;; cygwin* | mingw* | pw32*) symcode='[[ABCDGISTW]]' ;; hpux*) # Its linker distinguishes data from code symbols if test "$host_cpu" = ia64; then symcode='[[ABCDEGRST]]' fi lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" ;; linux*) if test "$host_cpu" = ia64; then symcode='[[ABCDGIRSTW]]' lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" fi ;; irix* | nonstopux*) symcode='[[BCDEGRST]]' ;; osf*) symcode='[[BCDEGQRST]]' ;; solaris*) symcode='[[BDRT]]' ;; sco3.2v5*) symcode='[[DT]]' ;; sysv4.2uw2*) symcode='[[DT]]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[[ABDT]]' ;; sysv4) symcode='[[DFNSTU]]' ;; esac # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[[ABCDGIRSTW]]' ;; esac # Try without a prefix undercore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext < $nlist) && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if grep ' nm_test_var$' "$nlist" >/dev/null; then if grep ' nm_test_func$' "$nlist" >/dev/null; then cat < conftest.$ac_ext #ifdef __cplusplus extern "C" { #endif EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' cat <> conftest.$ac_ext #if defined (__STDC__) && __STDC__ # define lt_ptr_t void * #else # define lt_ptr_t char * # define const #endif /* The mapping between symbol names and symbols. */ const struct { const char *name; lt_ptr_t address; } lt_preloaded_symbols[[]] = { EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext cat <<\EOF >> conftest.$ac_ext {0, (lt_ptr_t) 0} }; #ifdef __cplusplus } #endif EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_save_LIBS="$LIBS" lt_save_CFLAGS="$CFLAGS" LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS="$lt_save_LIBS" CFLAGS="$lt_save_CFLAGS" else echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD fi else echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD cat conftest.$ac_ext >&5 fi rm -f conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done ]) if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then AC_MSG_RESULT(failed) else AC_MSG_RESULT(ok) fi ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE # AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) # --------------------------------------- AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], [_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_static, $1)= AC_MSG_CHECKING([for $compiler option to produce PIC]) ifelse([$1],[CXX],[ # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | os2* | pw32*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= ;; interix3*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else case $host_os in aix4* | aix5*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; esac ;; dgux*) case $cc_basename in ec++*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; ghcx*) # Green Hills C++ Compiler _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; freebsd* | kfreebsd*-gnu | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; aCC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux*) case $cc_basename in KCC*) # KAI C++ Compiler _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; icpc* | ecpc*) # Intel C++ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgCC*) # Portland Group C++ compiler. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' ;; *) ;; esac ;; netbsd*) ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; cxx*) # Digital/Compaq C++ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; lcc*) # Lucid _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; vxworks*) ;; *) _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ], [ if test "$GCC" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; interix3*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no enable_shared=no ;; sysv4*MP*) if test -d /usr/nec; then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; esac ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC (with -KPIC) is the default. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; newsos6) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; linux*) case $cc_basename in icc* | ecc*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; ccc*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All Alpha code is PIC. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; esac ;; osf3* | osf4* | osf5*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All OSF/1 code is PIC. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; solaris*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' case $cc_basename in f77* | f90* | f95*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; *) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; esac ;; sunos4*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; unicos*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; uts4*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *) _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ]) AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) # # Check to make sure the PIC flag actually works. # if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1), [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in "" | " "*) ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; esac], [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" ;; esac # # Check to make sure the static flag actually works. # wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\" AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1), $lt_tmp_static_flag, [], [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) ]) # AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) # ------------------------------------ # See if the linker supports building shared libraries. AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) ifelse([$1],[CXX],[ _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' case $host_os in aix4* | aix5*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' else _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" ;; cygwin* | mingw*) _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([[^ ]]*\) [[^ ]]*/\1 DATA/;/^I /d;/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' ;; *) _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac ],[ runpath_var= _LT_AC_TAGVAR(allow_undefined_flag, $1)= _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no _LT_AC_TAGVAR(archive_cmds, $1)= _LT_AC_TAGVAR(archive_expsym_cmds, $1)= _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_minus_L, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown _LT_AC_TAGVAR(hardcode_automatic, $1)=no _LT_AC_TAGVAR(module_cmds, $1)= _LT_AC_TAGVAR(module_expsym_cmds, $1)= _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list _LT_AC_TAGVAR(include_expsyms, $1)= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_" # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. extract_expsyms_cmds= # Just being paranoid about ensuring that cc_basename is set. _LT_CC_BASENAME([$compiler]) case $host_os in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac _LT_AC_TAGVAR(ld_shlibs, $1)=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= fi supports_anon_versioning=no case `$LD -v 2>/dev/null` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix3* | aix4* | aix5*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then _LT_AC_TAGVAR(ld_shlibs, $1)=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we can't use # them. _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; interix3*) _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; linux*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_addflag= case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; esac _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test $supports_anon_versioning = yes; then _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then _LT_AC_TAGVAR(ld_shlibs, $1)=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) _LT_AC_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; sunos4*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then runpath_var= _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(always_export_symbols, $1)=yes _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported fi ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' else _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_AC_TAGVAR(archive_cmds, $1)='' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes if test "$GCC" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 _LT_AC_TAGVAR(hardcode_direct, $1)=yes else # We have old collect2 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_AC_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared libraries. _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # see comment about different semantics on the GNU ld section _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; bsdi[[45]]*) _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic ;; cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs' _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; darwin* | rhapsody*) case $host_os in rhapsody* | darwin1.[[012]]) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[[012]]) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_automatic, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes if test "$GCC" = yes ; then output_verbose_link_cmd='echo' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else case $cc_basename in xlc*) output_verbose_link_cmd='echo' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac fi ;; dgux*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; freebsd1*) _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | kfreebsd*-gnu | dragonfly*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; hpux9*) if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(hardcode_direct, $1)=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes fi ;; hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(link_all_deplibs, $1)=yes ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; newsos6) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; openbsd*) _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' else case $host_os in openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' ;; esac fi ;; os2*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' else _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' fi _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ;; solaris*) _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' if test "$GCC" = yes; then wlarc='${wl}' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else wlarc='' _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine linker options so we # cannot just pass the convience library names through # without $wl, iff we do not link with $LD. # Luckily, gcc supports the same syntax we need for Sun Studio. # Supported since Solaris 2.6 (maybe 2.5.1?) case $wlarc in '') _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; *) _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; esac ;; esac _LT_AC_TAGVAR(link_all_deplibs, $1)=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4) case $host_vendor in sni) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' _LT_AC_TAGVAR(hardcode_direct, $1)=no ;; motorola) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4.3*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes _LT_AC_TAGVAR(ld_shlibs, $1)=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7*) _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac fi ]) AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no # # Do we need to explicitly link libc? # case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in x|xyes) # Assume -lc should be added _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $_LT_AC_TAGVAR(archive_cmds, $1) in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. AC_MSG_CHECKING([whether -lc should be explicitly linked in]) $rm conftest* printf "$lt_simple_compile_test_code" > conftest.$ac_ext if AC_TRY_EVAL(ac_compile) 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) _LT_AC_TAGVAR(allow_undefined_flag, $1)= if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) then _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no else _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes fi _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) ;; esac fi ;; esac ])# AC_LIBTOOL_PROG_LD_SHLIBS # _LT_AC_FILE_LTDLL_C # ------------------- # Be careful that the start marker always follows a newline. AC_DEFUN([_LT_AC_FILE_LTDLL_C], [ # /* ltdll.c starts here */ # #define WIN32_LEAN_AND_MEAN # #include # #undef WIN32_LEAN_AND_MEAN # #include # # #ifndef __CYGWIN__ # # ifdef __CYGWIN32__ # # define __CYGWIN__ __CYGWIN32__ # # endif # #endif # # #ifdef __cplusplus # extern "C" { # #endif # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); # #ifdef __cplusplus # } # #endif # # #ifdef __CYGWIN__ # #include # DECLARE_CYGWIN_DLL( DllMain ); # #endif # HINSTANCE __hDllInstance_base; # # BOOL APIENTRY # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) # { # __hDllInstance_base = hInst; # return TRUE; # } # /* ltdll.c ends here */ ])# _LT_AC_FILE_LTDLL_C # _LT_AC_TAGVAR(VARNAME, [TAGNAME]) # --------------------------------- AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) # old names AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) AC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) AC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) # This is just to silence aclocal about the macro not being used ifelse([AC_DISABLE_FAST_INSTALL]) AC_DEFUN([LT_AC_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj, no) test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS) ]) AC_DEFUN([LT_AC_PROG_RC], [AC_CHECK_TOOL(RC, windres, no) ]) # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_SED. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # # LT_AC_PROG_SED # -------------- # Check for a fully-functional sed program, that truncates # as few characters as possible. Prefer GNU sed if found. AC_DEFUN([LT_AC_PROG_SED], [AC_MSG_CHECKING([for a sed that does not truncate output]) AC_CACHE_VAL(lt_cv_path_SED, [# Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f $lt_ac_sed && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test $lt_ac_count -gt 10 && break lt_ac_count=`expr $lt_ac_count + 1` if test $lt_ac_count -gt $lt_ac_max; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done ]) SED=$lt_cv_path_SED AC_MSG_RESULT([$SED]) ]) # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- # # Copyright © 2004 Scott James Remnant . # # 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. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # PKG_PROG_PKG_CONFIG([MIN-VERSION]) # ---------------------------------- AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) fi if test -n "$PKG_CONFIG"; then _pkg_min_version=m4_default([$1], [0.9.0]) AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) PKG_CONFIG="" fi fi[]dnl ])# PKG_PROG_PKG_CONFIG # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # # Check to see whether a particular set of modules exists. Similar # to PKG_CHECK_MODULES(), but does not set variables or print errors. # # # Similar to PKG_CHECK_MODULES, make sure that the first instance of # this or PKG_CHECK_MODULES is called, or make sure to call # PKG_CHECK_EXISTS manually # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_EXISTS], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl if test -n "$PKG_CONFIG" && \ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then m4_ifval([$2], [$2], [:]) m4_ifvaln([$3], [else $3])dnl fi]) # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) # --------------------------------------------- m4_define([_PKG_CONFIG], [if test -n "$PKG_CONFIG"; then if test -n "$$1"; then pkg_cv_[]$1="$$1" else PKG_CHECK_EXISTS([$3], [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], [pkg_failed=yes]) fi else pkg_failed=untried fi[]dnl ])# _PKG_CONFIG # _PKG_SHORT_ERRORS_SUPPORTED # ----------------------------- AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi[]dnl ])# _PKG_SHORT_ERRORS_SUPPORTED # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], # [ACTION-IF-NOT-FOUND]) # # # Note that if there is a possibility the first call to # PKG_CHECK_MODULES might not happen, you should be sure to include an # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac # # # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_MODULES], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl pkg_failed=no AC_MSG_CHECKING([for $1]) _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) _PKG_CONFIG([$1][_LIBS], [libs], [$2]) m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS and $1[]_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.]) if test $pkg_failed = yes; then _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"` else $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` fi # Put the nasty error message in config.log where it belongs echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD ifelse([$4], , [AC_MSG_ERROR(dnl [Package requirements ($2) were not met: $$1_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. _PKG_TEXT ])], [$4]) elif test $pkg_failed = untried; then ifelse([$4], , [AC_MSG_FAILURE(dnl [The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. _PKG_TEXT To get pkg-config, see .])], [$4]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS $1[]_LIBS=$pkg_cv_[]$1[]_LIBS AC_MSG_RESULT([yes]) ifelse([$3], , :, [$3]) fi[]dnl ])# PKG_CHECK_MODULES # Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"]) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION so it can be traced. # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.9.6])]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # `$srcdir', `$srcdir/..', or `$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is `.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 7 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ(2.52)dnl ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE]) AC_SUBST([$1_FALSE]) if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 8 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "GCJ", or "OBJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl ifelse([$1], CC, [depcc="$CC" am_compiler_list=], [$1], CXX, [depcc="$CXX" am_compiler_list=], [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE(dependency-tracking, [ --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH]) ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. #serial 3 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [for mf in $CONFIG_FILES; do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # So let's grep whole file. if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each `.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 8 # AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 12 # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.58])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl # test to see if srcdir already configured if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) AM_MISSING_PROG(AUTOCONF, autoconf) AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(MAKEINFO, makeinfo) AM_PROG_INSTALL_SH AM_PROG_INSTALL_STRIP AC_REQUIRE([AM_PROG_MKDIR_P])dnl # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES(CC)], [define([AC_PROG_CC], defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl ]) ]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $1 | $1:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl install_sh=${install_sh-"$am_aux_dir/install-sh"} AC_SUBST(install_sh)]) # Copyright (C) 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 3 # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo done .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # We grep out `Entering directory' and `Leaving directory' # messages which can occur if `w' ends up in MAKEFLAGS. # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU fi # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote="\"" _am_result=BSD fi fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it supports --run. # If it does, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= AC_MSG_WARN([`missing' script is too old or missing]) fi ]) # Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_MKDIR_P # --------------- # Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. # # Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories # created by `make install' are always world readable, even if the # installer happens to have an overly restrictive umask (e.g. 077). # This was a mistake. There are at least two reasons why we must not # use `-m 0755': # - it causes special bits like SGID to be ignored, # - it may be too restrictive (some setups expect 775 directories). # # Do not use -m 0755 and let people choose whatever they expect by # setting umask. # # We cannot accept any implementation of `mkdir' that recognizes `-p'. # Some implementations (such as Solaris 8's) are not thread-safe: if a # parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c' # concurrently, both version can detect that a/ is missing, but only # one can create it and the other will error out. Consequently we # restrict ourselves to GNU make (using the --version option ensures # this.) AC_DEFUN([AM_PROG_MKDIR_P], [if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then # We used to keeping the `.' as first argument, in order to # allow $(mkdir_p) to be used without argument. As in # $(mkdir_p) $(somedir) # where $(somedir) is conditionally defined. However this is wrong # for two reasons: # 1. if the package is installed by a user who cannot write `.' # make install will fail, # 2. the above comment should most certainly read # $(mkdir_p) $(DESTDIR)$(somedir) # so it does not work when $(somedir) is undefined and # $(DESTDIR) is not. # To support the latter case, we have to write # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), # so the `.' trick is pointless. mkdir_p='mkdir -p --' else # On NextStep and OpenStep, the `mkdir' command does not # recognize any option. It will interpret all options as # directories to create, and then abort because `.' already # exists. for d in ./-p ./--version; do test -d $d && rmdir $d done # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. if test -f "$ac_aux_dir/mkinstalldirs"; then mkdir_p='$(mkinstalldirs)' else mkdir_p='$(install_sh) -d' fi fi AC_SUBST([mkdir_p])]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 3 # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # ------------------------------ # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) # _AM_SET_OPTIONS(OPTIONS) # ---------------------------------- # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT(yes)]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor `install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in `make install-strip', and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be `maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of `v7', `ustar', or `pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. AM_MISSING_PROG([AMTAR], [tar]) m4_if([$1], [v7], [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' _am_tools=${am_cv_prog_tar_$1-$_am_tools} # Do not fold the above two line into one, because Tru64 sh and # Solaris sh will not grok spaces in the rhs of `-'. for _am_tool in $_am_tools do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR xqf-1.0.5/gtkrc0000644002404400000620000000151710206173774010300 00000000000000# this is a modified version of the gtk2 default color scheme so xqf doesn't # look that ugly in gtk1 style "default" { fg[NORMAL] = "#000000000000" fg[ACTIVE] = "#000000000000" fg[PRELIGHT] = "#000000000000" fg[SELECTED] = "#FFFFFFFFFFFF" fg[INSENSITIVE] = "#753075307530" bg[NORMAL] = "#DCDCDADAD5D5" bg[ACTIVE] = "#BABAB5B5ABAB" bg[PRELIGHT] = "#EEEEEBEBE7E7" bg[SELECTED] = "#4B4B69698383" bg[INSENSITIVE] = "#DCDCDADAD5D5" text[NORMAL] = "#000000000000" text[ACTIVE] = "#000000000000" text[PRELIGHT] = "#000000000000" text[SELECTED] = "#FFFFFFFFFFFF" text[INSENSITIVE] = "#753075307530" base[NORMAL] = "#FFFFFFFFFFFF" base[ACTIVE] = "#FFFFFFFFFFFF" base[PRELIGHT] = "#FFFFFFFFFFFF" base[SELECTED] = "#4B4B69698383" base[INSENSITIVE] = "#EEEEEBEBE7E7" } class "*" style "default" # vim: syntax=gtkrc xqf-1.0.5/xqf.60000644002404400000620000000456010161261454010122 00000000000000.\" Hey, EMACS: -*- nroff -*- .\" xqf.6 is copyright 1999-2001 by Jordi Mallach .\" .\" This is free documentation, see the latest version of the GNU .\" General Public License for copying conditions. There is NO warranty. .TH XQF 6 "December 19, 2004" .SH NAME xqf \- 3D action game server browser .SH SYNOPSIS .B xqf .RI [ options ] .SH DESCRIPTION \fBXQF\fP is a 3D action game (such as Quake, sequels and derivatives) server browser. It uses X and is written using the GIMP Tool Kit, and uses QStat in the backend to retrieve server info. .PP With XQF you can search for Quake, Quake World, Quake2, Quake3, Return to Castle Wolfenstein, Hexen 2, Hexen World, Sin, Half-Life, Kingpin, Soldier of Fortun 1/2, Tribes 2, Heretic 2, Unreal, Unreal Tournament, Unreal Tournament 2003, Rune, Descent 3 and many others. You can look at lots of information about the servers. XQF can spawn your client into a selected server with customized options. You can also apply filters while searching for servers, trimming full or empty servers, for example. .SH OPTIONS XQF accepts several command line parameters: .TP .BI \-\-launch " [SERVERTYPE] IP" adds the server specified with IP (e.g. 10.10.0.1:27666) to the favorites, queries it and launches the game. XQF tries to automatically determine the correct game based on the port. If the autodetections fails XQF will ask you for the game. Alternatively you may directly specify the game type on the command line (e.g. Q3S). .TP .BI \-\-add " [SERVERTYPE] IP" adds the specified server to the favories and queries it. Basically the same as \-\-launch except that the game is not launched ;-) .TP .BI \-\-debug " level" set the specified debug level. Use this if you experience problems with XQF. Level 3 is usually sufficient for debugging most problems. Higher levels product lots of output. .TP .B \-\-version prints the version of XQF. .SH SEE ALSO .BR qstat(1). .TP .I /usr/share/doc/xqf .SH HOMEPAGE http://linuxgames.com/xqf/ http://www.sourceforge.net/projects/xqf/ .SH AUTHOR This manual page was written by Jordi Mallach , for the Debian GNU/Linux system (but may be used by others). .br XQF was written by Roman Pozlevich , and is now maintained by Bill Adams , Alex Burger and Ludwig Nussel xqf-1.0.5/README0000644002404400000620000000136407406700366010124 00000000000000 XQF DESCRIPTION ----------- XQF is Quake/QuakeWorld/Quake2/Quake3 server browser and launcher for X11. It uses the GTK+ (http://www.gimp.org/gtk) toolkit. XQF is a front-end to QStat, a program by Steve Jankowski. INSTALLING / USAGE ------------------ Please see the docs/xqfdocs.html file for more information. AVAILABILITY ------------ http://www.linuxgames.com/xqf/ http://sourceforge.net/projects/xqf/ COPYRIGHT --------- XQF is Copyright (C) 1998-2000 Roman Pozlevich Copying is allowed under the terms of GNU General Public License. See the file COPYING for more details. ---------------------------------------------------------------------- Roman Pozlevich xqf-1.0.5/configure0000755002404400000620000115557010523105436011154 00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.59 for XQF 1.0.5. # # Report bugs to . # # Copyright (C) 2003 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # Work around bugs in pre-3.0 UWIN ksh. $as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)$' \| \ . : '\(.\)' 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } /^X\/\(\/\/\)$/{ s//\1/; q; } /^X\/\(\/\).*/{ s//\1/; q; } s/.*/./; q'` # PATH needs CR, and LINENO needs CR and PATH. # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" || { # Find who we are. Look in the path if we contain no path at all # relative or not. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 { (exit 1); exit 1; }; } fi case $CONFIG_SHELL in '') as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for as_base in sh bash ksh sh5; do case $as_dir in /*) if ("$as_dir/$as_base" -c ' as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } CONFIG_SHELL=$as_dir/$as_base export CONFIG_SHELL exec "$CONFIG_SHELL" "$0" ${1+"$@"} fi;; esac done done ;; esac # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line before each line; the second 'sed' does the real # work. The second script uses 'N' to pair each line-number line # with the numbered line, and appends trailing '-' during # substitution so that $LINENO is not a special case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) sed '=' <$as_myself | sed ' N s,$,-, : loop s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, t loop s,-$,, s,^['$as_cr_digits']*\n,, ' >$as_me.lineno && chmod +x $as_me.lineno || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensible to this). . ./$as_me.lineno # Exit status is that of the last command. exit } case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in *c*,-n*) ECHO_N= ECHO_C=' ' ECHO_T=' ' ;; *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then # We could just check for DJGPP; but this test a) works b) is more generic # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). if test -f conf$$.exe; then # Don't use ln at all; we don't have any links as_ln_s='cp -p' else as_ln_s='ln -s' fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.file if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" # IFS # We need space, tab and new line, in precisely that order. as_nl=' ' IFS=" $as_nl" # CDPATH. $as_unset CDPATH # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` exec 6>&1 # # Initializations. # ac_default_prefix=/usr/local ac_config_libobj_dir=. cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} # Maximum number of lines to put in a shell here document. # This variable seems obsolete. It should probably be removed, and # only ac_max_sed_lines should be used. : ${ac_max_here_lines=38} # Identity of this package. PACKAGE_NAME='XQF' PACKAGE_TARNAME='xqf' PACKAGE_VERSION='1.0.5' PACKAGE_STRING='XQF 1.0.5' PACKAGE_BUGREPORT='xqf-developer@lists.sourceforge.net' ac_unique_file="src/xqf.c" # Factoring default headers for most tests. ac_includes_default="\ #include #if HAVE_SYS_TYPES_H # include #endif #if HAVE_SYS_STAT_H # include #endif #if STDC_HEADERS # include # include #else # if HAVE_STDLIB_H # include # endif #endif #if HAVE_STRING_H # if !STDC_HEADERS && HAVE_MEMORY_H # include # endif # include #endif #if HAVE_STRINGS_H # include #endif #if HAVE_INTTYPES_H # include #else # if HAVE_STDINT_H # include # endif #endif #if HAVE_UNISTD_H # include #endif" ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar GETTEXT_PACKAGE INTLTOOL_DESKTOP_RULE INTLTOOL_DIRECTORY_RULE INTLTOOL_KEYS_RULE INTLTOOL_PROP_RULE INTLTOOL_OAF_RULE INTLTOOL_PONG_RULE INTLTOOL_SERVER_RULE INTLTOOL_SHEET_RULE INTLTOOL_SOUNDLIST_RULE INTLTOOL_UI_RULE INTLTOOL_XAM_RULE INTLTOOL_KBD_RULE INTLTOOL_XML_RULE INTLTOOL_XML_NOMERGE_RULE INTLTOOL_CAVES_RULE INTLTOOL_SCHEMAS_RULE INTLTOOL_THEME_RULE INTLTOOL_EXTRACT INTLTOOL_MERGE INTLTOOL_UPDATE INTLTOOL_PERL INTLTOOL_ICONV INTLTOOL_MSGFMT INTLTOOL_MSGMERGE INTLTOOL_XGETTEXT CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CPP EGREP USE_NLS MSGFMT GMSGFMT XGETTEXT CATALOGS CATOBJEXT DATADIRNAME GMOFILES INSTOBJEXT INTLLIBS PO_IN_DATADIR_TRUE PO_IN_DATADIR_FALSE POFILES POSUB LN_S RANLIB ac_ct_RANLIB RELEASE OLD_GTK_SUPPORT PKG_CONFIG ac_pt_PKG_CONFIG PACKAGE_CFLAGS PACKAGE_LIBS GLIB_CONFIG GLIB_CFLAGS GLIB_LIBS GTK_CONFIG GTK_CFLAGS GTK_LIBS GDK_PIXBUF_CONFIG GDK_PIXBUF_CFLAGS GDK_PIXBUF_LIBS QSTATEXEC XQFRCON_LIBS BUILD_XQFRCON_TRUE BUILD_XQFRCON_FALSE DUMMY_LIBGEOIP_SONAME DUMMY_LIBGEOIP_ORIG GEOIP_LIB DUMMY_LIBGEOIP_TRUE DUMMY_LIBGEOIP_FALSE DUMMY_LIBGDKPIXBUF_SONAME DUMMY_LIBGDKPIXBUF_ORIG DUMMY_LIBGDKPIXBUF_TRUE DUMMY_LIBGDKPIXBUF_FALSE COMPRESSION DEBUG LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. ac_init_help= ac_init_version=false # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datadir='${prefix}/share' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' infodir='${prefix}/info' mandir='${prefix}/man' ac_prev= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval "$ac_prev=\$ac_option" ac_prev= continue fi ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_option in -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad | --data | --dat | --da) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | --da=*) datadir=$ac_optarg ;; -disable-* | --disable-*) ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/-/_/g'` eval "enable_$ac_feature=no" ;; -enable-* | --enable-*) ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/-/_/g'` case $ac_option in *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac eval "enable_$ac_feature='$ac_optarg'" ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst \ | --locals | --local | --loca | --loc | --lo) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package| sed 's/-/_/g'` case $ac_option in *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac eval "with_$ac_package='$ac_optarg'" ;; -without-* | --without-*) ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package | sed 's/-/_/g'` eval "with_$ac_package=no" ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) { echo "$as_me: error: unrecognized option: $ac_option Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` eval "$ac_envvar='$ac_optarg'" export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` { echo "$as_me: error: missing argument to $ac_option" >&2 { (exit 1); exit 1; }; } fi # Be sure to have absolute paths. for ac_var in exec_prefix prefix do eval ac_val=$`echo $ac_var` case $ac_val in [\\/$]* | ?:[\\/]* | NONE | '' ) ;; *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; };; esac done # Be sure to have absolute paths. for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ localstatedir libdir includedir oldincludedir infodir mandir do eval ac_val=$`echo $ac_var` case $ac_val in [\\/$]* | ?:[\\/]* ) ;; *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; };; esac done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then its parent. ac_confdir=`(dirname "$0") 2>/dev/null || $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$0" : 'X\(//\)[^/]' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$0" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` srcdir=$ac_confdir if test ! -r $srcdir/$ac_unique_file; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r $srcdir/$ac_unique_file; then if test "$ac_srcdir_defaulted" = yes; then { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 { (exit 1); exit 1; }; } else { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } fi fi (cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 { (exit 1); exit 1; }; } srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` ac_env_build_alias_set=${build_alias+set} ac_env_build_alias_value=$build_alias ac_cv_env_build_alias_set=${build_alias+set} ac_cv_env_build_alias_value=$build_alias ac_env_host_alias_set=${host_alias+set} ac_env_host_alias_value=$host_alias ac_cv_env_host_alias_set=${host_alias+set} ac_cv_env_host_alias_value=$host_alias ac_env_target_alias_set=${target_alias+set} ac_env_target_alias_value=$target_alias ac_cv_env_target_alias_set=${target_alias+set} ac_cv_env_target_alias_value=$target_alias ac_env_CC_set=${CC+set} ac_env_CC_value=$CC ac_cv_env_CC_set=${CC+set} ac_cv_env_CC_value=$CC ac_env_CFLAGS_set=${CFLAGS+set} ac_env_CFLAGS_value=$CFLAGS ac_cv_env_CFLAGS_set=${CFLAGS+set} ac_cv_env_CFLAGS_value=$CFLAGS ac_env_LDFLAGS_set=${LDFLAGS+set} ac_env_LDFLAGS_value=$LDFLAGS ac_cv_env_LDFLAGS_set=${LDFLAGS+set} ac_cv_env_LDFLAGS_value=$LDFLAGS ac_env_CPPFLAGS_set=${CPPFLAGS+set} ac_env_CPPFLAGS_value=$CPPFLAGS ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} ac_cv_env_CPPFLAGS_value=$CPPFLAGS ac_env_CPP_set=${CPP+set} ac_env_CPP_value=$CPP ac_cv_env_CPP_set=${CPP+set} ac_cv_env_CPP_value=$CPP ac_env_PKG_CONFIG_set=${PKG_CONFIG+set} ac_env_PKG_CONFIG_value=$PKG_CONFIG ac_cv_env_PKG_CONFIG_set=${PKG_CONFIG+set} ac_cv_env_PKG_CONFIG_value=$PKG_CONFIG ac_env_PACKAGE_CFLAGS_set=${PACKAGE_CFLAGS+set} ac_env_PACKAGE_CFLAGS_value=$PACKAGE_CFLAGS ac_cv_env_PACKAGE_CFLAGS_set=${PACKAGE_CFLAGS+set} ac_cv_env_PACKAGE_CFLAGS_value=$PACKAGE_CFLAGS ac_env_PACKAGE_LIBS_set=${PACKAGE_LIBS+set} ac_env_PACKAGE_LIBS_value=$PACKAGE_LIBS ac_cv_env_PACKAGE_LIBS_set=${PACKAGE_LIBS+set} ac_cv_env_PACKAGE_LIBS_value=$PACKAGE_LIBS # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures XQF 1.0.5 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] _ACEOF cat <<_ACEOF Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --datadir=DIR read-only architecture-independent data [PREFIX/share] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --infodir=DIR info documentation [PREFIX/info] --mandir=DIR man documentation [PREFIX/man] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of XQF 1.0.5:";; esac cat <<\_ACEOF Optional Features: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors --enable-static[=PKGS] build static libraries [default=no] --enable-gtk2 enable experimental GTK2 support (default=no) --disable-glibtest Do not try to compile and run a test GLIB program --disable-gtktest Do not try to compile and run a test GTK program --disable-gdk_pixbuftest Do not try to compile and run a test GDK_PIXBUF program --enable-externalrcon compile external rcon program (default=no) --enable-geoip use GeoIP (default=auto) --enable-geoip-dummy=FILE use dummy GeoIP lib based on FILE (default=no) --enable-pixbuf-dummy=FILE use dummy gdk-pixbuf lib based on FILE (default=no) --enable-bzip2 use bzip2 for data compression --enable-debug turn on debugging --enable-profiling compile with profiling (default=no) Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-rpm-release=VAL RPM Release (e.g. 1mdk) --with-glib-prefix=PFX Prefix where GLIB is installed (optional) --with-glib-exec-prefix=PFX Exec prefix where GLIB is installed (optional) --with-gtk-prefix=PFX Prefix where GTK is installed (optional) --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed (optional) --with-gdk-pixbuf-prefix=PFX Prefix where GDK_PIXBUF is installed (optional) --with-gdk-pixbuf-exec-prefix=PFX Exec prefix where GDK_PIXBUF is installed (optional) --with-qstat=CMD use CMD to run qstat Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor PKG_CONFIG path to pkg-config utility PACKAGE_CFLAGS C compiler flags for PACKAGE, overriding pkg-config PACKAGE_LIBS linker flags for PACKAGE, overriding pkg-config Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . _ACEOF fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. ac_popdir=`pwd` for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d $ac_dir || continue ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Do not use `cd foo && pwd` to compute absolute paths, because # the directories may not exist. case `pwd` in .) ac_abs_builddir="$ac_dir";; *) case "$ac_dir" in .) ac_abs_builddir=`pwd`;; [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; *) ac_abs_builddir=`pwd`/"$ac_dir";; esac;; esac case $ac_abs_builddir in .) ac_abs_top_builddir=${ac_top_builddir}.;; *) case ${ac_top_builddir}. in .) ac_abs_top_builddir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; esac;; esac case $ac_abs_builddir in .) ac_abs_srcdir=$ac_srcdir;; *) case $ac_srcdir in .) ac_abs_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; esac;; esac case $ac_abs_builddir in .) ac_abs_top_srcdir=$ac_top_srcdir;; *) case $ac_top_srcdir in .) ac_abs_top_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; esac;; esac cd $ac_dir # Check for guested configure; otherwise get Cygnus style configure. if test -f $ac_srcdir/configure.gnu; then echo $SHELL $ac_srcdir/configure.gnu --help=recursive elif test -f $ac_srcdir/configure; then echo $SHELL $ac_srcdir/configure --help=recursive elif test -f $ac_srcdir/configure.ac || test -f $ac_srcdir/configure.in; then echo $ac_configure --help else echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi cd $ac_popdir done fi test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF XQF configure 1.0.5 generated by GNU Autoconf 2.59 Copyright (C) 2003 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit 0 fi exec 5>config.log cat >&5 <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by XQF $as_me 1.0.5, which was generated by GNU Autoconf 2.59. Invocation command line was $ $0 $@ _ACEOF { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` hostinfo = `(hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. echo "PATH: $as_dir" done } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_sep= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; 2) ac_configure_args1="$ac_configure_args1 '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" # Get rid of the leading space. ac_sep=" " ;; esac done done $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Be sure not to use single quotes in there, as some shells, # such as our DU 5.0 friend, will then `close' the trap. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo cat <<\_ASBOX ## ---------------- ## ## Cache variables. ## ## ---------------- ## _ASBOX echo # The following way of writing the cache mishandles newlines in values, { (set) 2>&1 | case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in *ac_space=\ *) sed -n \ "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" ;; *) sed -n \ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; esac; } echo cat <<\_ASBOX ## ----------------- ## ## Output variables. ## ## ----------------- ## _ASBOX echo for ac_var in $ac_subst_vars do eval ac_val=$`echo $ac_var` echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX ## ------------- ## ## Output files. ## ## ------------- ## _ASBOX echo for ac_var in $ac_subst_files do eval ac_val=$`echo $ac_var` echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo fi if test -s confdefs.h; then cat <<\_ASBOX ## ----------- ## ## confdefs.h. ## ## ----------- ## _ASBOX echo sed "/^$/d" confdefs.h | sort echo fi test "$ac_signal" != 0 && echo "$as_me: caught signal $ac_signal" echo "$as_me: exit $exit_status" } >&5 rm -f core *.core && rm -rf conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -rf conftest* confdefs.h # AIX cpp loses on an empty file, so make sure it contains at least a newline. echo >confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. if test -z "$CONFIG_SITE"; then if test "x$prefix" != xNONE; then CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" else CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" fi fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then { echo "$as_me:$LINENO: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . $cache_file;; *) . ./$cache_file;; esac fi else { echo "$as_me:$LINENO: creating cache $cache_file" >&5 echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in `(set) 2>&1 | sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val="\$ac_cv_env_${ac_var}_value" eval ac_new_val="\$ac_env_${ac_var}_value" case $ac_old_set,$ac_new_set in set,) { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 echo "$as_me: former value: $ac_old_val" >&2;} { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 echo "$as_me: current value: $ac_new_val" >&2;} ac_cache_corrupted=: fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 echo "$as_me: error: changes in the environment can compromise the build" >&2;} { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu am__api_version="1.9" ac_aux_dir= for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do if test -f $ac_dir/install-sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f $ac_dir/install.sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f $ac_dir/shtool; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} { (exit 1); exit 1; }; } fi ac_config_guess="$SHELL $ac_aux_dir/config.guess" ac_config_sub="$SHELL $ac_aux_dir/config.sub" ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in ./ | .// | /cC/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi done done ;; esac done fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. We don't cache a # path for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the path is relative. INSTALL=$ac_install_sh fi fi echo "$as_me:$LINENO: result: $INSTALL" >&5 echo "${ECHO_T}$INSTALL" >&6 # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo "$as_me:$LINENO: checking whether build environment is sane" >&5 echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6 # Just in case sleep 1 echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&5 echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&2;} { (exit 1); exit 1; }; } fi test "$2" = conftest.file ) then # Ok. : else { { echo "$as_me:$LINENO: error: newly created file is older than distributed files! Check your system clock" >&5 echo "$as_me: error: newly created file is older than distributed files! Check your system clock" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 test "$program_prefix" != NONE && program_transform_name="s,^,$program_prefix,;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s,\$,$program_suffix,;$program_transform_name" # Double any \ or $. echo might interpret backslashes. # By default was `s,x,x', remove it if useless. cat <<\_ACEOF >conftest.sed s/[\\$]/&&/g;s/;s,x,x,$// _ACEOF program_transform_name=`echo $program_transform_name | sed -f conftest.sed` rm conftest.sed # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then # We used to keeping the `.' as first argument, in order to # allow $(mkdir_p) to be used without argument. As in # $(mkdir_p) $(somedir) # where $(somedir) is conditionally defined. However this is wrong # for two reasons: # 1. if the package is installed by a user who cannot write `.' # make install will fail, # 2. the above comment should most certainly read # $(mkdir_p) $(DESTDIR)$(somedir) # so it does not work when $(somedir) is undefined and # $(DESTDIR) is not. # To support the latter case, we have to write # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), # so the `.' trick is pointless. mkdir_p='mkdir -p --' else # On NextStep and OpenStep, the `mkdir' command does not # recognize any option. It will interpret all options as # directories to create, and then abort because `.' already # exists. for d in ./-p ./--version; do test -d $d && rmdir $d done # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. if test -f "$ac_aux_dir/mkinstalldirs"; then mkdir_p='$(mkinstalldirs)' else mkdir_p='$(install_sh) -d' fi fi for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_AWK+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then echo "$as_me:$LINENO: result: $AWK" >&5 echo "${ECHO_T}$AWK" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$AWK" && break done echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'` if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.make <<\_ACEOF all: @echo 'ac_maketemp="$(MAKE)"' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` if test -n "$ac_maketemp"; then eval ac_cv_prog_make_${ac_make}_set=yes else eval ac_cv_prog_make_${ac_make}_set=no fi rm -f conftest.make fi if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 SET_MAKE= else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null # test to see if srcdir already configured if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} { (exit 1); exit 1; }; } fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE='xqf' VERSION='1.0.5' cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} install_sh=${install_sh-"$am_aux_dir/install-sh"} # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then echo "$as_me:$LINENO: result: $STRIP" >&5 echo "${ECHO_T}$STRIP" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":" fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 echo "${ECHO_T}$ac_ct_STRIP" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi STRIP=$ac_ct_STRIP else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. AMTAR=${AMTAR-"${am_missing_run}tar"} am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' ac_config_headers="$ac_config_headers src/gnuconfig.h" cat >>confdefs.h <<\_ACEOF #define GETTEXT_PACKAGE "xqf" _ACEOF GETTEXT_PACKAGE=xqf if test -n "0.25"; then echo "$as_me:$LINENO: checking for intltool >= 0.25" >&5 echo $ECHO_N "checking for intltool >= 0.25... $ECHO_C" >&6 INTLTOOL_REQUIRED_VERSION_AS_INT=`echo 0.25 | awk -F. '{ printf "%d", $1 * 100 + $2; }'` INTLTOOL_APPLIED_VERSION=`awk -F\" '/\\$VERSION / { printf $2; }' < ${ac_aux_dir}/intltool-update.in` INTLTOOL_APPLIED_VERSION_AS_INT=`awk -F\" '/\\$VERSION / { split($2, VERSION, "."); printf "%d\n", VERSION[1] * 100 + VERSION[2];}' < ${ac_aux_dir}/intltool-update.in` if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT"; then echo "$as_me:$LINENO: result: $INTLTOOL_APPLIED_VERSION found" >&5 echo "${ECHO_T}$INTLTOOL_APPLIED_VERSION found" >&6 else echo "$as_me:$LINENO: result: $INTLTOOL_APPLIED_VERSION found. Your intltool is too old. You need intltool 0.25 or later." >&5 echo "${ECHO_T}$INTLTOOL_APPLIED_VERSION found. Your intltool is too old. You need intltool 0.25 or later." >&6 exit 1 fi fi INTLTOOL_DESKTOP_RULE='%.desktop: %.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_KEYS_RULE='%.keys: %.keys.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_PROP_RULE='%.prop: %.prop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< $@' INTLTOOL_PONG_RULE='%.pong: %.pong.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_SERVER_RULE='%.server: %.server.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_SHEET_RULE='%.sheet: %.sheet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_UI_RULE='%.ui: %.ui.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_XML_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< $@' INTLTOOL_XAM_RULE='%.xam: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_KBD_RULE='%.kbd: %.kbd.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_CAVES_RULE='%.caves: %.caves.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_SCHEMAS_RULE='%.schemas: %.schemas.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_THEME_RULE='%.theme: %.theme.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' # Use the tools built into the package, not the ones that are installed. INTLTOOL_EXTRACT='$(top_builddir)/intltool-extract' INTLTOOL_MERGE='$(top_builddir)/intltool-merge' INTLTOOL_UPDATE='$(top_builddir)/intltool-update' # Extract the first word of "perl", so it can be a program name with args. set dummy perl; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_INTLTOOL_PERL+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $INTLTOOL_PERL in [\\/]* | ?:[\\/]*) ac_cv_path_INTLTOOL_PERL="$INTLTOOL_PERL" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_INTLTOOL_PERL="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done ;; esac fi INTLTOOL_PERL=$ac_cv_path_INTLTOOL_PERL if test -n "$INTLTOOL_PERL"; then echo "$as_me:$LINENO: result: $INTLTOOL_PERL" >&5 echo "${ECHO_T}$INTLTOOL_PERL" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi if test -z "$INTLTOOL_PERL"; then { { echo "$as_me:$LINENO: error: perl not found; required for intltool" >&5 echo "$as_me: error: perl not found; required for intltool" >&2;} { (exit 1); exit 1; }; } fi if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then { { echo "$as_me:$LINENO: error: perl 5.x required for intltool" >&5 echo "$as_me: error: perl 5.x required for intltool" >&2;} { (exit 1); exit 1; }; } fi if test "x" != "xno-xml"; then echo "$as_me:$LINENO: checking for XML::Parser" >&5 echo $ECHO_N "checking for XML::Parser... $ECHO_C" >&6 if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then echo "$as_me:$LINENO: result: ok" >&5 echo "${ECHO_T}ok" >&6 else { { echo "$as_me:$LINENO: error: XML::Parser perl module is required for intltool" >&5 echo "$as_me: error: XML::Parser perl module is required for intltool" >&2;} { (exit 1); exit 1; }; } fi fi # Extract the first word of "iconv", so it can be a program name with args. set dummy iconv; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_INTLTOOL_ICONV+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $INTLTOOL_ICONV in [\\/]* | ?:[\\/]*) ac_cv_path_INTLTOOL_ICONV="$INTLTOOL_ICONV" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_INTLTOOL_ICONV="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_path_INTLTOOL_ICONV" && ac_cv_path_INTLTOOL_ICONV="iconv" ;; esac fi INTLTOOL_ICONV=$ac_cv_path_INTLTOOL_ICONV if test -n "$INTLTOOL_ICONV"; then echo "$as_me:$LINENO: result: $INTLTOOL_ICONV" >&5 echo "${ECHO_T}$INTLTOOL_ICONV" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_INTLTOOL_MSGFMT+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $INTLTOOL_MSGFMT in [\\/]* | ?:[\\/]*) ac_cv_path_INTLTOOL_MSGFMT="$INTLTOOL_MSGFMT" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_INTLTOOL_MSGFMT="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_path_INTLTOOL_MSGFMT" && ac_cv_path_INTLTOOL_MSGFMT="msgfmt" ;; esac fi INTLTOOL_MSGFMT=$ac_cv_path_INTLTOOL_MSGFMT if test -n "$INTLTOOL_MSGFMT"; then echo "$as_me:$LINENO: result: $INTLTOOL_MSGFMT" >&5 echo "${ECHO_T}$INTLTOOL_MSGFMT" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi # Extract the first word of "msgmerge", so it can be a program name with args. set dummy msgmerge; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_INTLTOOL_MSGMERGE+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $INTLTOOL_MSGMERGE in [\\/]* | ?:[\\/]*) ac_cv_path_INTLTOOL_MSGMERGE="$INTLTOOL_MSGMERGE" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_INTLTOOL_MSGMERGE="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_path_INTLTOOL_MSGMERGE" && ac_cv_path_INTLTOOL_MSGMERGE="msgmerge" ;; esac fi INTLTOOL_MSGMERGE=$ac_cv_path_INTLTOOL_MSGMERGE if test -n "$INTLTOOL_MSGMERGE"; then echo "$as_me:$LINENO: result: $INTLTOOL_MSGMERGE" >&5 echo "${ECHO_T}$INTLTOOL_MSGMERGE" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_INTLTOOL_XGETTEXT+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $INTLTOOL_XGETTEXT in [\\/]* | ?:[\\/]*) ac_cv_path_INTLTOOL_XGETTEXT="$INTLTOOL_XGETTEXT" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_INTLTOOL_XGETTEXT="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_path_INTLTOOL_XGETTEXT" && ac_cv_path_INTLTOOL_XGETTEXT="xgettext" ;; esac fi INTLTOOL_XGETTEXT=$ac_cv_path_INTLTOOL_XGETTEXT if test -n "$INTLTOOL_XGETTEXT"; then echo "$as_me:$LINENO: result: $INTLTOOL_XGETTEXT" >&5 echo "${ECHO_T}$INTLTOOL_XGETTEXT" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi # Remove file type tags (using []) from po/POTFILES. # Manually sed perl in so people don't have to put the intltool scripts in AC_OUTPUT. ac_config_commands="$ac_config_commands intltool" ALL_LINGUAS="ca da de es fi fr pl ru" DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo done .PHONY: am__doit END # If we don't find an include directive, just comment out the code. echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6 am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # We grep out `Entering directory' and `Leaving directory' # messages which can occur if `w' ends up in MAKEFLAGS. # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU fi # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote="\"" _am_result=BSD fi fi echo "$as_me:$LINENO: result: $_am_result" >&5 echo "${ECHO_T}$_am_result" >&6 rm -f confinc confmf # Check whether --enable-dependency-tracking or --disable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then enableval="$enable_dependency_tracking" fi; if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi CC=$ac_ct_CC else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi CC=$ac_ct_CC else CC="$ac_cv_prog_CC" fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$ac_ct_CC" && break done CC=$ac_ct_CC fi fi test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. echo "$as_me:$LINENO:" \ "checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 (eval $ac_compiler --version &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 (eval $ac_compiler -v &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 (eval $ac_compiler -V &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 (eval $ac_link_default) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Find the output, starting from the most likely. This scheme is # not robust to junk in `.', hence go to wildcards (a.*) only as a last # resort. # Be careful to initialize this variable, since it used to be cached. # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. ac_cv_exeext= # b.out is created by i960 compilers. for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; conftest.$ac_ext ) # This is the source file. ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` # FIXME: I believe we export ac_cv_exeext for Libtool, # but it would be cool to find out if it's true. Does anybody # maintain Libtool? --akim. export ac_cv_exeext break;; * ) break;; esac done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: C compiler cannot create executables See \`config.log' for more details." >&5 echo "$as_me: error: C compiler cannot create executables See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; } fi ac_exeext=$ac_cv_exeext echo "$as_me:$LINENO: result: $ac_file" >&5 echo "${ECHO_T}$ac_file" >&6 # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. echo "$as_me:$LINENO: checking whether the C compiler works" >&5 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { echo "$as_me:$LINENO: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&5 echo "$as_me: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi fi fi echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 rm -f a.out a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 echo "$as_me:$LINENO: result: $cross_compiling" >&5 echo "${ECHO_T}$cross_compiling" >&6 echo "$as_me:$LINENO: checking for suffix of executables" >&5 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` export ac_cv_exeext break;; * ) break;; esac done else { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest$ac_cv_exeext echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 echo "${ECHO_T}$ac_cv_exeext" >&6 rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT echo "$as_me:$LINENO: checking for suffix of object files" >&5 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 echo "${ECHO_T}$ac_cv_objext" >&6 OBJEXT=$ac_cv_objext ac_objext=$OBJEXT echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS CFLAGS="-g" echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_prog_cc_g=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 if test "${ac_cv_prog_cc_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_prog_cc_stdc=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std1 is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std1. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF # Don't try gcc -ansi; that turns off useful extensions and # breaks some systems' header files. # AIX -qlanglvl=ansi # Ultrix and OSF/1 -std1 # HP-UX 10.20 and later -Ae # HP-UX older versions -Aa -D_HPUX_SOURCE # SVR4 -Xc -D__EXTENSIONS__ for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_stdc=$ac_arg break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext done rm -f conftest.$ac_ext conftest.$ac_objext CC=$ac_save_CC fi case "x$ac_cv_prog_cc_stdc" in x|xno) echo "$as_me:$LINENO: result: none needed" >&5 echo "${ECHO_T}none needed" >&6 ;; *) echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 CC="$CC $ac_cv_prog_cc_stdc" ;; esac # Some people use a C++ compiler to compile C. Since we use `exit', # in C++ we need to declare it. In case someone uses the same compiler # for both compiling C and C++ we need to have the C++ compiler decide # the declaration of exit, since it's the most demanding environment. cat >conftest.$ac_ext <<_ACEOF #ifndef __cplusplus choke me #endif _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then for ac_declaration in \ '' \ 'extern "C" void std::exit (int) throw (); using std::exit;' \ 'extern "C" void std::exit (int); using std::exit;' \ 'extern "C" void exit (int) throw ();' \ 'extern "C" void exit (int);' \ 'void exit (int);' do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_declaration #include int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 continue fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_declaration int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done rm -f conftest* if test -n "$ac_declaration"; then echo '#ifdef __cplusplus' >>confdefs.h echo $ac_declaration >>confdefs.h echo '#endif' >>confdefs.h fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6 if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if test "${ac_cv_prog_CPP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi echo "$as_me:$LINENO: result: $CPP" >&5 echo "${ECHO_T}$CPP" >&6 ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&5 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu echo "$as_me:$LINENO: checking for egrep" >&5 echo $ECHO_N "checking for egrep... $ECHO_C" >&6 if test "${ac_cv_prog_egrep+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if echo a | (grep -E '(a|b)') >/dev/null 2>&1 then ac_cv_prog_egrep='grep -E' else ac_cv_prog_egrep='egrep' fi fi echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 echo "${ECHO_T}$ac_cv_prog_egrep" >&6 EGREP=$ac_cv_prog_egrep echo "$as_me:$LINENO: checking for ANSI C header files" >&5 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdc=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 echo "${ECHO_T}$ac_cv_header_stdc" >&6 if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF #define STDC_HEADERS 1 _ACEOF fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in locale.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## -------------------------------------------------- ## ## Report this to xqf-developer@lists.sourceforge.net ## ## -------------------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done if test $ac_cv_header_locale_h = yes; then echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5 echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6 if test "${am_cv_val_LC_MESSAGES+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { return LC_MESSAGES ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then am_cv_val_LC_MESSAGES=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 am_cv_val_LC_MESSAGES=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5 echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6 if test $am_cv_val_LC_MESSAGES = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_LC_MESSAGES 1 _ACEOF fi fi USE_NLS=yes gt_cv_have_gettext=no CATOBJEXT=NONE XGETTEXT=: INTLLIBS= if test "${ac_cv_header_libintl_h+set}" = set; then echo "$as_me:$LINENO: checking for libintl.h" >&5 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6 if test "${ac_cv_header_libintl_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking libintl.h usability" >&5 echo $ECHO_N "checking libintl.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking libintl.h presence" >&5 echo $ECHO_N "checking libintl.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: libintl.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: libintl.h: present but cannot be compiled" >&5 echo "$as_me: WARNING: libintl.h: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: libintl.h: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: libintl.h: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: libintl.h: see the Autoconf documentation" >&5 echo "$as_me: WARNING: libintl.h: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: libintl.h: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: libintl.h: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: libintl.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: libintl.h: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## -------------------------------------------------- ## ## Report this to xqf-developer@lists.sourceforge.net ## ## -------------------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for libintl.h" >&5 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6 if test "${ac_cv_header_libintl_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_libintl_h=$ac_header_preproc fi echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6 fi if test $ac_cv_header_libintl_h = yes; then gt_cv_func_dgettext_libintl="no" libintl_extra_libs="" # # First check in libc # echo "$as_me:$LINENO: checking for ngettext in libc" >&5 echo $ECHO_N "checking for ngettext in libc... $ECHO_C" >&6 if test "${gt_cv_func_ngettext_libc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { return !ngettext ("","", 1) ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gt_cv_func_ngettext_libc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gt_cv_func_ngettext_libc=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $gt_cv_func_ngettext_libc" >&5 echo "${ECHO_T}$gt_cv_func_ngettext_libc" >&6 if test "$gt_cv_func_ngettext_libc" = "yes" ; then echo "$as_me:$LINENO: checking for dgettext in libc" >&5 echo $ECHO_N "checking for dgettext in libc... $ECHO_C" >&6 if test "${gt_cv_func_dgettext_libc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { return !dgettext ("","") ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gt_cv_func_dgettext_libc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gt_cv_func_dgettext_libc=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $gt_cv_func_dgettext_libc" >&5 echo "${ECHO_T}$gt_cv_func_dgettext_libc" >&6 fi if test "$gt_cv_func_ngettext_libc" = "yes" ; then for ac_func in bind_textdomain_codeset do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else char (*f) () = $ac_func; #endif #ifdef __cplusplus } #endif int main () { return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done fi # # If we don't have everything we want, check in libintl # if test "$gt_cv_func_dgettext_libc" != "yes" \ || test "$gt_cv_func_ngettext_libc" != "yes" \ || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then echo "$as_me:$LINENO: checking for bindtextdomain in -lintl" >&5 echo $ECHO_N "checking for bindtextdomain in -lintl... $ECHO_C" >&6 if test "${ac_cv_lib_intl_bindtextdomain+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lintl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char bindtextdomain (); int main () { bindtextdomain (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_intl_bindtextdomain=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_intl_bindtextdomain=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_intl_bindtextdomain" >&5 echo "${ECHO_T}$ac_cv_lib_intl_bindtextdomain" >&6 if test $ac_cv_lib_intl_bindtextdomain = yes; then echo "$as_me:$LINENO: checking for ngettext in -lintl" >&5 echo $ECHO_N "checking for ngettext in -lintl... $ECHO_C" >&6 if test "${ac_cv_lib_intl_ngettext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lintl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char ngettext (); int main () { ngettext (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_intl_ngettext=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_intl_ngettext=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_intl_ngettext" >&5 echo "${ECHO_T}$ac_cv_lib_intl_ngettext" >&6 if test $ac_cv_lib_intl_ngettext = yes; then echo "$as_me:$LINENO: checking for dgettext in -lintl" >&5 echo $ECHO_N "checking for dgettext in -lintl... $ECHO_C" >&6 if test "${ac_cv_lib_intl_dgettext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lintl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dgettext (); int main () { dgettext (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_intl_dgettext=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_intl_dgettext=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dgettext" >&5 echo "${ECHO_T}$ac_cv_lib_intl_dgettext" >&6 if test $ac_cv_lib_intl_dgettext = yes; then gt_cv_func_dgettext_libintl=yes fi fi fi if test "$gt_cv_func_dgettext_libintl" != "yes" ; then echo "$as_me:$LINENO: checking if -liconv is needed to use gettext" >&5 echo $ECHO_N "checking if -liconv is needed to use gettext... $ECHO_C" >&6 echo "$as_me:$LINENO: result: " >&5 echo "${ECHO_T}" >&6 echo "$as_me:$LINENO: checking for ngettext in -lintl" >&5 echo $ECHO_N "checking for ngettext in -lintl... $ECHO_C" >&6 if test "${ac_cv_lib_intl_ngettext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lintl -liconv $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char ngettext (); int main () { ngettext (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_intl_ngettext=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_intl_ngettext=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_intl_ngettext" >&5 echo "${ECHO_T}$ac_cv_lib_intl_ngettext" >&6 if test $ac_cv_lib_intl_ngettext = yes; then echo "$as_me:$LINENO: checking for dcgettext in -lintl" >&5 echo $ECHO_N "checking for dcgettext in -lintl... $ECHO_C" >&6 if test "${ac_cv_lib_intl_dcgettext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lintl -liconv $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dcgettext (); int main () { dcgettext (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_intl_dcgettext=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_intl_dcgettext=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dcgettext" >&5 echo "${ECHO_T}$ac_cv_lib_intl_dcgettext" >&6 if test $ac_cv_lib_intl_dcgettext = yes; then gt_cv_func_dgettext_libintl=yes libintl_extra_libs=-liconv else : fi else : fi fi # # If we found libintl, then check in it for bind_textdomain_codeset(); # we'll prefer libc if neither have bind_textdomain_codeset(), # and both have dgettext and ngettext # if test "$gt_cv_func_dgettext_libintl" = "yes" ; then glib_save_LIBS="$LIBS" LIBS="$LIBS -lintl $libintl_extra_libs" unset ac_cv_func_bind_textdomain_codeset for ac_func in bind_textdomain_codeset do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else char (*f) () = $ac_func; #endif #ifdef __cplusplus } #endif int main () { return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done LIBS="$glib_save_LIBS" if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then gt_cv_func_dgettext_libc=no else if test "$gt_cv_func_dgettext_libc" = "yes" \ && test "$gt_cv_func_ngettext_libc" = "yes"; then gt_cv_func_dgettext_libintl=no fi fi fi fi if test "$gt_cv_func_dgettext_libc" = "yes" \ || test "$gt_cv_func_dgettext_libintl" = "yes"; then gt_cv_have_gettext=yes fi if test "$gt_cv_func_dgettext_libintl" = "yes"; then INTLLIBS="-lintl $libintl_extra_libs" fi if test "$gt_cv_have_gettext" = "yes"; then cat >>confdefs.h <<\_ACEOF #define HAVE_GETTEXT 1 _ACEOF # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_MSGFMT+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case "$MSGFMT" in /*) ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then ac_cv_path_MSGFMT="$ac_dir/$ac_word" break fi fi done IFS="$ac_save_ifs" test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no" ;; esac fi MSGFMT="$ac_cv_path_MSGFMT" if test "$MSGFMT" != "no"; then echo "$as_me:$LINENO: result: $MSGFMT" >&5 echo "${ECHO_T}$MSGFMT" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi if test "$MSGFMT" != "no"; then glib_save_LIBS="$LIBS" LIBS="$LIBS $INTLLIBS" for ac_func in dcgettext do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else char (*f) () = $ac_func; #endif #ifdef __cplusplus } #endif int main () { return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_GMSGFMT+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $GMSGFMT in [\\/]* | ?:[\\/]*) ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" ;; esac fi GMSGFMT=$ac_cv_path_GMSGFMT if test -n "$GMSGFMT"; then echo "$as_me:$LINENO: result: $GMSGFMT" >&5 echo "${ECHO_T}$GMSGFMT" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_XGETTEXT+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case "$XGETTEXT" in /*) ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then ac_cv_path_XGETTEXT="$ac_dir/$ac_word" break fi fi done IFS="$ac_save_ifs" test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" ;; esac fi XGETTEXT="$ac_cv_path_XGETTEXT" if test "$XGETTEXT" != ":"; then echo "$as_me:$LINENO: result: $XGETTEXT" >&5 echo "${ECHO_T}$XGETTEXT" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { extern int _nl_msg_cat_cntr; return _nl_msg_cat_cntr ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then CATOBJEXT=.gmo DATADIRNAME=share else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 case $host in *-*-solaris*) echo "$as_me:$LINENO: checking for bind_textdomain_codeset" >&5 echo $ECHO_N "checking for bind_textdomain_codeset... $ECHO_C" >&6 if test "${ac_cv_func_bind_textdomain_codeset+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define bind_textdomain_codeset to an innocuous variant, in case declares bind_textdomain_codeset. For example, HP-UX 11i declares gettimeofday. */ #define bind_textdomain_codeset innocuous_bind_textdomain_codeset /* System header to define __stub macros and hopefully few prototypes, which can conflict with char bind_textdomain_codeset (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef bind_textdomain_codeset /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char bind_textdomain_codeset (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_bind_textdomain_codeset) || defined (__stub___bind_textdomain_codeset) choke me #else char (*f) () = bind_textdomain_codeset; #endif #ifdef __cplusplus } #endif int main () { return f != bind_textdomain_codeset; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_bind_textdomain_codeset=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_bind_textdomain_codeset=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_bind_textdomain_codeset" >&5 echo "${ECHO_T}$ac_cv_func_bind_textdomain_codeset" >&6 if test $ac_cv_func_bind_textdomain_codeset = yes; then CATOBJEXT=.gmo DATADIRNAME=share else CATOBJEXT=.mo DATADIRNAME=lib fi ;; *) CATOBJEXT=.mo DATADIRNAME=lib ;; esac fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$glib_save_LIBS" INSTOBJEXT=.mo else gt_cv_have_gettext=no fi fi fi if test "$gt_cv_have_gettext" = "yes" ; then cat >>confdefs.h <<\_ACEOF #define ENABLE_NLS 1 _ACEOF fi if test "$XGETTEXT" != ":"; then if $XGETTEXT --omit-header /dev/null 2> /dev/null; then : ; else echo "$as_me:$LINENO: result: found xgettext program is not GNU xgettext; ignore it" >&5 echo "${ECHO_T}found xgettext program is not GNU xgettext; ignore it" >&6 XGETTEXT=":" fi fi # We need to process the po/ directory. POSUB=po ac_config_commands="$ac_config_commands default-1" for lang in $ALL_LINGUAS; do GMOFILES="$GMOFILES $lang.gmo" POFILES="$POFILES $lang.po" done if test "$gt_cv_have_gettext" = "yes"; then if test "x$ALL_LINGUAS" = "x"; then LINGUAS= else echo "$as_me:$LINENO: checking for catalogs to be installed" >&5 echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6 NEW_LINGUAS= for presentlang in $ALL_LINGUAS; do useit=no if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then desiredlanguages="$LINGUAS" else desiredlanguages="$ALL_LINGUAS" fi for desiredlang in $desiredlanguages; do # Use the presentlang catalog if desiredlang is # a. equal to presentlang, or # b. a variant of presentlang (because in this case, # presentlang can be used as a fallback for messages # which are not translated in the desiredlang catalog). case "$desiredlang" in "$presentlang"*) useit=yes;; esac done if test $useit = yes; then NEW_LINGUAS="$NEW_LINGUAS $presentlang" fi done LINGUAS=$NEW_LINGUAS echo "$as_me:$LINENO: result: $LINGUAS" >&5 echo "${ECHO_T}$LINGUAS" >&6 fi if test -n "$LINGUAS"; then for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done fi fi test -d po || mkdir po if test "x$srcdir" != "x."; then if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then posrcprefix="$srcdir/" else posrcprefix="../$srcdir/" fi else posrcprefix="../" fi rm -f po/POTFILES sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ < $srcdir/po/POTFILES.in > po/POTFILES ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi CC=$ac_ct_CC else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi CC=$ac_ct_CC else CC="$ac_cv_prog_CC" fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$ac_ct_CC" && break done CC=$ac_ct_CC fi fi test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. echo "$as_me:$LINENO:" \ "checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 (eval $ac_compiler --version &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 (eval $ac_compiler -v &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 (eval $ac_compiler -V &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS CFLAGS="-g" echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_prog_cc_g=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 if test "${ac_cv_prog_cc_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_prog_cc_stdc=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std1 is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std1. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF # Don't try gcc -ansi; that turns off useful extensions and # breaks some systems' header files. # AIX -qlanglvl=ansi # Ultrix and OSF/1 -std1 # HP-UX 10.20 and later -Ae # HP-UX older versions -Aa -D_HPUX_SOURCE # SVR4 -Xc -D__EXTENSIONS__ for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_stdc=$ac_arg break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext done rm -f conftest.$ac_ext conftest.$ac_objext CC=$ac_save_CC fi case "x$ac_cv_prog_cc_stdc" in x|xno) echo "$as_me:$LINENO: result: none needed" >&5 echo "${ECHO_T}none needed" >&6 ;; *) echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 CC="$CC $ac_cv_prog_cc_stdc" ;; esac # Some people use a C++ compiler to compile C. Since we use `exit', # in C++ we need to declare it. In case someone uses the same compiler # for both compiling C and C++ we need to have the C++ compiler decide # the declaration of exit, since it's the most demanding environment. cat >conftest.$ac_ext <<_ACEOF #ifndef __cplusplus choke me #endif _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then for ac_declaration in \ '' \ 'extern "C" void std::exit (int) throw (); using std::exit;' \ 'extern "C" void std::exit (int); using std::exit;' \ 'extern "C" void exit (int) throw ();' \ 'extern "C" void exit (int);' \ 'void exit (int);' do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_declaration #include int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 continue fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_declaration int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done rm -f conftest* if test -n "$ac_declaration"; then echo '#ifdef __cplusplus' >>confdefs.h echo $ac_declaration >>confdefs.h echo '#endif' >>confdefs.h fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6 if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi echo "$as_me:$LINENO: checking for library containing strerror" >&5 echo $ECHO_N "checking for library containing strerror... $ECHO_C" >&6 if test "${ac_cv_search_strerror+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_func_search_save_LIBS=$LIBS ac_cv_search_strerror=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char strerror (); int main () { strerror (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_search_strerror="none required" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test "$ac_cv_search_strerror" = no; then for ac_lib in cposix; do LIBS="-l$ac_lib $ac_func_search_save_LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char strerror (); int main () { strerror (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_search_strerror="-l$ac_lib" break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext done fi LIBS=$ac_func_search_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_search_strerror" >&5 echo "${ECHO_T}$ac_cv_search_strerror" >&6 if test "$ac_cv_search_strerror" != no; then test "$ac_cv_search_strerror" = "none required" || LIBS="$ac_cv_search_strerror $LIBS" fi echo "$as_me:$LINENO: checking whether ln -s works" >&5 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6 LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me:$LINENO: result: no, using $LN_S" >&5 echo "${ECHO_T}no, using $LN_S" >&6 fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then echo "$as_me:$LINENO: result: $RANLIB" >&5 echo "${ECHO_T}$RANLIB" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 echo "${ECHO_T}$ac_ct_RANLIB" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi RANLIB=$ac_ct_RANLIB else RANLIB="$ac_cv_prog_RANLIB" fi # Check whether --enable-static or --disable-static was given. if test "${enable_static+set}" = set; then enableval="$enable_static" p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac else enable_static=no fi; echo "$as_me:$LINENO: checking for ANSI C header files" >&5 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdc=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 echo "${ECHO_T}$ac_cv_header_stdc" >&6 if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF #define STDC_HEADERS 1 _ACEOF fi #The Release stuff for the spec file. RELEASE="1" # Check whether --with-rpm_release or --without-rpm_release was given. if test "${with_rpm_release+set}" = set; then withval="$with_rpm_release" fi; if test "x$with_rpm_release" != "x" ; then RELEASE="$with_rpm_release" fi echo "$as_me:$LINENO: checking whether GTK 2 should be used" >&5 echo $ECHO_N "checking whether GTK 2 should be used... $ECHO_C" >&6 # Check whether --enable-gtk2 or --disable-gtk2 was given. if test "${enable_gtk2+set}" = set; then enableval="$enable_gtk2" USE_GTK2=$enableval else USE_GTK2=no fi; echo "$as_me:$LINENO: result: $USE_GTK2" >&5 echo "${ECHO_T}$USE_GTK2" >&6 if test "x$USE_GTK2" != "xno"; then cat >>confdefs.h <<_ACEOF #define USE_GTK2 1 _ACEOF OLD_GTK_SUPPORT="-DGTK_ENABLE_BROKEN=1" pkg_modules="gtk+-2.0 >= 2.0.0 gdk-pixbuf-xlib-2.0" if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 echo "${ECHO_T}$PKG_CONFIG" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_path_PKG_CONFIG"; then ac_pt_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $ac_pt_PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done ;; esac fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG if test -n "$ac_pt_PKG_CONFIG"; then echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi PKG_CONFIG=$ac_pt_PKG_CONFIG else PKG_CONFIG="$ac_cv_path_PKG_CONFIG" fi fi if test -n "$PKG_CONFIG"; then _pkg_min_version=0.9.0 echo "$as_me:$LINENO: checking pkg-config is at least version $_pkg_min_version" >&5 echo $ECHO_N "checking pkg-config is at least version $_pkg_min_version... $ECHO_C" >&6 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 PKG_CONFIG="" fi fi pkg_failed=no echo "$as_me:$LINENO: checking for PACKAGE" >&5 echo $ECHO_N "checking for PACKAGE... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then if test -n "$PACKAGE_CFLAGS"; then pkg_cv_PACKAGE_CFLAGS="$PACKAGE_CFLAGS" else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$pkg_modules\"") >&5 ($PKG_CONFIG --exists --print-errors "$pkg_modules") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_PACKAGE_CFLAGS=`$PKG_CONFIG --cflags "$pkg_modules" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test -n "$PKG_CONFIG"; then if test -n "$PACKAGE_LIBS"; then pkg_cv_PACKAGE_LIBS="$PACKAGE_LIBS" else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$pkg_modules\"") >&5 ($PKG_CONFIG --exists --print-errors "$pkg_modules") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_PACKAGE_LIBS=`$PKG_CONFIG --libs "$pkg_modules" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then PACKAGE_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$pkg_modules"` else PACKAGE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$pkg_modules"` fi # Put the nasty error message in config.log where it belongs echo "$PACKAGE_PKG_ERRORS" >&5 { { echo "$as_me:$LINENO: error: Package requirements ($pkg_modules) were not met: $PACKAGE_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables PACKAGE_CFLAGS and PACKAGE_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. " >&5 echo "$as_me: error: Package requirements ($pkg_modules) were not met: $PACKAGE_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables PACKAGE_CFLAGS and PACKAGE_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. " >&2;} { (exit 1); exit 1; }; } elif test $pkg_failed = untried; then { { echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables PACKAGE_CFLAGS and PACKAGE_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details." >&5 echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables PACKAGE_CFLAGS and PACKAGE_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } else PACKAGE_CFLAGS=$pkg_cv_PACKAGE_CFLAGS PACKAGE_LIBS=$pkg_cv_PACKAGE_LIBS echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 : fi else # Check whether --with-glib-prefix or --without-glib-prefix was given. if test "${with_glib_prefix+set}" = set; then withval="$with_glib_prefix" glib_config_prefix="$withval" else glib_config_prefix="" fi; # Check whether --with-glib-exec-prefix or --without-glib-exec-prefix was given. if test "${with_glib_exec_prefix+set}" = set; then withval="$with_glib_exec_prefix" glib_config_exec_prefix="$withval" else glib_config_exec_prefix="" fi; # Check whether --enable-glibtest or --disable-glibtest was given. if test "${enable_glibtest+set}" = set; then enableval="$enable_glibtest" else enable_glibtest=yes fi; if test x$glib_config_exec_prefix != x ; then glib_config_args="$glib_config_args --exec-prefix=$glib_config_exec_prefix" if test x${GLIB_CONFIG+set} != xset ; then GLIB_CONFIG=$glib_config_exec_prefix/bin/glib-config fi fi if test x$glib_config_prefix != x ; then glib_config_args="$glib_config_args --prefix=$glib_config_prefix" if test x${GLIB_CONFIG+set} != xset ; then GLIB_CONFIG=$glib_config_prefix/bin/glib-config fi fi for module in . do case "$module" in gmodule) glib_config_args="$glib_config_args gmodule" ;; gthread) glib_config_args="$glib_config_args gthread" ;; esac done # Extract the first word of "glib-config", so it can be a program name with args. set dummy glib-config; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_GLIB_CONFIG+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $GLIB_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_GLIB_CONFIG="$GLIB_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_GLIB_CONFIG="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_path_GLIB_CONFIG" && ac_cv_path_GLIB_CONFIG="no" ;; esac fi GLIB_CONFIG=$ac_cv_path_GLIB_CONFIG if test -n "$GLIB_CONFIG"; then echo "$as_me:$LINENO: result: $GLIB_CONFIG" >&5 echo "${ECHO_T}$GLIB_CONFIG" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi min_glib_version=1.2.0 echo "$as_me:$LINENO: checking for GLIB - version >= $min_glib_version" >&5 echo $ECHO_N "checking for GLIB - version >= $min_glib_version... $ECHO_C" >&6 no_glib="" if test "$GLIB_CONFIG" = "no" ; then no_glib=yes else GLIB_CFLAGS=`$GLIB_CONFIG $glib_config_args --cflags` GLIB_LIBS=`$GLIB_CONFIG $glib_config_args --libs` glib_config_major_version=`$GLIB_CONFIG $glib_config_args --version | \ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'` glib_config_minor_version=`$GLIB_CONFIG $glib_config_args --version | \ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'` glib_config_micro_version=`$GLIB_CONFIG $glib_config_args --version | \ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'` if test "x$enable_glibtest" = "xyes" ; then ac_save_CFLAGS="$CFLAGS" ac_save_LIBS="$LIBS" CFLAGS="$CFLAGS $GLIB_CFLAGS" LIBS="$GLIB_LIBS $LIBS" rm -f conf.glibtest if test "$cross_compiling" = yes; then echo $ac_n "cross compiling; assumed OK... $ac_c" else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include int main () { int major, minor, micro; char *tmp_version; system ("touch conf.glibtest"); /* HP/UX 9 (%@#!) writes to sscanf strings */ tmp_version = g_strdup("$min_glib_version"); if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { printf("%s, bad version string\n", "$min_glib_version"); exit(1); } if ((glib_major_version != $glib_config_major_version) || (glib_minor_version != $glib_config_minor_version) || (glib_micro_version != $glib_config_micro_version)) { printf("\n*** 'glib-config --version' returned %d.%d.%d, but GLIB (%d.%d.%d)\n", $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version, glib_major_version, glib_minor_version, glib_micro_version); printf ("*** was found! If glib-config was correct, then it is best\n"); printf ("*** to remove the old version of GLIB. You may also be able to fix the error\n"); printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); printf("*** required on your system.\n"); printf("*** If glib-config was wrong, set the environment variable GLIB_CONFIG\n"); printf("*** to point to the correct copy of glib-config, and remove the file config.cache\n"); printf("*** before re-running configure\n"); } else if ((glib_major_version != GLIB_MAJOR_VERSION) || (glib_minor_version != GLIB_MINOR_VERSION) || (glib_micro_version != GLIB_MICRO_VERSION)) { printf("*** GLIB header files (version %d.%d.%d) do not match\n", GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION); printf("*** library (version %d.%d.%d)\n", glib_major_version, glib_minor_version, glib_micro_version); } else { if ((glib_major_version > major) || ((glib_major_version == major) && (glib_minor_version > minor)) || ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro))) { return 0; } else { printf("\n*** An old version of GLIB (%d.%d.%d) was found.\n", glib_major_version, glib_minor_version, glib_micro_version); printf("*** You need a version of GLIB newer than %d.%d.%d. The latest version of\n", major, minor, micro); printf("*** GLIB is always available from ftp://ftp.gtk.org.\n"); printf("***\n"); printf("*** If you have already installed a sufficiently new version, this error\n"); printf("*** probably means that the wrong copy of the glib-config shell script is\n"); printf("*** being found. The easiest way to fix this is to remove the old version\n"); printf("*** of GLIB, but you can also set the GLIB_CONFIG environment to point to the\n"); printf("*** correct copy of glib-config. (In this case, you will have to\n"); printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); printf("*** so that the correct libraries are found at run-time))\n"); } } return 1; } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) no_glib=yes fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi fi if test "x$no_glib" = x ; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 : else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 if test "$GLIB_CONFIG" = "no" ; then echo "*** The glib-config script installed by GLIB could not be found" echo "*** If GLIB was installed in PREFIX, make sure PREFIX/bin is in" echo "*** your path, or set the GLIB_CONFIG environment variable to the" echo "*** full path to glib-config." else if test -f conf.glibtest ; then : else echo "*** Could not run GLIB test program, checking why..." CFLAGS="$CFLAGS $GLIB_CFLAGS" LIBS="$LIBS $GLIB_LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding GLIB or finding the wrong" echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your" echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" echo "*** to the installed location Also, make sure you have run ldconfig if that" echo "*** is required on your system" echo "***" echo "*** If you have an old version installed, it is best to remove it, although" echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" echo "***" echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that" echo "*** came with the system with the command" echo "***" echo "*** rpm --erase --nodeps gtk gtk-devel" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 echo "*** The test program failed to compile or link. See the file config.log for the" echo "*** exact error that occured. This usually means GLIB was incorrectly installed" echo "*** or that you have moved GLIB since it was installed. In the latter case, you" echo "*** may want to edit the glib-config script: $GLIB_CONFIG" fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi fi GLIB_CFLAGS="" GLIB_LIBS="" exit 1 fi rm -f conf.glibtest # Check whether --with-gtk-prefix or --without-gtk-prefix was given. if test "${with_gtk_prefix+set}" = set; then withval="$with_gtk_prefix" gtk_config_prefix="$withval" else gtk_config_prefix="" fi; # Check whether --with-gtk-exec-prefix or --without-gtk-exec-prefix was given. if test "${with_gtk_exec_prefix+set}" = set; then withval="$with_gtk_exec_prefix" gtk_config_exec_prefix="$withval" else gtk_config_exec_prefix="" fi; # Check whether --enable-gtktest or --disable-gtktest was given. if test "${enable_gtktest+set}" = set; then enableval="$enable_gtktest" else enable_gtktest=yes fi; for module in . do case "$module" in gthread) gtk_config_args="$gtk_config_args gthread" ;; esac done if test x$gtk_config_exec_prefix != x ; then gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix" if test x${GTK_CONFIG+set} != xset ; then GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config fi fi if test x$gtk_config_prefix != x ; then gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix" if test x${GTK_CONFIG+set} != xset ; then GTK_CONFIG=$gtk_config_prefix/bin/gtk-config fi fi # Extract the first word of "gtk-config", so it can be a program name with args. set dummy gtk-config; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_GTK_CONFIG+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $GTK_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_GTK_CONFIG="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_path_GTK_CONFIG" && ac_cv_path_GTK_CONFIG="no" ;; esac fi GTK_CONFIG=$ac_cv_path_GTK_CONFIG if test -n "$GTK_CONFIG"; then echo "$as_me:$LINENO: result: $GTK_CONFIG" >&5 echo "${ECHO_T}$GTK_CONFIG" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi min_gtk_version=1.2.0 echo "$as_me:$LINENO: checking for GTK - version >= $min_gtk_version" >&5 echo $ECHO_N "checking for GTK - version >= $min_gtk_version... $ECHO_C" >&6 no_gtk="" if test "$GTK_CONFIG" = "no" ; then no_gtk=yes else GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags` GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs` gtk_config_major_version=`$GTK_CONFIG $gtk_config_args --version | \ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'` gtk_config_minor_version=`$GTK_CONFIG $gtk_config_args --version | \ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'` gtk_config_micro_version=`$GTK_CONFIG $gtk_config_args --version | \ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'` if test "x$enable_gtktest" = "xyes" ; then ac_save_CFLAGS="$CFLAGS" ac_save_LIBS="$LIBS" CFLAGS="$CFLAGS $GTK_CFLAGS" LIBS="$GTK_LIBS $LIBS" rm -f conf.gtktest if test "$cross_compiling" = yes; then echo $ac_n "cross compiling; assumed OK... $ac_c" else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include int main () { int major, minor, micro; char *tmp_version; system ("touch conf.gtktest"); /* HP/UX 9 (%@#!) writes to sscanf strings */ tmp_version = g_strdup("$min_gtk_version"); if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { printf("%s, bad version string\n", "$min_gtk_version"); exit(1); } if ((gtk_major_version != $gtk_config_major_version) || (gtk_minor_version != $gtk_config_minor_version) || (gtk_micro_version != $gtk_config_micro_version)) { printf("\n*** 'gtk-config --version' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n", $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version, gtk_major_version, gtk_minor_version, gtk_micro_version); printf ("*** was found! If gtk-config was correct, then it is best\n"); printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n"); printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); printf("*** required on your system.\n"); printf("*** If gtk-config was wrong, set the environment variable GTK_CONFIG\n"); printf("*** to point to the correct copy of gtk-config, and remove the file config.cache\n"); printf("*** before re-running configure\n"); } #if defined (GTK_MAJOR_VERSION) && defined (GTK_MINOR_VERSION) && defined (GTK_MICRO_VERSION) else if ((gtk_major_version != GTK_MAJOR_VERSION) || (gtk_minor_version != GTK_MINOR_VERSION) || (gtk_micro_version != GTK_MICRO_VERSION)) { printf("*** GTK+ header files (version %d.%d.%d) do not match\n", GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION); printf("*** library (version %d.%d.%d)\n", gtk_major_version, gtk_minor_version, gtk_micro_version); } #endif /* defined (GTK_MAJOR_VERSION) ... */ else { if ((gtk_major_version > major) || ((gtk_major_version == major) && (gtk_minor_version > minor)) || ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro))) { return 0; } else { printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n", gtk_major_version, gtk_minor_version, gtk_micro_version); printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n", major, minor, micro); printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n"); printf("***\n"); printf("*** If you have already installed a sufficiently new version, this error\n"); printf("*** probably means that the wrong copy of the gtk-config shell script is\n"); printf("*** being found. The easiest way to fix this is to remove the old version\n"); printf("*** of GTK+, but you can also set the GTK_CONFIG environment to point to the\n"); printf("*** correct copy of gtk-config. (In this case, you will have to\n"); printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); printf("*** so that the correct libraries are found at run-time))\n"); } } return 1; } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) no_gtk=yes fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi fi if test "x$no_gtk" = x ; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 : else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 if test "$GTK_CONFIG" = "no" ; then echo "*** The gtk-config script installed by GTK could not be found" echo "*** If GTK was installed in PREFIX, make sure PREFIX/bin is in" echo "*** your path, or set the GTK_CONFIG environment variable to the" echo "*** full path to gtk-config." else if test -f conf.gtktest ; then : else echo "*** Could not run GTK test program, checking why..." CFLAGS="$CFLAGS $GTK_CFLAGS" LIBS="$LIBS $GTK_LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding GTK or finding the wrong" echo "*** version of GTK. If it is not finding GTK, you'll need to set your" echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" echo "*** to the installed location Also, make sure you have run ldconfig if that" echo "*** is required on your system" echo "***" echo "*** If you have an old version installed, it is best to remove it, although" echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" echo "***" echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that" echo "*** came with the system with the command" echo "***" echo "*** rpm --erase --nodeps gtk gtk-devel" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 echo "*** The test program failed to compile or link. See the file config.log for the" echo "*** exact error that occured. This usually means GTK was incorrectly installed" echo "*** or that you have moved GTK since it was installed. In the latter case, you" echo "*** may want to edit the gtk-config script: $GTK_CONFIG" fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi fi GTK_CFLAGS="" GTK_LIBS="" exit 1 fi rm -f conf.gtktest # Check whether --with-gdk-pixbuf-prefix or --without-gdk-pixbuf-prefix was given. if test "${with_gdk_pixbuf_prefix+set}" = set; then withval="$with_gdk_pixbuf_prefix" gdk_pixbuf_prefix="$withval" else gdk_pixbuf_prefix="" fi; # Check whether --with-gdk-pixbuf-exec-prefix or --without-gdk-pixbuf-exec-prefix was given. if test "${with_gdk_pixbuf_exec_prefix+set}" = set; then withval="$with_gdk_pixbuf_exec_prefix" gdk_pixbuf_exec_prefix="$withval" else gdk_pixbuf_exec_prefix="" fi; # Check whether --enable-gdk_pixbuftest or --disable-gdk_pixbuftest was given. if test "${enable_gdk_pixbuftest+set}" = set; then enableval="$enable_gdk_pixbuftest" else enable_gdk_pixbuftest=yes fi; if test x$gdk_pixbuf_exec_prefix != x ; then gdk_pixbuf_args="$gdk_pixbuf_args --exec-prefix=$gdk_pixbuf_exec_prefix" if test x${GDK_PIXBUF_CONFIG+set} = xset ; then GDK_PIXBUF_CONFIG=$gdk_pixbuf_exec_prefix/gdk-pixbuf-config fi fi if test x$gdk_pixbuf_prefix != x ; then gdk_pixbuf_args="$gdk_pixbuf_args --prefix=$gdk_pixbuf_prefix" if test x${GDK_PIXBUF_CONFIG+set} = xset ; then GDK_PIXBUF_CONFIG=$gdk_pixbuf_prefix/bin/gdk-pixbuf-config fi fi # Extract the first word of "gdk-pixbuf-config", so it can be a program name with args. set dummy gdk-pixbuf-config; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_GDK_PIXBUF_CONFIG+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $GDK_PIXBUF_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_GDK_PIXBUF_CONFIG="$GDK_PIXBUF_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_GDK_PIXBUF_CONFIG="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_path_GDK_PIXBUF_CONFIG" && ac_cv_path_GDK_PIXBUF_CONFIG="no" ;; esac fi GDK_PIXBUF_CONFIG=$ac_cv_path_GDK_PIXBUF_CONFIG if test -n "$GDK_PIXBUF_CONFIG"; then echo "$as_me:$LINENO: result: $GDK_PIXBUF_CONFIG" >&5 echo "${ECHO_T}$GDK_PIXBUF_CONFIG" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi min_gdk_pixbuf_version=0.2.5 echo "$as_me:$LINENO: checking for GDK_PIXBUF - version >= $min_gdk_pixbuf_version" >&5 echo $ECHO_N "checking for GDK_PIXBUF - version >= $min_gdk_pixbuf_version... $ECHO_C" >&6 no_gdk_pixbuf="" if test "$GDK_PIXBUF_CONFIG" = "no" ; then no_gdk_pixbuf=yes else GDK_PIXBUF_CFLAGS=`$GDK_PIXBUF_CONFIG $gdk_pixbufconf_args --cflags` GDK_PIXBUF_LIBS=`$GDK_PIXBUF_CONFIG $gdk_pixbufconf_args --libs` gdk_pixbuf_major_version=`$GDK_PIXBUF_CONFIG $gdk_pixbuf_args --version | \ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'` gdk_pixbuf_minor_version=`$GDK_PIXBUF_CONFIG $gdk_pixbuf_args --version | \ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'` gdk_pixbuf_micro_version=`$GDK_PIXBUF_CONFIG $gdk_pixbuf_config_args --version | \ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'` if test "x$enable_gdk_pixbuftest" = "xyes" ; then ac_save_CFLAGS="$CFLAGS" ac_save_LIBS="$LIBS" CFLAGS="$CFLAGS $GDK_PIXBUF_CFLAGS" LIBS="$LIBS $GDK_PIXBUF_LIBS" rm -f conf.gdk_pixbuftest if test "$cross_compiling" = yes; then echo $ac_n "cross compiling; assumed OK... $ac_c" else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include char* my_strdup (char *str) { char *new_str; if (str) { new_str = malloc ((strlen (str) + 1) * sizeof(char)); strcpy (new_str, str); } else new_str = NULL; return new_str; } int main () { int major, minor, micro; char *tmp_version; system ("touch conf.gdk_pixbuftest"); /* HP/UX 9 (%@#!) writes to sscanf strings */ tmp_version = my_strdup("$min_gdk_pixbuf_version"); if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { printf("%s, bad version string\n", "$min_gdk_pixbuf_version"); exit(1); } if (($gdk_pixbuf_major_version > major) || (($gdk_pixbuf_major_version == major) && ($gdk_pixbuf_minor_version > minor)) || (($gdk_pixbuf_major_version == major) && ($gdk_pixbuf_minor_version == minor) && ($gdk_pixbuf_micro_version >= micro))) { return 0; } else { printf("\n*** 'gdk-pixbuf-config --version' returned %d.%d.%d, but the minimum version\n", $gdk_pixbuf_major_version, $gdk_pixbuf_minor_version, $gdk_pixbuf_micro_version); printf("*** of GDK_PIXBUF required is %d.%d.%d. If gdk-pixbuf-config is correct, then it is\n", major, minor, micro); printf("*** best to upgrade to the required version.\n"); printf("*** If gdk-pixbuf-config was wrong, set the environment variable GDK_PIXBUF_CONFIG\n"); printf("*** to point to the correct copy of gdk-pixbuf-config, and remove the file\n"); printf("*** config.cache before re-running configure\n"); return 1; } } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) no_gdk_pixbuf=yes fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi fi if test "x$no_gdk_pixbuf" = x ; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 : else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 if test "$GDK_PIXBUF_CONFIG" = "no" ; then echo "*** The gdk-pixbuf-config script installed by GDK_PIXBUF could not be found" echo "*** If GDK_PIXBUF was installed in PREFIX, make sure PREFIX/bin is in" echo "*** your path, or set the GDK_PIXBUF_CONFIG environment variable to the" echo "*** full path to gdk-pixbuf-config." else if test -f conf.gdk_pixbuftest ; then : else echo "*** Could not run GDK_PIXBUF test program, checking why..." CFLAGS="$CFLAGS $GDK_PIXBUF_CFLAGS" LIBS="$LIBS $GDK_PIXBUF_LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding GDK_PIXBUF or finding the wrong" echo "*** version of GDK_PIXBUF. If it is not finding GDK_PIXBUF, you'll need to set your" echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" echo "*** to the installed location Also, make sure you have run ldconfig if that" echo "*** is required on your system" echo "***" echo "*** If you have an old version installed, it is best to remove it, although" echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 echo "*** The test program failed to compile or link. See the file config.log for the" echo "*** exact error that occured. This usually means GDK_PIXBUF was incorrectly installed" echo "*** or that you have moved GDK_PIXBUF since it was installed. In the latter case, you" echo "*** may want to edit the gdk-pixbuf-config script: $GDK_PIXBUF_CONFIG" fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi fi GDK_PIXBUF_CFLAGS="" GDK_PIXBUF_LIBS="" { { echo "$as_me:$LINENO: error: gdk-pixbuf not found, please install gdk-pixbuf-devel" >&5 echo "$as_me: error: gdk-pixbuf not found, please install gdk-pixbuf-devel" >&2;} { (exit 1); exit 1; }; } fi rm -f conf.gdk_pixbuftest fi # Check whether --with-qstat or --without-qstat was given. if test "${with_qstat+set}" = set; then withval="$with_qstat" fi; echo "$as_me:$LINENO: checking qstat version" >&5 echo $ECHO_N "checking qstat version... $ECHO_C" >&6 QSTATEXEC="qstat" if test "x$with_qstat" != "x" ; then QSTATEXEC="$with_qstat" fi qstat_version=`$QSTATEXEC 2>/dev/null | grep version | cut -d' ' -f 3` if test "x$qstat_version" = "x" ; then echo "$as_me:$LINENO: result: qstat not found" >&5 echo "${ECHO_T}qstat not found" >&6 qstat_is=notfound else echo "$as_me:$LINENO: result: $qstat_version" >&5 echo "${ECHO_T}$qstat_version" >&6 fi if test "${ac_cv_header_zlib_h+set}" = set; then echo "$as_me:$LINENO: checking for zlib.h" >&5 echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6 if test "${ac_cv_header_zlib_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 echo "${ECHO_T}$ac_cv_header_zlib_h" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking zlib.h usability" >&5 echo $ECHO_N "checking zlib.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking zlib.h presence" >&5 echo $ECHO_N "checking zlib.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: zlib.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: zlib.h: present but cannot be compiled" >&5 echo "$as_me: WARNING: zlib.h: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: zlib.h: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: zlib.h: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: zlib.h: see the Autoconf documentation" >&5 echo "$as_me: WARNING: zlib.h: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: zlib.h: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: zlib.h: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: zlib.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: zlib.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: zlib.h: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## -------------------------------------------------- ## ## Report this to xqf-developer@lists.sourceforge.net ## ## -------------------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for zlib.h" >&5 echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6 if test "${ac_cv_header_zlib_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_zlib_h=$ac_header_preproc fi echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 echo "${ECHO_T}$ac_cv_header_zlib_h" >&6 fi if test $ac_cv_header_zlib_h = yes; then : else { { echo "$as_me:$LINENO: error: zlib.h not found, please install zlib development files" >&5 echo "$as_me: error: zlib.h not found, please install zlib development files" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:$LINENO: checking for crc32 in -lz" >&5 echo $ECHO_N "checking for crc32 in -lz... $ECHO_C" >&6 if test "${ac_cv_lib_z_crc32+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lz $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char crc32 (); int main () { crc32 (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_z_crc32=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_z_crc32=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_z_crc32" >&5 echo "${ECHO_T}$ac_cv_lib_z_crc32" >&6 if test $ac_cv_lib_z_crc32 = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_LIBZ _ACEOF else { { echo "$as_me:$LINENO: error: libz not found" >&5 echo "$as_me: error: libz not found" >&2;} { (exit 1); exit 1; }; } fi XQFRCON_LIBS= # Check whether --enable-externalrcon or --disable-externalrcon was given. if test "${enable_externalrcon+set}" = set; then enableval="$enable_externalrcon" fi; if test x$enable_externalrcon = xyes; then if test "${ac_cv_header_readline_readline_h+set}" = set; then echo "$as_me:$LINENO: checking for readline/readline.h" >&5 echo $ECHO_N "checking for readline/readline.h... $ECHO_C" >&6 if test "${ac_cv_header_readline_readline_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: $ac_cv_header_readline_readline_h" >&5 echo "${ECHO_T}$ac_cv_header_readline_readline_h" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking readline/readline.h usability" >&5 echo $ECHO_N "checking readline/readline.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking readline/readline.h presence" >&5 echo $ECHO_N "checking readline/readline.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: readline/readline.h: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: readline/readline.h: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: readline/readline.h: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: readline/readline.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: readline/readline.h: present but cannot be compiled" >&5 echo "$as_me: WARNING: readline/readline.h: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: readline/readline.h: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: readline/readline.h: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: readline/readline.h: see the Autoconf documentation" >&5 echo "$as_me: WARNING: readline/readline.h: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: readline/readline.h: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: readline/readline.h: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: readline/readline.h: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: readline/readline.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: readline/readline.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: readline/readline.h: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## -------------------------------------------------- ## ## Report this to xqf-developer@lists.sourceforge.net ## ## -------------------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for readline/readline.h" >&5 echo $ECHO_N "checking for readline/readline.h... $ECHO_C" >&6 if test "${ac_cv_header_readline_readline_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_readline_readline_h=$ac_header_preproc fi echo "$as_me:$LINENO: result: $ac_cv_header_readline_readline_h" >&5 echo "${ECHO_T}$ac_cv_header_readline_readline_h" >&6 fi if test $ac_cv_header_readline_readline_h = yes; then have_readline_hdr=yes fi echo "$as_me:$LINENO: checking for readline in -lreadline" >&5 echo $ECHO_N "checking for readline in -lreadline... $ECHO_C" >&6 if test "${ac_cv_lib_readline_readline+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lreadline -lncurses $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char readline (); int main () { readline (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_readline_readline=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_readline_readline=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_readline_readline" >&5 echo "${ECHO_T}$ac_cv_lib_readline_readline" >&6 if test $ac_cv_lib_readline_readline = yes; then have_readline_lib=yes fi if test "${ac_cv_header_readline_history_h+set}" = set; then echo "$as_me:$LINENO: checking for readline/history.h" >&5 echo $ECHO_N "checking for readline/history.h... $ECHO_C" >&6 if test "${ac_cv_header_readline_history_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: $ac_cv_header_readline_history_h" >&5 echo "${ECHO_T}$ac_cv_header_readline_history_h" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking readline/history.h usability" >&5 echo $ECHO_N "checking readline/history.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking readline/history.h presence" >&5 echo $ECHO_N "checking readline/history.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: readline/history.h: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: readline/history.h: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: readline/history.h: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: readline/history.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: readline/history.h: present but cannot be compiled" >&5 echo "$as_me: WARNING: readline/history.h: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: readline/history.h: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: readline/history.h: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: readline/history.h: see the Autoconf documentation" >&5 echo "$as_me: WARNING: readline/history.h: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: readline/history.h: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: readline/history.h: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: readline/history.h: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: readline/history.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: readline/history.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: readline/history.h: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## -------------------------------------------------- ## ## Report this to xqf-developer@lists.sourceforge.net ## ## -------------------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for readline/history.h" >&5 echo $ECHO_N "checking for readline/history.h... $ECHO_C" >&6 if test "${ac_cv_header_readline_history_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_readline_history_h=$ac_header_preproc fi echo "$as_me:$LINENO: result: $ac_cv_header_readline_history_h" >&5 echo "${ECHO_T}$ac_cv_header_readline_history_h" >&6 fi if test $ac_cv_header_readline_history_h = yes; then have_history_hdr=yes fi echo "$as_me:$LINENO: checking for add_history in -lreadline" >&5 echo $ECHO_N "checking for add_history in -lreadline... $ECHO_C" >&6 if test "${ac_cv_lib_readline_add_history+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lreadline -lncurses $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char add_history (); int main () { add_history (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_readline_add_history=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_readline_add_history=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_readline_add_history" >&5 echo "${ECHO_T}$ac_cv_lib_readline_add_history" >&6 if test $ac_cv_lib_readline_add_history = yes; then have_history_lib=yes fi if test x$have_readline_hdr = xyes -a x$have_readline_lib = xyes; then if test x$have_history_hdr = xyes -a x$have_history_lib = xyes; then XQFRCON_LIBS="-lreadline -lncurses" else { echo "$as_me:$LINENO: WARNING: libreadline not found, rcon program disabled" >&5 echo "$as_me: WARNING: libreadline not found, rcon program disabled" >&2;} fi else { echo "$as_me:$LINENO: WARNING: libreadline not found, rcon program disabled" >&5 echo "$as_me: WARNING: libreadline not found, rcon program disabled" >&2;} fi fi if test "x$XQFRCON_LIBS" != x; then BUILD_XQFRCON_TRUE= BUILD_XQFRCON_FALSE='#' else BUILD_XQFRCON_TRUE='#' BUILD_XQFRCON_FALSE= fi if test "${ac_cv_header_GeoIP_h+set}" = set; then echo "$as_me:$LINENO: checking for GeoIP.h" >&5 echo $ECHO_N "checking for GeoIP.h... $ECHO_C" >&6 if test "${ac_cv_header_GeoIP_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: $ac_cv_header_GeoIP_h" >&5 echo "${ECHO_T}$ac_cv_header_GeoIP_h" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking GeoIP.h usability" >&5 echo $ECHO_N "checking GeoIP.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking GeoIP.h presence" >&5 echo $ECHO_N "checking GeoIP.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: GeoIP.h: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: GeoIP.h: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: GeoIP.h: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: GeoIP.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: GeoIP.h: present but cannot be compiled" >&5 echo "$as_me: WARNING: GeoIP.h: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: GeoIP.h: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: GeoIP.h: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: GeoIP.h: see the Autoconf documentation" >&5 echo "$as_me: WARNING: GeoIP.h: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: GeoIP.h: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: GeoIP.h: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: GeoIP.h: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: GeoIP.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: GeoIP.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: GeoIP.h: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## -------------------------------------------------- ## ## Report this to xqf-developer@lists.sourceforge.net ## ## -------------------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for GeoIP.h" >&5 echo $ECHO_N "checking for GeoIP.h... $ECHO_C" >&6 if test "${ac_cv_header_GeoIP_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_GeoIP_h=$ac_header_preproc fi echo "$as_me:$LINENO: result: $ac_cv_header_GeoIP_h" >&5 echo "${ECHO_T}$ac_cv_header_GeoIP_h" >&6 fi if test $ac_cv_header_GeoIP_h = yes; then have_geoip_hdr=yes else have_geoip_hdr=no fi echo "$as_me:$LINENO: checking whether GeoIP should be used" >&5 echo $ECHO_N "checking whether GeoIP should be used... $ECHO_C" >&6 # Check whether --enable-geoip or --disable-geoip was given. if test "${enable_geoip+set}" = set; then enableval="$enable_geoip" USE_GEOIP=$enableval else USE_GEOIP=yes fi; echo "$as_me:$LINENO: result: $USE_GEOIP" >&5 echo "${ECHO_T}$USE_GEOIP" >&6 # --enable-geoip-dummy=/usr/lib/libGeoIP.so echo "$as_me:$LINENO: checking whether a GeoIP dummy library should be used" >&5 echo $ECHO_N "checking whether a GeoIP dummy library should be used... $ECHO_C" >&6 # Check whether --enable-geoip_dummy or --disable-geoip_dummy was given. if test "${enable_geoip_dummy+set}" = set; then enableval="$enable_geoip_dummy" use_geoip_dummy="$enableval" else use_geoip_dummy=no fi; echo "$as_me:$LINENO: result: $use_geoip_dummy" >&5 echo "${ECHO_T}$use_geoip_dummy" >&6 if test "x$USE_GEOIP" != "xno"; then if test "x$have_geoip_hdr" = "xyes";then cat >>confdefs.h <<_ACEOF #define USE_GEOIP 1 _ACEOF if test "x$USE_GEOIP" = "xyes"; then if test "x$use_geoip_dummy" != "xno"; then DUMMY_LIBGEOIP_SONAME=`objdump -p "$use_geoip_dummy"|awk '$1 == "SONAME" {print $2}'` if test "x$DUMMY_LIBGEOIP_SONAME" != x; then DUMMY_LIBGEOIP_ORIG="$use_geoip_dummy" GEOIP_LIB='-L$(top_builddir)/src -lxqf_dummy_GeoIP' else { { echo "$as_me:$LINENO: error: $use_geoip_dummy is no valid GeoIP library" >&5 echo "$as_me: error: $use_geoip_dummy is no valid GeoIP library" >&2;} { (exit 1); exit 1; }; } fi else GEOIP_LIB="-lGeoIP" fi else GEOIP_LIB="$USE_GEOIP" fi else { echo "$as_me:$LINENO: WARNING: GeoIP.h not found, GeoIP feature disabled" >&5 echo "$as_me: WARNING: GeoIP.h not found, GeoIP feature disabled" >&2;} fi fi if test x$DUMMY_LIBGEOIP_SONAME != x; then DUMMY_LIBGEOIP_TRUE= DUMMY_LIBGEOIP_FALSE='#' else DUMMY_LIBGEOIP_TRUE='#' DUMMY_LIBGEOIP_FALSE= fi # --enable-geoip-dummy=/usr/lib/libGeoIP.so echo "$as_me:$LINENO: checking whether a GDK-Pixbuf dummy library should be used" >&5 echo $ECHO_N "checking whether a GDK-Pixbuf dummy library should be used... $ECHO_C" >&6 # Check whether --enable-pixbuf_dummy or --disable-pixbuf_dummy was given. if test "${enable_pixbuf_dummy+set}" = set; then enableval="$enable_pixbuf_dummy" use_pixbuf_dummy="$enableval" else use_pixbuf_dummy=no fi; echo "$as_me:$LINENO: result: $use_pixbuf_dummy" >&5 echo "${ECHO_T}$use_pixbuf_dummy" >&6 if test "x$use_pixbuf_dummy" != "xno"; then DUMMY_LIBGDKPIXBUF_SONAME=`objdump -p "$use_pixbuf_dummy"|awk '$1 == "SONAME" {print $2}'` if test "x$DUMMY_LIBGDKPIXBUF_SONAME" != x; then DUMMY_LIBGDKPIXBUF_ORIG="$use_pixbuf_dummy" GDK_PIXBUF_LIBS="-lxqf_dummy_gdk_pixbuf" else { { echo "$as_me:$LINENO: error: $use_pixbuf_dummy is no valid library" >&5 echo "$as_me: error: $use_pixbuf_dummy is no valid library" >&2;} { (exit 1); exit 1; }; } fi fi if test x$DUMMY_LIBGDKPIXBUF_SONAME != x; then DUMMY_LIBGDKPIXBUF_TRUE= DUMMY_LIBGDKPIXBUF_FALSE='#' else DUMMY_LIBGDKPIXBUF_TRUE='#' DUMMY_LIBGDKPIXBUF_FALSE= fi COMPRESSION="-DCOMPRESSOR_GZIP" # Check whether --enable-bzip2 or --disable-bzip2 was given. if test "${enable_bzip2+set}" = set; then enableval="$enable_bzip2" fi; if test x$enable_bzip2 = xyes; then COMPRESSION="-DCOMPRESSOR_BZIP2" fi # Check whether --enable-debug or --disable-debug was given. if test "${enable_debug+set}" = set; then enableval="$enable_debug" fi; if test x$enable_debug = xyes; then DEBUG="-DDEBUG" CFLAGS="-g -O0" else DEBUG="" fi cat >>confdefs.h <<_ACEOF #define XQF_VERSION "$VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define QSTAT_EXEC "$QSTATEXEC" _ACEOF # workaround for intl/ which requires config.h echo "configure: creating link config.h -> src/gnuconfig.h" test -e config.h -a ! -L config.h && rm config.h test ! -e config.h && ln -s src/gnuconfig.h config.h rm -f intl/libintl.h # damn gettext should do that itself! if test "$USE_INCLUDED_LIBINTL" = "yes"; then echo "configure: creating link intl/libintl.h -> libgnuintl.h" ln -s libgnuintl.h intl/libintl.h fi if test "x$GCC" = "xyes"; then case " $CFLAGS " in *[\ \ ]-Wall[\ \ ]*) ;; *) CFLAGS="$CFLAGS -Wall" ;; esac fi # Check whether --enable-profiling or --disable-profiling was given. if test "${enable_profiling+set}" = set; then enableval="$enable_profiling" fi; echo "$as_me:$LINENO: checking whether profiling is requested" >&5 echo $ECHO_N "checking whether profiling is requested... $ECHO_C" >&6 if test x$enable_profiling = xyes; then CFLAGS="$CFLAGS -pg" echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi ac_config_files="$ac_config_files Makefile src/Makefile src/xpm/Makefile src/zip/Makefile src/tga/Makefile docs/Makefile pixmaps/Makefile pixmaps/flags/Makefile pixmaps/trayicon/Makefile xqf.spec po/Makefile.in" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, don't put newlines in cache variables' values. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. { (set) 2>&1 | case `(ac_space=' '; set | grep ac_space) 2>&1` in *ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n \ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; esac; } | sed ' t clear : clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ : end' >>confcache if diff $cache_file confcache >/dev/null 2>&1; then :; else if test -w $cache_file; then test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" cat confcache >$cache_file else echo "not updating unwritable cache $cache_file" fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' # VPATH may cause trouble with some makes, so we remove $(srcdir), # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=/{ s/:*\$(srcdir):*/:/; s/:*\${srcdir}:*/:/; s/:*@srcdir@:*/:/; s/^\([^=]*=[ ]*\):*/\1/; s/:*$//; s/^[^=]*=[ ]*$//; }' fi DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_i=`echo "$ac_i" | sed 's/\$U\././;s/\.o$//;s/\.obj$//'` # 2. Add them. ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs mv -f po/POTFILES po/POTFILES.tmp sed -e '/[[]encoding.*]/d' -e 's/[[].*] *//' < po/POTFILES.tmp > po/POTFILES rm -f po/POTFILES.tmp if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${BUILD_XQFRCON_TRUE}" && test -z "${BUILD_XQFRCON_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"BUILD_XQFRCON\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"BUILD_XQFRCON\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${DUMMY_LIBGEOIP_TRUE}" && test -z "${DUMMY_LIBGEOIP_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"DUMMY_LIBGEOIP\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"DUMMY_LIBGEOIP\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${DUMMY_LIBGDKPIXBUF_TRUE}" && test -z "${DUMMY_LIBGDKPIXBUF_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"DUMMY_LIBGDKPIXBUF\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"DUMMY_LIBGDKPIXBUF\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi : ${CONFIG_STATUS=./config.status} ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # Work around bugs in pre-3.0 UWIN ksh. $as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)$' \| \ . : '\(.\)' 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } /^X\/\(\/\/\)$/{ s//\1/; q; } /^X\/\(\/\).*/{ s//\1/; q; } s/.*/./; q'` # PATH needs CR, and LINENO needs CR and PATH. # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" || { # Find who we are. Look in the path if we contain no path at all # relative or not. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} { (exit 1); exit 1; }; } fi case $CONFIG_SHELL in '') as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for as_base in sh bash ksh sh5; do case $as_dir in /*) if ("$as_dir/$as_base" -c ' as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } CONFIG_SHELL=$as_dir/$as_base export CONFIG_SHELL exec "$CONFIG_SHELL" "$0" ${1+"$@"} fi;; esac done done ;; esac # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line before each line; the second 'sed' does the real # work. The second script uses 'N' to pair each line-number line # with the numbered line, and appends trailing '-' during # substitution so that $LINENO is not a special case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) sed '=' <$as_myself | sed ' N s,$,-, : loop s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, t loop s,-$,, s,^['$as_cr_digits']*\n,, ' >$as_me.lineno && chmod +x $as_me.lineno || { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensible to this). . ./$as_me.lineno # Exit status is that of the last command. exit } case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in *c*,-n*) ECHO_N= ECHO_C=' ' ECHO_T=' ' ;; *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then # We could just check for DJGPP; but this test a) works b) is more generic # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). if test -f conf$$.exe; then # Don't use ln at all; we don't have any links as_ln_s='cp -p' else as_ln_s='ln -s' fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.file if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" # IFS # We need space, tab and new line, in precisely that order. as_nl=' ' IFS=" $as_nl" # CDPATH. $as_unset CDPATH exec 6>&1 # Open the log real soon, to keep \$[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. Logging --version etc. is OK. exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX } >&5 cat >&5 <<_CSEOF This file was extended by XQF $as_me 1.0.5, which was generated by GNU Autoconf 2.59. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ _CSEOF echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 echo >&5 _ACEOF # Files that config.status was made for. if test -n "$ac_config_files"; then echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS fi if test -n "$ac_config_headers"; then echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS fi if test -n "$ac_config_links"; then echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS fi if test -n "$ac_config_commands"; then echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS fi cat >>$CONFIG_STATUS <<\_ACEOF ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ XQF config.status 1.0.5 configured by $0, generated by GNU Autoconf 2.59, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" Copyright (C) 2003 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." srcdir=$srcdir INSTALL="$INSTALL" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # If no file are specified by the user, then we need to provide default # value. By we need to know if files were specified by the user. ac_need_defaults=: while test $# != 0 do case $1 in --*=*) ac_option=`expr "x$1" : 'x\([^=]*\)='` ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` ac_shift=: ;; -*) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; *) # This is not an option, so the user has probably given explicit # arguments. ac_option=$1 ac_need_defaults=false;; esac case $ac_option in # Handling of the options. _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --vers* | -V ) echo "$ac_cs_version"; exit 0 ;; --he | --h) # Conflict between --help and --header { { echo "$as_me:$LINENO: error: ambiguous option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: ambiguous option: $1 Try \`$0 --help' for more information." >&2;} { (exit 1); exit 1; }; };; --help | --hel | -h ) echo "$ac_cs_usage"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift CONFIG_FILES="$CONFIG_FILES $ac_optarg" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" ac_need_defaults=false;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2;} { (exit 1); exit 1; }; } ;; *) ac_config_targets="$ac_config_targets $1" ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF if \$ac_cs_recheck; then echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # # INIT-COMMANDS section. # INTLTOOL_PERL='${INTLTOOL_PERL}' ac_aux_dir=${ac_aux_dir} INTLTOOL_EXTRACT='${INTLTOOL_EXTRACT}' ICONV='${INTLTOOL_ICONV}' MSGFMT='${INTLTOOL_MSGFMT}' MSGMERGE='${INTLTOOL_MSGMERGE}' XGETTEXT='${INTLTOOL_XGETTEXT}' AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF for ac_config_target in $ac_config_targets do case "$ac_config_target" in # Handling of arguments. "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; "src/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "src/xpm/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/xpm/Makefile" ;; "src/zip/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/zip/Makefile" ;; "src/tga/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/tga/Makefile" ;; "docs/Makefile" ) CONFIG_FILES="$CONFIG_FILES docs/Makefile" ;; "pixmaps/Makefile" ) CONFIG_FILES="$CONFIG_FILES pixmaps/Makefile" ;; "pixmaps/flags/Makefile" ) CONFIG_FILES="$CONFIG_FILES pixmaps/flags/Makefile" ;; "pixmaps/trayicon/Makefile" ) CONFIG_FILES="$CONFIG_FILES pixmaps/trayicon/Makefile" ;; "xqf.spec" ) CONFIG_FILES="$CONFIG_FILES xqf.spec" ;; "po/Makefile.in" ) CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;; "intltool" ) CONFIG_COMMANDS="$CONFIG_COMMANDS intltool" ;; "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "default-1" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;; "src/gnuconfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS src/gnuconfig.h" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason to put it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Create a temporary directory, and hook for its removal unless debugging. $debug || { trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=./confstat$$-$RANDOM (umask 077 && mkdir $tmp) } || { echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # # CONFIG_FILES section. # # No need to generate the scripts if there are no CONFIG_FILES. # This happens for instance when ./config.status config.h if test -n "\$CONFIG_FILES"; then # Protect against being on the right side of a sed subst in config.status. sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF s,@SHELL@,$SHELL,;t t s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t s,@exec_prefix@,$exec_prefix,;t t s,@prefix@,$prefix,;t t s,@program_transform_name@,$program_transform_name,;t t s,@bindir@,$bindir,;t t s,@sbindir@,$sbindir,;t t s,@libexecdir@,$libexecdir,;t t s,@datadir@,$datadir,;t t s,@sysconfdir@,$sysconfdir,;t t s,@sharedstatedir@,$sharedstatedir,;t t s,@localstatedir@,$localstatedir,;t t s,@libdir@,$libdir,;t t s,@includedir@,$includedir,;t t s,@oldincludedir@,$oldincludedir,;t t s,@infodir@,$infodir,;t t s,@mandir@,$mandir,;t t s,@build_alias@,$build_alias,;t t s,@host_alias@,$host_alias,;t t s,@target_alias@,$target_alias,;t t s,@DEFS@,$DEFS,;t t s,@ECHO_C@,$ECHO_C,;t t s,@ECHO_N@,$ECHO_N,;t t s,@ECHO_T@,$ECHO_T,;t t s,@LIBS@,$LIBS,;t t s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t s,@INSTALL_DATA@,$INSTALL_DATA,;t t s,@CYGPATH_W@,$CYGPATH_W,;t t s,@PACKAGE@,$PACKAGE,;t t s,@VERSION@,$VERSION,;t t s,@ACLOCAL@,$ACLOCAL,;t t s,@AUTOCONF@,$AUTOCONF,;t t s,@AUTOMAKE@,$AUTOMAKE,;t t s,@AUTOHEADER@,$AUTOHEADER,;t t s,@MAKEINFO@,$MAKEINFO,;t t s,@install_sh@,$install_sh,;t t s,@STRIP@,$STRIP,;t t s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t s,@mkdir_p@,$mkdir_p,;t t s,@AWK@,$AWK,;t t s,@SET_MAKE@,$SET_MAKE,;t t s,@am__leading_dot@,$am__leading_dot,;t t s,@AMTAR@,$AMTAR,;t t s,@am__tar@,$am__tar,;t t s,@am__untar@,$am__untar,;t t s,@GETTEXT_PACKAGE@,$GETTEXT_PACKAGE,;t t s,@INTLTOOL_DESKTOP_RULE@,$INTLTOOL_DESKTOP_RULE,;t t s,@INTLTOOL_DIRECTORY_RULE@,$INTLTOOL_DIRECTORY_RULE,;t t s,@INTLTOOL_KEYS_RULE@,$INTLTOOL_KEYS_RULE,;t t s,@INTLTOOL_PROP_RULE@,$INTLTOOL_PROP_RULE,;t t s,@INTLTOOL_OAF_RULE@,$INTLTOOL_OAF_RULE,;t t s,@INTLTOOL_PONG_RULE@,$INTLTOOL_PONG_RULE,;t t s,@INTLTOOL_SERVER_RULE@,$INTLTOOL_SERVER_RULE,;t t s,@INTLTOOL_SHEET_RULE@,$INTLTOOL_SHEET_RULE,;t t s,@INTLTOOL_SOUNDLIST_RULE@,$INTLTOOL_SOUNDLIST_RULE,;t t s,@INTLTOOL_UI_RULE@,$INTLTOOL_UI_RULE,;t t s,@INTLTOOL_XAM_RULE@,$INTLTOOL_XAM_RULE,;t t s,@INTLTOOL_KBD_RULE@,$INTLTOOL_KBD_RULE,;t t s,@INTLTOOL_XML_RULE@,$INTLTOOL_XML_RULE,;t t s,@INTLTOOL_XML_NOMERGE_RULE@,$INTLTOOL_XML_NOMERGE_RULE,;t t s,@INTLTOOL_CAVES_RULE@,$INTLTOOL_CAVES_RULE,;t t s,@INTLTOOL_SCHEMAS_RULE@,$INTLTOOL_SCHEMAS_RULE,;t t s,@INTLTOOL_THEME_RULE@,$INTLTOOL_THEME_RULE,;t t s,@INTLTOOL_EXTRACT@,$INTLTOOL_EXTRACT,;t t s,@INTLTOOL_MERGE@,$INTLTOOL_MERGE,;t t s,@INTLTOOL_UPDATE@,$INTLTOOL_UPDATE,;t t s,@INTLTOOL_PERL@,$INTLTOOL_PERL,;t t s,@INTLTOOL_ICONV@,$INTLTOOL_ICONV,;t t s,@INTLTOOL_MSGFMT@,$INTLTOOL_MSGFMT,;t t s,@INTLTOOL_MSGMERGE@,$INTLTOOL_MSGMERGE,;t t s,@INTLTOOL_XGETTEXT@,$INTLTOOL_XGETTEXT,;t t s,@CC@,$CC,;t t s,@CFLAGS@,$CFLAGS,;t t s,@LDFLAGS@,$LDFLAGS,;t t s,@CPPFLAGS@,$CPPFLAGS,;t t s,@ac_ct_CC@,$ac_ct_CC,;t t s,@EXEEXT@,$EXEEXT,;t t s,@OBJEXT@,$OBJEXT,;t t s,@DEPDIR@,$DEPDIR,;t t s,@am__include@,$am__include,;t t s,@am__quote@,$am__quote,;t t s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t s,@CCDEPMODE@,$CCDEPMODE,;t t s,@am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t s,@am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t s,@CPP@,$CPP,;t t s,@EGREP@,$EGREP,;t t s,@USE_NLS@,$USE_NLS,;t t s,@MSGFMT@,$MSGFMT,;t t s,@GMSGFMT@,$GMSGFMT,;t t s,@XGETTEXT@,$XGETTEXT,;t t s,@CATALOGS@,$CATALOGS,;t t s,@CATOBJEXT@,$CATOBJEXT,;t t s,@DATADIRNAME@,$DATADIRNAME,;t t s,@GMOFILES@,$GMOFILES,;t t s,@INSTOBJEXT@,$INSTOBJEXT,;t t s,@INTLLIBS@,$INTLLIBS,;t t s,@PO_IN_DATADIR_TRUE@,$PO_IN_DATADIR_TRUE,;t t s,@PO_IN_DATADIR_FALSE@,$PO_IN_DATADIR_FALSE,;t t s,@POFILES@,$POFILES,;t t s,@POSUB@,$POSUB,;t t s,@LN_S@,$LN_S,;t t s,@RANLIB@,$RANLIB,;t t s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t s,@RELEASE@,$RELEASE,;t t s,@OLD_GTK_SUPPORT@,$OLD_GTK_SUPPORT,;t t s,@PKG_CONFIG@,$PKG_CONFIG,;t t s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t s,@PACKAGE_CFLAGS@,$PACKAGE_CFLAGS,;t t s,@PACKAGE_LIBS@,$PACKAGE_LIBS,;t t s,@GLIB_CONFIG@,$GLIB_CONFIG,;t t s,@GLIB_CFLAGS@,$GLIB_CFLAGS,;t t s,@GLIB_LIBS@,$GLIB_LIBS,;t t s,@GTK_CONFIG@,$GTK_CONFIG,;t t s,@GTK_CFLAGS@,$GTK_CFLAGS,;t t s,@GTK_LIBS@,$GTK_LIBS,;t t s,@GDK_PIXBUF_CONFIG@,$GDK_PIXBUF_CONFIG,;t t s,@GDK_PIXBUF_CFLAGS@,$GDK_PIXBUF_CFLAGS,;t t s,@GDK_PIXBUF_LIBS@,$GDK_PIXBUF_LIBS,;t t s,@QSTATEXEC@,$QSTATEXEC,;t t s,@XQFRCON_LIBS@,$XQFRCON_LIBS,;t t s,@BUILD_XQFRCON_TRUE@,$BUILD_XQFRCON_TRUE,;t t s,@BUILD_XQFRCON_FALSE@,$BUILD_XQFRCON_FALSE,;t t s,@DUMMY_LIBGEOIP_SONAME@,$DUMMY_LIBGEOIP_SONAME,;t t s,@DUMMY_LIBGEOIP_ORIG@,$DUMMY_LIBGEOIP_ORIG,;t t s,@GEOIP_LIB@,$GEOIP_LIB,;t t s,@DUMMY_LIBGEOIP_TRUE@,$DUMMY_LIBGEOIP_TRUE,;t t s,@DUMMY_LIBGEOIP_FALSE@,$DUMMY_LIBGEOIP_FALSE,;t t s,@DUMMY_LIBGDKPIXBUF_SONAME@,$DUMMY_LIBGDKPIXBUF_SONAME,;t t s,@DUMMY_LIBGDKPIXBUF_ORIG@,$DUMMY_LIBGDKPIXBUF_ORIG,;t t s,@DUMMY_LIBGDKPIXBUF_TRUE@,$DUMMY_LIBGDKPIXBUF_TRUE,;t t s,@DUMMY_LIBGDKPIXBUF_FALSE@,$DUMMY_LIBGDKPIXBUF_FALSE,;t t s,@COMPRESSION@,$COMPRESSION,;t t s,@DEBUG@,$DEBUG,;t t s,@LIBOBJS@,$LIBOBJS,;t t s,@LTLIBOBJS@,$LTLIBOBJS,;t t CEOF _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # Split the substitutions into bite-sized pieces for seds with # small command number limits, like on Digital OSF/1 and HP-UX. ac_max_sed_lines=48 ac_sed_frag=1 # Number of current file. ac_beg=1 # First line for current file. ac_end=$ac_max_sed_lines # Line after last line for current file. ac_more_lines=: ac_sed_cmds= while $ac_more_lines; do if test $ac_beg -gt 1; then sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag else sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag fi if test ! -s $tmp/subs.frag; then ac_more_lines=false else # The purpose of the label and of the branching condition is to # speed up the sed processing (if there are no `@' at all, there # is no need to browse any of the substitutions). # These are the two extra sed commands mentioned above. (echo ':t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed if test -z "$ac_sed_cmds"; then ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" else ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" fi ac_sed_frag=`expr $ac_sed_frag + 1` ac_beg=$ac_end ac_end=`expr $ac_end + $ac_max_sed_lines` fi done if test -z "$ac_sed_cmds"; then ac_sed_cmds=cat fi fi # test -n "$CONFIG_FILES" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case $ac_file in - | *:- | *:-:* ) # input from stdin cat >$tmp/stdin ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; * ) ac_file_in=$ac_file.in ;; esac # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. ac_dir=`(dirname "$ac_file") 2>/dev/null || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p "$ac_dir" else as_dir="$ac_dir" as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Do not use `cd foo && pwd` to compute absolute paths, because # the directories may not exist. case `pwd` in .) ac_abs_builddir="$ac_dir";; *) case "$ac_dir" in .) ac_abs_builddir=`pwd`;; [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; *) ac_abs_builddir=`pwd`/"$ac_dir";; esac;; esac case $ac_abs_builddir in .) ac_abs_top_builddir=${ac_top_builddir}.;; *) case ${ac_top_builddir}. in .) ac_abs_top_builddir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; esac;; esac case $ac_abs_builddir in .) ac_abs_srcdir=$ac_srcdir;; *) case $ac_srcdir in .) ac_abs_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; esac;; esac case $ac_abs_builddir in .) ac_abs_top_srcdir=$ac_top_srcdir;; *) case $ac_top_srcdir in .) ac_abs_top_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; esac;; esac case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_builddir$INSTALL ;; esac if test x"$ac_file" != x-; then { echo "$as_me:$LINENO: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} rm -f "$ac_file" fi # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ if test x"$ac_file" = x-; then configure_input= else configure_input="$ac_file. " fi configure_input=$configure_input"Generated from `echo $ac_file_in | sed 's,.*/,,'` by configure." # First look for the input files in the build tree, otherwise in the # src tree. ac_file_inputs=`IFS=: for f in $ac_file_in; do case $f in -) echo $tmp/stdin ;; [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } echo "$f";; *) # Relative if test -f "$f"; then # Build tree echo "$f" elif test -f "$srcdir/$f"; then # Source tree echo "$srcdir/$f" else # /dev/null tree { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; esac done` || { (exit 1); exit 1; } _ACEOF cat >>$CONFIG_STATUS <<_ACEOF sed "$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s,@configure_input@,$configure_input,;t t s,@srcdir@,$ac_srcdir,;t t s,@abs_srcdir@,$ac_abs_srcdir,;t t s,@top_srcdir@,$ac_top_srcdir,;t t s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t s,@builddir@,$ac_builddir,;t t s,@abs_builddir@,$ac_abs_builddir,;t t s,@top_builddir@,$ac_top_builddir,;t t s,@abs_top_builddir@,$ac_abs_top_builddir,;t t s,@INSTALL@,$ac_INSTALL,;t t " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out rm -f $tmp/stdin if test x"$ac_file" != x-; then mv $tmp/out $ac_file else cat $tmp/out rm -f $tmp/out fi done _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # # CONFIG_HEADER section. # # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where # NAME is the cpp macro being defined and VALUE is the value it is being given. # # ac_d sets the value in "#define NAME VALUE" lines. ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' ac_dB='[ ].*$,\1#\2' ac_dC=' ' ac_dD=',;t' # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' ac_uB='$,\1#\2define\3' ac_uC=' ' ac_uD=',;t' for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case $ac_file in - | *:- | *:-:* ) # input from stdin cat >$tmp/stdin ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; * ) ac_file_in=$ac_file.in ;; esac test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} # First look for the input files in the build tree, otherwise in the # src tree. ac_file_inputs=`IFS=: for f in $ac_file_in; do case $f in -) echo $tmp/stdin ;; [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } # Do quote $f, to prevent DOS paths from being IFS'd. echo "$f";; *) # Relative if test -f "$f"; then # Build tree echo "$f" elif test -f "$srcdir/$f"; then # Source tree echo "$srcdir/$f" else # /dev/null tree { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; esac done` || { (exit 1); exit 1; } # Remove the trailing spaces. sed 's/[ ]*$//' $ac_file_inputs >$tmp/in _ACEOF # Transform confdefs.h into two sed scripts, `conftest.defines' and # `conftest.undefs', that substitutes the proper values into # config.h.in to produce config.h. The first handles `#define' # templates, and the second `#undef' templates. # And first: Protect against being on the right side of a sed subst in # config.status. Protect against being in an unquoted here document # in config.status. rm -f conftest.defines conftest.undefs # Using a here document instead of a string reduces the quoting nightmare. # Putting comments in sed scripts is not portable. # # `end' is used to avoid that the second main sed command (meant for # 0-ary CPP macros) applies to n-ary macro definitions. # See the Autoconf documentation for `clear'. cat >confdef2sed.sed <<\_ACEOF s/[\\&,]/\\&/g s,[\\$`],\\&,g t clear : clear s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp t end s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp : end _ACEOF # If some macros were called several times there might be several times # the same #defines, which is useless. Nevertheless, we may not want to # sort them, since we want the *last* AC-DEFINE to be honored. uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs rm -f confdef2sed.sed # This sed command replaces #undef with comments. This is necessary, for # example, in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. cat >>conftest.undefs <<\_ACEOF s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, _ACEOF # Break up conftest.defines because some shells have a limit on the size # of here documents, and old seds have small limits too (100 cmds). echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS echo ' :' >>$CONFIG_STATUS rm -f conftest.tail while grep . conftest.defines >/dev/null do # Write a limited-size here document to $tmp/defines.sed. echo ' cat >$tmp/defines.sed <>$CONFIG_STATUS # Speed up: don't consider the non `#define' lines. echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS # Work around the forget-to-reset-the-flag bug. echo 't clr' >>$CONFIG_STATUS echo ': clr' >>$CONFIG_STATUS sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS echo 'CEOF sed -f $tmp/defines.sed $tmp/in >$tmp/out rm -f $tmp/in mv $tmp/out $tmp/in ' >>$CONFIG_STATUS sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail rm -f conftest.defines mv conftest.tail conftest.defines done rm -f conftest.defines echo ' fi # grep' >>$CONFIG_STATUS echo >>$CONFIG_STATUS # Break up conftest.undefs because some shells have a limit on the size # of here documents, and old seds have small limits too (100 cmds). echo ' # Handle all the #undef templates' >>$CONFIG_STATUS rm -f conftest.tail while grep . conftest.undefs >/dev/null do # Write a limited-size here document to $tmp/undefs.sed. echo ' cat >$tmp/undefs.sed <>$CONFIG_STATUS # Speed up: don't consider the non `#undef' echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS # Work around the forget-to-reset-the-flag bug. echo 't clr' >>$CONFIG_STATUS echo ': clr' >>$CONFIG_STATUS sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS echo 'CEOF sed -f $tmp/undefs.sed $tmp/in >$tmp/out rm -f $tmp/in mv $tmp/out $tmp/in ' >>$CONFIG_STATUS sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail rm -f conftest.undefs mv conftest.tail conftest.undefs done rm -f conftest.undefs cat >>$CONFIG_STATUS <<\_ACEOF # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ if test x"$ac_file" = x-; then echo "/* Generated by configure. */" >$tmp/config.h else echo "/* $ac_file. Generated by configure. */" >$tmp/config.h fi cat $tmp/in >>$tmp/config.h rm -f $tmp/in if test x"$ac_file" != x-; then if diff $ac_file $tmp/config.h >/dev/null 2>&1; then { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 echo "$as_me: $ac_file is unchanged" >&6;} else ac_dir=`(dirname "$ac_file") 2>/dev/null || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p "$ac_dir" else as_dir="$ac_dir" as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; }; } rm -f $ac_file mv $tmp/config.h $ac_file fi else cat $tmp/config.h rm -f $tmp/config.h fi # Compute $ac_file's index in $config_headers. _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $ac_file | $ac_file:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $ac_file" >`(dirname $ac_file) 2>/dev/null || $as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X$ac_file : 'X\(//\)[^/]' \| \ X$ac_file : 'X\(//\)$' \| \ X$ac_file : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X$ac_file | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'`/stamp-h$_am_stamp_count done _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # # CONFIG_COMMANDS section. # for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue ac_dest=`echo "$ac_file" | sed 's,:.*,,'` ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_dir=`(dirname "$ac_dest") 2>/dev/null || $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_dest" : 'X\(//\)[^/]' \| \ X"$ac_dest" : 'X\(//\)$' \| \ X"$ac_dest" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$ac_dest" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p "$ac_dir" else as_dir="$ac_dir" as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Do not use `cd foo && pwd` to compute absolute paths, because # the directories may not exist. case `pwd` in .) ac_abs_builddir="$ac_dir";; *) case "$ac_dir" in .) ac_abs_builddir=`pwd`;; [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; *) ac_abs_builddir=`pwd`/"$ac_dir";; esac;; esac case $ac_abs_builddir in .) ac_abs_top_builddir=${ac_top_builddir}.;; *) case ${ac_top_builddir}. in .) ac_abs_top_builddir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; esac;; esac case $ac_abs_builddir in .) ac_abs_srcdir=$ac_srcdir;; *) case $ac_srcdir in .) ac_abs_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; esac;; esac case $ac_abs_builddir in .) ac_abs_top_srcdir=$ac_top_srcdir;; *) case $ac_top_srcdir in .) ac_abs_top_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; esac;; esac { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 echo "$as_me: executing $ac_dest commands" >&6;} case $ac_dest in intltool ) intltool_edit="-e 's#@INTLTOOL_EXTRACT@#`pwd`/intltool-extract#g' \ -e 's#@INTLTOOL_ICONV@#${INTLTOOL_ICONV}#g' \ -e 's#@INTLTOOL_MSGFMT@#${INTLTOOL_MSGFMT}#g' \ -e 's#@INTLTOOL_MSGMERGE@#${INTLTOOL_MSGMERGE}#g' \ -e 's#@INTLTOOL_XGETTEXT@#${INTLTOOL_XGETTEXT}#g' \ -e 's#@INTLTOOL_PERL@#${INTLTOOL_PERL}#g'" eval sed ${intltool_edit} < ${ac_aux_dir}/intltool-extract.in \ > intltool-extract.out if cmp -s intltool-extract intltool-extract.out 2>/dev/null; then rm -f intltool-extract.out else mv -f intltool-extract.out intltool-extract fi chmod ugo+x intltool-extract chmod u+w intltool-extract eval sed ${intltool_edit} < ${ac_aux_dir}/intltool-merge.in \ > intltool-merge.out if cmp -s intltool-merge intltool-merge.out 2>/dev/null; then rm -f intltool-merge.out else mv -f intltool-merge.out intltool-merge fi chmod ugo+x intltool-merge chmod u+w intltool-merge eval sed ${intltool_edit} < ${ac_aux_dir}/intltool-update.in \ > intltool-update.out if cmp -s intltool-update intltool-update.out 2>/dev/null; then rm -f intltool-update.out else mv -f intltool-update.out intltool-update fi chmod ugo+x intltool-update chmod u+w intltool-update ;; depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # So let's grep whole file. if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then dirpart=`(dirname "$mf") 2>/dev/null || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`(dirname "$file") 2>/dev/null || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p $dirpart/$fdir else as_dir=$dirpart/$fdir as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory $dirpart/$fdir" >&5 echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;} { (exit 1); exit 1; }; }; } # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ;; default-1 ) case "$CONFIG_FILES" in *po/Makefile.in*) sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile esac ;; esac done _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF { (exit 0); exit 0; } _ACEOF chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || { (exit 1); exit 1; } fi if test "x$qstat_is" = "xnotfound" ; then echo "$as_me:$LINENO: result: *** QStat is *required* to run XQF *** Get it from http://qstat.org/ *** and put it in your path " >&5 echo "${ECHO_T} *** QStat is *required* to run XQF *** Get it from http://qstat.org/ *** and put it in your path " >&6 fi xqf-1.0.5/xqf.spec0000644002404400000620000000244310523105451010701 00000000000000%define name xqf %define version 1.0.5 %define release %{?CUSTOM_RELEASE} %{!?CUSTOM_RELEASE:1} Summary: A network game browser and launcher Name: %{name} Version: %{version} Release: %{release} License: GPL Group: Games/Utilities Source0: %{name}-%{version}.tar.gz URL: http://www.linuxgames.com/xqf/ Buildroot: %{_tmppath}/%{name}-buildroot Packager: The XQF Team #Since there is not a .spec file with qstat, we will not # require it for now. You may want to uncomment it # for your dist. #Requires: qstat >= 2.4e Requires: gzip Requires: wget %description XQF is a network game browser (e.g. Quake, Unreal, etc.). It helps you locate and connect to game servers. It has configurable server and player filters so you can find a server running your favorite game type or that has a buddy. %prep rm -rf $RPM_BUILD_ROOT %setup %build CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" \ ./configure \ --prefix=%{_prefix} \ --infodir=%{_infodir} \ --mandir=%{_mandir} make %install %makeinstall %clean rm -rf $RPM_BUILD_ROOT %files %defattr (-,root,root) %doc AUTHORS BUGS COPYING ChangeLog NEWS README TODO %doc docs/*html docs/PreLaunch.example %dir %{_datadir}/xqf %{_prefix}/bin/* %{_mandir}/man?/xqf.* %{_datadir}/locale/*/LC_MESSAGES/xqf.mo %{_datadir}/xqf/* xqf-1.0.5/configure.in0000644002404400000620000001672410523105071011545 00000000000000# # Autoconf support for XQF # Initially written by Markus Fischer # AC_INIT([XQF],[1.0.5],[xqf-developer@lists.sourceforge.net], [xqf]) AC_CONFIG_SRCDIR([src/xqf.c]) AC_PREREQ(2.52) AM_INIT_AUTOMAKE dnl AM_CONFIG_HEADER(src/gnuconfig.h:src/gnuconfig.h.in) AM_CONFIG_HEADER(src/gnuconfig.h) AC_DEFINE(GETTEXT_PACKAGE, "xqf", [Gettext domain name]) GETTEXT_PACKAGE=xqf AC_SUBST(GETTEXT_PACKAGE) AC_PROG_INTLTOOL([0.25]) ALL_LINGUAS="ca da de es fi fr pl ru" AM_GLIB_GNU_GETTEXT dnl Checks for programs. AC_PROG_CC AC_ISC_POSIX AC_PROG_LN_S AC_PROG_RANLIB AC_DISABLE_STATIC dnl Checks for header files. AC_HEADER_STDC #The Release stuff for the spec file. RELEASE="1" AC_ARG_WITH(rpm_release,[ --with-rpm-release=VAL RPM Release (e.g. 1mdk)]) if test "x$with_rpm_release" != "x" ; then RELEASE="$with_rpm_release" fi AC_SUBST(RELEASE) dnl compile with gtk 1.2 or gtk 2 ? AC_MSG_CHECKING([whether GTK 2 should be used]) AC_ARG_ENABLE(gtk2,[ --enable-gtk2 enable experimental GTK2 support (default=no)],USE_GTK2=$enableval, USE_GTK2=no) AC_MSG_RESULT([$USE_GTK2]) if test "x$USE_GTK2" != "xno"; then AC_DEFINE_UNQUOTED(USE_GTK2,1,Define if we should use GTK2) OLD_GTK_SUPPORT="-DGTK_ENABLE_BROKEN=1" AC_SUBST(OLD_GTK_SUPPORT) pkg_modules="gtk+-2.0 >= 2.0.0 gdk-pixbuf-xlib-2.0" PKG_CHECK_MODULES(PACKAGE, [$pkg_modules]) AC_SUBST(PACKAGE_CFLAGS) AC_SUBST(PACKAGE_LIBS) else AM_PATH_GLIB(1.2.0,,exit 1) AM_PATH_GTK(1.2.0,,exit 1) AM_PATH_GDK_PIXBUF(,,[AC_MSG_ERROR([gdk-pixbuf not found, please install gdk-pixbuf-devel])]) fi dnl check for qstat AC_ARG_WITH(qstat,[ --with-qstat=CMD use CMD to run qstat]) AC_MSG_CHECKING(qstat version) QSTATEXEC="qstat" if test "x$with_qstat" != "x" ; then QSTATEXEC="$with_qstat" fi qstat_version=`$QSTATEXEC 2>/dev/null | grep version | cut -d' ' -f 3` if test "x$qstat_version" = "x" ; then AC_MSG_RESULT(qstat not found) qstat_is=notfound else AC_MSG_RESULT($qstat_version) fi AC_SUBST(QSTATEXEC) AC_CHECK_HEADER(zlib.h,,[AC_MSG_ERROR([zlib.h not found, please install zlib development files])]) AC_CHECK_LIB(z, crc32,[AC_DEFINE([HAVE_LIBZ],[],[Whether libz is installed])],[AC_MSG_ERROR([libz not found])]) dnl determine if we should include readline support... dnl ripped from physfs package dnl AC_ARG_ENABLE(readline, dnl AC_HELP_STRING([--enable-externalrcon],[compile external rcon program (default=yes)]) dnl , ,enable_rcon=yes) XQFRCON_LIBS= AC_ARG_ENABLE(externalrcon,[ --enable-externalrcon compile external rcon program (default=no)]) if test x$enable_externalrcon = xyes; then AC_CHECK_HEADER(readline/readline.h, have_readline_hdr=yes) AC_CHECK_LIB(readline, readline, have_readline_lib=yes, , -lncurses ) AC_CHECK_HEADER(readline/history.h, have_history_hdr=yes) AC_CHECK_LIB(readline, add_history, have_history_lib=yes, , -lncurses ) if test x$have_readline_hdr = xyes -a x$have_readline_lib = xyes; then if test x$have_history_hdr = xyes -a x$have_history_lib = xyes; then XQFRCON_LIBS="-lreadline -lncurses" AC_SUBST(XQFRCON_LIBS) else AC_MSG_WARN([libreadline not found, rcon program disabled]) fi else AC_MSG_WARN([libreadline not found, rcon program disabled]) fi fi AM_CONDITIONAL(BUILD_XQFRCON, test "x$XQFRCON_LIBS" != x) dnl determine whether GeoIP should be used AC_CHECK_HEADER(GeoIP.h,have_geoip_hdr=yes,have_geoip_hdr=no) AC_MSG_CHECKING([whether GeoIP should be used]) AC_ARG_ENABLE(geoip,[ --enable-geoip use GeoIP (default=auto)],USE_GEOIP=$enableval, USE_GEOIP=yes) AC_MSG_RESULT([$USE_GEOIP]) # --enable-geoip-dummy=/usr/lib/libGeoIP.so AC_MSG_CHECKING([whether a GeoIP dummy library should be used]) AC_ARG_ENABLE(geoip_dummy, [ --enable-geoip-dummy=FILE use dummy GeoIP lib based on FILE (default=no)], use_geoip_dummy="$enableval", use_geoip_dummy=no) AC_MSG_RESULT([$use_geoip_dummy]) if test "x$USE_GEOIP" != "xno"; then if test "x$have_geoip_hdr" = "xyes";then AC_DEFINE_UNQUOTED(USE_GEOIP,1,Define if we should use GeoIP) if test "x$USE_GEOIP" = "xyes"; then if test "x$use_geoip_dummy" != "xno"; then DUMMY_LIBGEOIP_SONAME=`objdump -p "$use_geoip_dummy"|awk '$1 == "SONAME" {print $2}'` if test "x$DUMMY_LIBGEOIP_SONAME" != x; then DUMMY_LIBGEOIP_ORIG="$use_geoip_dummy" GEOIP_LIB='-L$(top_builddir)/src -lxqf_dummy_GeoIP' AC_SUBST(DUMMY_LIBGEOIP_SONAME) AC_SUBST(DUMMY_LIBGEOIP_ORIG) else AC_MSG_ERROR([$use_geoip_dummy is no valid GeoIP library]) fi else GEOIP_LIB="-lGeoIP" fi else GEOIP_LIB="$USE_GEOIP" fi AC_SUBST(GEOIP_LIB) else AC_MSG_WARN([GeoIP.h not found, GeoIP feature disabled]) fi fi AM_CONDITIONAL(DUMMY_LIBGEOIP, test x$DUMMY_LIBGEOIP_SONAME != x) # --enable-geoip-dummy=/usr/lib/libGeoIP.so AC_MSG_CHECKING([whether a GDK-Pixbuf dummy library should be used]) AC_ARG_ENABLE(pixbuf_dummy, [ --enable-pixbuf-dummy=FILE use dummy gdk-pixbuf lib based on FILE (default=no)], use_pixbuf_dummy="$enableval", use_pixbuf_dummy=no) AC_MSG_RESULT([$use_pixbuf_dummy]) if test "x$use_pixbuf_dummy" != "xno"; then DUMMY_LIBGDKPIXBUF_SONAME=`objdump -p "$use_pixbuf_dummy"|awk '$1 == "SONAME" {print $2}'` if test "x$DUMMY_LIBGDKPIXBUF_SONAME" != x; then DUMMY_LIBGDKPIXBUF_ORIG="$use_pixbuf_dummy" GDK_PIXBUF_LIBS="-lxqf_dummy_gdk_pixbuf" AC_SUBST(DUMMY_LIBGDKPIXBUF_SONAME) AC_SUBST(DUMMY_LIBGDKPIXBUF_ORIG) else AC_MSG_ERROR([$use_pixbuf_dummy is no valid library]) fi AC_SUBST(GDK_PIXBUF_LIBS) fi AM_CONDITIONAL(DUMMY_LIBGDKPIXBUF, test x$DUMMY_LIBGDKPIXBUF_SONAME != x) dnl check if user wants bzip2 compression instead of gzip COMPRESSION="-DCOMPRESSOR_GZIP" AC_ARG_ENABLE(bzip2,[ --enable-bzip2 use bzip2 for data compression]) if test x$enable_bzip2 = xyes; then COMPRESSION="-DCOMPRESSOR_BZIP2" fi AC_SUBST(COMPRESSION) dnl check if user wants debug AC_ARG_ENABLE(debug,[ --enable-debug turn on debugging ]) if test x$enable_debug = xyes; then DEBUG="-DDEBUG" CFLAGS="-g -O0" else DEBUG="" fi AC_SUBST(DEBUG) AC_SUBST(VERSION) AC_SUBST(QSTATEXEC) AC_DEFINE_UNQUOTED(XQF_VERSION, "$VERSION", XQF Version number) AC_DEFINE_UNQUOTED(QSTAT_EXEC, "$QSTATEXEC", QSTAT executable path) # workaround for intl/ which requires config.h echo "configure: creating link config.h -> src/gnuconfig.h" test -e config.h -a ! -L config.h && rm config.h test ! -e config.h && ln -s src/gnuconfig.h config.h rm -f intl/libintl.h # damn gettext should do that itself! if test "$USE_INCLUDED_LIBINTL" = "yes"; then echo "configure: creating link intl/libintl.h -> libgnuintl.h" ln -s libgnuintl.h intl/libintl.h fi dnl Use -Wall if we have gcc. changequote(,)dnl if test "x$GCC" = "xyes"; then case " $CFLAGS " in *[\ \ ]-Wall[\ \ ]*) ;; *) CFLAGS="$CFLAGS -Wall" ;; esac fi changequote([,])dnl AC_ARG_ENABLE(profiling,[ --enable-profiling compile with profiling (default=no)]) AC_MSG_CHECKING(whether profiling is requested) if test x$enable_profiling = xyes; then CFLAGS="$CFLAGS -pg" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi AC_CONFIG_FILES([ Makefile src/Makefile src/xpm/Makefile src/zip/Makefile src/tga/Makefile docs/Makefile pixmaps/Makefile pixmaps/flags/Makefile pixmaps/trayicon/Makefile xqf.spec po/Makefile.in ]) AC_OUTPUT if test "x$qstat_is" = "xnotfound" ; then AC_MSG_RESULT([ *** QStat is *required* to run XQF *** Get it from http://qstat.org/ *** and put it in your path ]) fi xqf-1.0.5/intltool-update.in0000755002404400000620000006460110520653073012717 00000000000000#!@INTLTOOL_PERL@ -w # -*- Mode: perl; indent-tabs-mode: nil; c-basic-offset: 4 -*- # # The Intltool Message Updater # # Copyright (C) 2000-2003 Free Software Foundation. # # Intltool is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # version 2 published by the Free Software Foundation. # # Intltool 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., 675 Mass Ave, Cambridge, MA 02139, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # # Authors: Kenneth Christiansen # Maciej Stachowiak # Darin Adler ## Release information my $PROGRAM = "intltool-update"; my $VERSION = "0.34.1"; my $PACKAGE = "intltool"; ## Loaded modules use strict; use Getopt::Long; use Cwd; use File::Copy; use File::Find; ## Scalars used by the option stuff my $HELP_ARG = 0; my $VERSION_ARG = 0; my $DIST_ARG = 0; my $POT_ARG = 0; my $HEADERS_ARG = 0; my $MAINTAIN_ARG = 0; my $REPORT_ARG = 0; my $VERBOSE = 0; my $GETTEXT_PACKAGE = ""; my $OUTPUT_FILE = ""; my @languages; my %varhash = (); my %po_files_by_lang = (); # Regular expressions to categorize file types. # FIXME: Please check if the following is correct my $xml_support = "xml(?:\\.in)*|". # http://www.w3.org/XML/ (Note: .in is not required) "ui|". # Bonobo specific - User Interface desc. files "lang|". # ? "glade2?(?:\\.in)*|". # Glade specific - User Interface desc. files (Note: .in is not required) "scm(?:\\.in)*|". # ? (Note: .in is not required) "oaf(?:\\.in)+|". # DEPRECATED: Replaces by Bonobo .server files "etspec|". # ? "server(?:\\.in)+|". # Bonobo specific "sheet(?:\\.in)+|". # ? "schemas(?:\\.in)+|". # GConf specific "pong(?:\\.in)+|". # DEPRECATED: PONG is not used [by GNOME] any longer. "kbd(?:\\.in)+"; # GOK specific. my $ini_support = "icon(?:\\.in)+|". # http://www.freedesktop.org/Standards/icon-theme-spec "desktop(?:\\.in)+|". # http://www.freedesktop.org/Standards/menu-spec "caves(?:\\.in)+|". # GNOME Games specific "directory(?:\\.in)+|". # http://www.freedesktop.org/Standards/menu-spec "soundlist(?:\\.in)+|". # GNOME specific "keys(?:\\.in)+|". # GNOME Mime database specific "theme(?:\\.in)+"; # http://www.freedesktop.org/Standards/icon-theme-spec my $buildin_gettext_support = "c|y|cs|cc|cpp|c\\+\\+|h|hh|gob|py"; ## Always flush buffer when printing $| = 1; ## Sometimes the source tree will be rooted somewhere else. my $SRCDIR = "."; my $POTFILES_in; $SRCDIR = $ENV{"srcdir"} if $ENV{"srcdir"}; $POTFILES_in = "<$SRCDIR/POTFILES.in"; my $devnull = ($^O eq 'MSWin32' ? 'NUL:' : '/dev/null'); ## Handle options GetOptions ( "help" => \$HELP_ARG, "version" => \$VERSION_ARG, "dist|d" => \$DIST_ARG, "pot|p" => \$POT_ARG, "headers|s" => \$HEADERS_ARG, "maintain|m" => \$MAINTAIN_ARG, "report|r" => \$REPORT_ARG, "verbose|x" => \$VERBOSE, "gettext-package|g=s" => \$GETTEXT_PACKAGE, "output-file|o=s" => \$OUTPUT_FILE, ) or &Console_WriteError_InvalidOption; &Console_Write_IntltoolHelp if $HELP_ARG; &Console_Write_IntltoolVersion if $VERSION_ARG; my $arg_count = ($DIST_ARG > 0) + ($POT_ARG > 0) + ($HEADERS_ARG > 0) + ($MAINTAIN_ARG > 0) + ($REPORT_ARG > 0); &Console_Write_IntltoolHelp if $arg_count > 1; # --version and --help don't require a module name my $MODULE = $GETTEXT_PACKAGE || &FindPackageName; if ($POT_ARG) { &GenerateHeaders; &GeneratePOTemplate; } elsif ($HEADERS_ARG) { &GenerateHeaders; } elsif ($MAINTAIN_ARG) { &FindLeftoutFiles; } elsif ($REPORT_ARG) { &GenerateHeaders; &GeneratePOTemplate; &Console_Write_CoverageReport; } elsif ((defined $ARGV[0]) && $ARGV[0] =~ /^[a-z]/) { my $lang = $ARGV[0]; ## Report error if the language file supplied ## to the command line is non-existent &Console_WriteError_NotExisting("$SRCDIR/$lang.po") if ! -s "$SRCDIR/$lang.po"; if (!$DIST_ARG) { print "Working, please wait..." if $VERBOSE; &GenerateHeaders; &GeneratePOTemplate; } &POFile_Update ($lang, $OUTPUT_FILE); &Console_Write_TranslationStatus ($lang, $OUTPUT_FILE); } else { &Console_Write_IntltoolHelp; } exit; ######### sub Console_Write_IntltoolVersion { print <<_EOF_; ${PROGRAM} (${PACKAGE}) $VERSION Written by Kenneth Christiansen, Maciej Stachowiak, and Darin Adler. Copyright (C) 2000-2003 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. _EOF_ exit; } sub Console_Write_IntltoolHelp { print <<_EOF_; Usage: ${PROGRAM} [OPTION]... LANGCODE Updates PO template files and merge them with the translations. Mode of operation (only one is allowed): -p, --pot generate the PO template only -s, --headers generate the header files in POTFILES.in -m, --maintain search for left out files from POTFILES.in -r, --report display a status report for the module -d, --dist merge LANGCODE.po with existing PO template Extra options: -g, --gettext-package=NAME override PO template name, useful with --pot -o, --output-file=FILE write merged translation to FILE -x, --verbose display lots of feedback --help display this help and exit --version output version information and exit Examples of use: ${PROGRAM} --pot just create a new PO template ${PROGRAM} xy create new PO template and merge xy.po with it Report bugs to http://bugzilla.gnome.org/ (product name "$PACKAGE") or send email to . _EOF_ exit; } sub echo_n { my $str = shift; my $ret = `echo "$str"`; $ret =~ s/\n$//; # do we need the "s" flag? return $ret; } sub POFile_DetermineType ($) { my $type = $_; my $gettext_type; my $xml_regex = "(?:" . $xml_support . ")"; my $ini_regex = "(?:" . $ini_support . ")"; my $buildin_regex = "(?:" . $buildin_gettext_support . ")"; if ($type =~ /\[type: gettext\/([^\]].*)]/) { $gettext_type=$1; } elsif ($type =~ /schemas(\.in)+$/) { $gettext_type="schemas"; } elsif ($type =~ /glade2?(\.in)*$/) { $gettext_type="glade"; } elsif ($type =~ /scm(\.in)*$/) { $gettext_type="scheme"; } elsif ($type =~ /keys(\.in)+$/) { $gettext_type="keys"; } # bucket types elsif ($type =~ /$xml_regex$/) { $gettext_type="xml"; } elsif ($type =~ /$ini_regex$/) { $gettext_type="ini"; } elsif ($type =~ /$buildin_regex$/) { $gettext_type="buildin"; } else { $gettext_type="unknown"; } return "gettext\/$gettext_type"; } sub TextFile_DetermineEncoding ($) { my $gettext_code="ASCII"; # All files are ASCII by default my $filetype=`file $_ | cut -d ' ' -f 2`; if ($? eq "0") { if ($filetype =~ /^(ISO|UTF)/) { chomp ($gettext_code = $filetype); } elsif ($filetype =~ /^XML/) { $gettext_code="UTF-8"; # We asume that .glade and other .xml files are UTF-8 } } return $gettext_code; } sub isNotValidMissing { my ($file) = @_; return if $file =~ /^\{arch\}\/.*$/; return if $file =~ /^$varhash{"PACKAGE"}-$varhash{"VERSION"}\/.*$/; } sub FindLeftoutFiles { my (@buf_i18n_plain, @buf_i18n_xml, @buf_i18n_xml_unmarked, @buf_i18n_ini, @buf_potfiles, @buf_potfiles_ignore, @buf_allfiles, @buf_allfiles_sorted, @buf_potfiles_sorted ); ## Search and find all translatable files find sub { push @buf_i18n_plain, "$File::Find::name" if /\.($buildin_gettext_support)$/; push @buf_i18n_xml, "$File::Find::name" if /\.($xml_support)$/; push @buf_i18n_ini, "$File::Find::name" if /\.($ini_support)$/; push @buf_i18n_xml_unmarked, "$File::Find::name" if /\.(schemas(\.in)+)$/; }, ".."; open POTFILES, $POTFILES_in or die "$PROGRAM: there's no POTFILES.in!\n"; @buf_potfiles = grep !/^(#|\s*$)/, ; close POTFILES; foreach (@buf_potfiles) { s/^\[.*]\s*//; } print "Searching for missing translatable files...\n" if $VERBOSE; ## Check if we should ignore some found files, when ## comparing with POTFILES.in foreach my $ignore ("POTFILES.skip", "POTFILES.ignore") { (-s $ignore) or next; if ("$ignore" eq "POTFILES.ignore") { print "The usage of POTFILES.ignore is deprecated. Please consider moving the\n". "content of this file to POTFILES.skip.\n"; } print "Found $ignore: Ignoring files...\n" if $VERBOSE; open FILE, "<$ignore" or die "ERROR: Failed to open $ignore!\n"; while () { push @buf_potfiles_ignore, $_ unless /^(#|\s*$)/; } close FILE; @buf_potfiles = (@buf_potfiles_ignore, @buf_potfiles); } foreach my $file (@buf_i18n_plain) { my $in_comment = 0; my $in_macro = 0; open FILE, "<$file"; while () { # Handle continued multi-line comment. if ($in_comment) { next unless s-.*\*/--; $in_comment = 0; } # Handle continued macro. if ($in_macro) { $in_macro = 0 unless /\\$/; next; } # Handle start of macro (or any preprocessor directive). if (/^\s*\#/) { $in_macro = 1 if /^([^\\]|\\.)*\\$/; next; } # Handle comments and quoted text. while (m-(/\*|//|\'|\")-) # \' and \" keep emacs perl mode happy { my $match = $1; if ($match eq "/*") { if (!s-/\*.*?\*/--) { s-/\*.*--; $in_comment = 1; } } elsif ($match eq "//") { s-//.*--; } else # ' or " { if (!s-$match([^\\]|\\.)*?$match-QUOTEDTEXT-) { warn "mismatched quotes at line $. in $file\n"; s-$match.*--; } } } if (/\.GetString ?\(QUOTEDTEXT/) { if (defined isNotValidMissing (unpack("x3 A*", $file))) { ## Remove the first 3 chars and add newline push @buf_allfiles, unpack("x3 A*", $file) . "\n"; } last; } if (/_\(QUOTEDTEXT/) { if (defined isNotValidMissing (unpack("x3 A*", $file))) { ## Remove the first 3 chars and add newline push @buf_allfiles, unpack("x3 A*", $file) . "\n"; } last; } } close FILE; } foreach my $file (@buf_i18n_xml) { open FILE, "<$file"; while () { # FIXME: share the pattern matching code with intltool-extract if (/\s_[-A-Za-z0-9._:]+\s*=\s*\"([^"]+)\"/ || /<_[^>]+>/ || /translatable=\"yes\"/) { if (defined isNotValidMissing (unpack("x3 A*", $file))) { push @buf_allfiles, unpack("x3 A*", $file) . "\n"; } last; } } close FILE; } foreach my $file (@buf_i18n_ini) { open FILE, "<$file"; while () { if (/_(.*)=/) { if (defined isNotValidMissing (unpack("x3 A*", $file))) { push @buf_allfiles, unpack("x3 A*", $file) . "\n"; } last; } } close FILE; } foreach my $file (@buf_i18n_xml_unmarked) { if (defined isNotValidMissing (unpack("x3 A*", $file))) { push @buf_allfiles, unpack("x3 A*", $file) . "\n"; } } @buf_allfiles_sorted = sort (@buf_allfiles); @buf_potfiles_sorted = sort (@buf_potfiles); my %in2; foreach (@buf_potfiles_sorted) { $in2{$_} = 1; } my @result; foreach (@buf_allfiles_sorted) { if (!exists($in2{$_})) { push @result, $_ } } my @buf_potfiles_notexist; foreach (@buf_potfiles_sorted) { chomp (my $dummy = $_); if ("$dummy" ne "" and ! -f "../$dummy") { push @buf_potfiles_notexist, $_; } } ## Save file with information about the files missing ## if any, and give information about this procedure. if (@result + @buf_potfiles_notexist > 0) { if (@result) { print "\n" if $VERBOSE; unlink "missing"; open OUT, ">missing"; print OUT @result; close OUT; warn "\e[1mThe following files contain translations and are currently not in use. Please\e[0m\n". "\e[1mconsider adding these to the POTFILES.in file, located in the po/ directory.\e[0m\n\n"; print STDERR @result, "\n"; warn "If some of these files are left out on purpose then please add them to\n". "POTFILES.skip instead of POTFILES.in. A file \e[1m'missing'\e[0m containing this list\n". "of left out files has been written in the current directory.\n"; } if (@buf_potfiles_notexist) { unlink "notexist"; open OUT, ">notexist"; print OUT @buf_potfiles_notexist; close OUT; warn "\n" if ($VERBOSE or @result); warn "\e[1mThe following files do not exist anymore:\e[0m\n\n"; warn @buf_potfiles_notexist, "\n"; warn "Please remove them from POTFILES.in or POTFILES.skip. A file \e[1m'notexist'\e[0m\n". "containing this list of absent files has been written in the current directory.\n"; } } ## If there is nothing to complain about, notify the user else { print "\nAll files containing translations are present in POTFILES.in.\n" if $VERBOSE; } } sub Console_WriteError_InvalidOption { ## Handle invalid arguments print STDERR "Try `${PROGRAM} --help' for more information.\n"; exit 1; } sub GenerateHeaders { my $EXTRACT = "@INTLTOOL_EXTRACT@"; chomp $EXTRACT; $EXTRACT = $ENV{"INTLTOOL_EXTRACT"} if $ENV{"INTLTOOL_EXTRACT"}; ## Generate the .h header files, so we can allow glade and ## xml translation support if (! -x "$EXTRACT") { print STDERR "\n *** The intltool-extract script wasn't found!" ."\n *** Without it, intltool-update can not generate files.\n"; exit; } else { open (FILE, $POTFILES_in) or die "$PROGRAM: POTFILES.in not found.\n"; while () { chomp; next if /^\[\s*encoding/; ## Find xml files in POTFILES.in and generate the ## files with help from the extract script my $gettext_type= &POFile_DetermineType ($1); if (/\.($xml_support|$ini_support)$/ || /^\[/) { s/^\[[^\[].*]\s*//; my $filename = "../$_"; if ($VERBOSE) { system ($EXTRACT, "--update", "--srcdir=$SRCDIR", "--type=$gettext_type", $filename); } else { system ($EXTRACT, "--update", "--type=$gettext_type", "--srcdir=$SRCDIR", "--quiet", $filename); } } } close FILE; } } # # Generate .pot file from POTFILES.in # sub GeneratePOTemplate { my $XGETTEXT = $ENV{"XGETTEXT"} || "/usr/bin/xgettext"; my $XGETTEXT_ARGS = $ENV{"XGETTEXT_ARGS"} || ''; chomp $XGETTEXT; if (! -x $XGETTEXT) { print STDERR " *** xgettext is not found on this system!\n". " *** Without it, intltool-update can not extract strings.\n"; exit; } print "Building $MODULE.pot...\n" if $VERBOSE; open INFILE, $POTFILES_in; unlink "POTFILES.in.temp"; open OUTFILE, ">POTFILES.in.temp" or die("Cannot open POTFILES.in.temp for writing"); my $gettext_support_nonascii = 0; # checks for GNU gettext >= 0.12 my $dummy = `$XGETTEXT --version --from-code=UTF-8 >$devnull 2>$devnull`; if ($? == 0) { $gettext_support_nonascii = 1; } else { # urge everybody to upgrade gettext print STDERR "WARNING: This version of gettext does not support extracting non-ASCII\n". " strings. That means you should install a version of gettext\n". " that supports non-ASCII strings (such as GNU gettext >= 0.12),\n". " or have to let non-ASCII strings untranslated. (If there is any)\n"; } my $encoding = "ASCII"; my $forced_gettext_code; my @temp_headers; my $encoding_problem_is_reported = 0; while () { next if (/^#/ or /^\s*$/); chomp; my $gettext_code; if (/^\[\s*encoding:\s*(.*)\s*\]/) { $forced_gettext_code=$1; } elsif (/\.($xml_support|$ini_support)$/ || /^\[/) { s/^\[.*]\s*//; print OUTFILE "../$_.h\n"; push @temp_headers, "../$_.h"; $gettext_code = &TextFile_DetermineEncoding ("../$_.h") if ($gettext_support_nonascii and not defined $forced_gettext_code); } else { if ($SRCDIR eq ".") { print OUTFILE "../$_\n"; } else { print OUTFILE "$SRCDIR/../$_\n"; } $gettext_code = &TextFile_DetermineEncoding ("../$_") if ($gettext_support_nonascii and not defined $forced_gettext_code); } next if (! $gettext_support_nonascii); if (defined $forced_gettext_code) { $encoding=$forced_gettext_code; } elsif (defined $gettext_code and "$encoding" ne "$gettext_code") { if ($encoding eq "ASCII") { $encoding=$gettext_code; } elsif ($gettext_code ne "ASCII") { # Only report once because the message is quite long if (! $encoding_problem_is_reported) { print STDERR "WARNING: You should use the same file encoding for all your project files,\n". " but $PROGRAM thinks that most of the source files are in\n". " $encoding encoding, while \"$_\" is (likely) in\n". " $gettext_code encoding. If you are sure that all translatable strings\n". " are in same encoding (say UTF-8), please \e[1m*prepend*\e[0m the following\n". " line to POTFILES.in:\n\n". " [encoding: UTF-8]\n\n". " and make sure that configure.in/ac checks for $PACKAGE >= 0.27 .\n". "(such warning message will only be reported once.)\n"; $encoding_problem_is_reported = 1; } } } } close OUTFILE; close INFILE; unlink "$MODULE.pot"; my @xgettext_argument=("$XGETTEXT", "--add-comments", "--directory\=\.", "--output\=$MODULE\.pot", "--files-from\=\.\/POTFILES\.in\.temp"); my $XGETTEXT_KEYWORDS = &FindPOTKeywords; push @xgettext_argument, $XGETTEXT_KEYWORDS; push @xgettext_argument, "--from-code\=$encoding" if ($gettext_support_nonascii); push @xgettext_argument, $XGETTEXT_ARGS if $XGETTEXT_ARGS; my $xgettext_command = join ' ', @xgettext_argument; # intercept xgettext error message print "Running $xgettext_command\n" if $VERBOSE; my $xgettext_error_msg = `$xgettext_command 2>\&1`; my $command_failed = $?; unlink "POTFILES.in.temp"; print "Removing generated header (.h) files..." if $VERBOSE; unlink foreach (@temp_headers); print "done.\n" if $VERBOSE; if (! $command_failed) { if (! -e "$MODULE.pot") { print "None of the files in POTFILES.in contain strings marked for translation.\n" if $VERBOSE; } else { print "Wrote $MODULE.pot\n" if $VERBOSE; } } else { if ($xgettext_error_msg =~ /--from-code/) { # replace non-ASCII error message with a more useful one. print STDERR "ERROR: xgettext failed to generate PO template file because there is non-ASCII\n". " string marked for translation. Please make sure that all strings marked\n". " for translation are in uniform encoding (say UTF-8), then \e[1m*prepend*\e[0m the\n". " following line to POTFILES.in and rerun $PROGRAM:\n\n". " [encoding: UTF-8]\n\n"; } else { print STDERR "$xgettext_error_msg"; if (-e "$MODULE.pot") { # is this possible? print STDERR "ERROR: xgettext failed but still managed to generate PO template file.\n". " Please consult error message above if there is any.\n"; } else { print STDERR "ERROR: xgettext failed to generate PO template file. Please consult\n". " error message above if there is any.\n"; } } exit (1); } } sub POFile_Update { -f "$MODULE.pot" or die "$PROGRAM: $MODULE.pot does not exist.\n"; my $MSGMERGE = $ENV{"MSGMERGE"} || "/usr/bin/msgmerge"; my ($lang, $outfile) = @_; print "Merging $SRCDIR/$lang.po with $MODULE.pot..." if $VERBOSE; my $infile = "$SRCDIR/$lang.po"; $outfile = "$SRCDIR/$lang.po" if ($outfile eq ""); # I think msgmerge won't overwrite old file if merge is not successful system ("$MSGMERGE", "-o", $outfile, $infile, "$MODULE.pot"); } sub Console_WriteError_NotExisting { my ($file) = @_; ## Report error if supplied language file is non-existing print STDERR "$PROGRAM: $file does not exist!\n"; print STDERR "Try '$PROGRAM --help' for more information.\n"; exit; } sub GatherPOFiles { my @po_files = glob ("./*.po"); @languages = map (&POFile_GetLanguage, @po_files); foreach my $lang (@languages) { $po_files_by_lang{$lang} = shift (@po_files); } } sub POFile_GetLanguage ($) { s/^(.*\/)?(.+)\.po$/$2/; return $_; } sub Console_Write_TranslationStatus { my ($lang, $output_file) = @_; my $MSGFMT = $ENV{"MSGFMT"} || "/usr/bin/msgfmt"; $output_file = "$SRCDIR/$lang.po" if ($output_file eq ""); system ("$MSGFMT", "-o", "$devnull", "--verbose", $output_file); } sub Console_Write_CoverageReport { my $MSGFMT = $ENV{"MSGFMT"} || "/usr/bin/msgfmt"; &GatherPOFiles; foreach my $lang (@languages) { print "$lang: "; &POFile_Update ($lang, ""); } print "\n\n * Current translation support in $MODULE \n\n"; foreach my $lang (@languages) { print "$lang: "; system ("$MSGFMT", "-o", "$devnull", "--verbose", "$SRCDIR/$lang.po"); } } sub SubstituteVariable { my ($str) = @_; # always need to rewind file whenever it has been accessed seek (CONF, 0, 0); # cache each variable. varhash is global to we can add # variables elsewhere. while () { if (/^(\w+)=(.*)$/) { ($varhash{$1} = $2) =~ s/^["'](.*)["']$/$1/; } } if ($str =~ /^(.*)\${?([A-Z_]+)}?(.*)$/) { my $rest = $3; my $untouched = $1; my $sub = $varhash{$2}; return SubstituteVariable ("$untouched$sub$rest"); } # We're using Perl backticks ` and "echo -n" here in order to # expand any shell escapes (such as backticks themselves) in every variable return echo_n ($str); } sub CONF_Handle_Open { my $base_dirname = getcwd(); $base_dirname =~ s@.*/@@; my ($conf_in, $src_dir); if ($base_dirname =~ /^po(-.+)?$/) { if (-f "Makevars") { my $makefile_source; local (*IN); open (IN, ") { if (/^top_builddir[ \t]*=/) { $src_dir = $_; $src_dir =~ s/^top_builddir[ \t]*=[ \t]*([^ \t\n\r]*)/$1/; chomp $src_dir; if (-f "$src_dir" . "/configure.ac") { $conf_in = "$src_dir" . "/configure.ac" . "\n"; } else { $conf_in = "$src_dir" . "/configure.in" . "\n"; } last; } } close IN; $conf_in || die "Cannot find top_builddir in Makevars."; } elsif (-f "../configure.ac") { $conf_in = "../configure.ac"; } elsif (-f "../configure.in") { $conf_in = "../configure.in"; } else { my $makefile_source; local (*IN); open (IN, ") { if (/^top_srcdir[ \t]*=/) { $src_dir = $_; $src_dir =~ s/^top_srcdir[ \t]*=[ \t]*([^ \t\n\r]*)/$1/; chomp $src_dir; $conf_in = "$src_dir" . "/configure.in" . "\n"; last; } } close IN; $conf_in || die "Cannot find top_srcdir in Makefile."; } open (CONF, "<$conf_in"); } else { print STDERR "$PROGRAM: Unable to proceed.\n" . "Make sure to run this script inside the po directory.\n"; exit; } } sub FindPackageName { my $version; my $domain = &FindMakevarsDomain; my $name = $domain || "untitled"; &CONF_Handle_Open; my $conf_source; { local (*IN); open (IN, "<&CONF") || return $name; seek (IN, 0, 0); local $/; # slurp mode $conf_source = ; close IN; } # priority for getting package name: # 1. GETTEXT_PACKAGE # 2. first argument of AC_INIT (with >= 2 arguments) # 3. first argument of AM_INIT_AUTOMAKE (with >= 2 argument) # /^AM_INIT_AUTOMAKE\([\s\[]*([^,\)\s\]]+)/m # the \s makes this not work, why? if ($conf_source =~ /^AM_INIT_AUTOMAKE\(([^,\)]+),([^,\)]+)/m) { ($name, $version) = ($1, $2); $name =~ s/[\[\]\s]//g; $version =~ s/[\[\]\s]//g; $varhash{"AC_PACKAGE_NAME"} = $name; $varhash{"PACKAGE"} = $name; $varhash{"AC_PACKAGE_VERSION"} = $version; $varhash{"VERSION"} = $version; } if ($conf_source =~ /^AC_INIT\(([^,\)]+),([^,\)]+)/m) { ($name, $version) = ($1, $2); $name =~ s/[\[\]\s]//g; $version =~ s/[\[\]\s]//g; $varhash{"AC_PACKAGE_NAME"} = $name; $varhash{"PACKAGE"} = $name; $varhash{"AC_PACKAGE_VERSION"} = $version; $varhash{"VERSION"} = $version; } # \s makes this not work, why? $name = $1 if $conf_source =~ /^GETTEXT_PACKAGE=\[?([^\n\]]+)/m; # prepend '$' to auto* internal variables, usually they are # used in configure.in/ac without the '$' $name =~ s/AC_/\$AC_/g; $name =~ s/\$\$/\$/g; $name = $domain if $domain; $name = SubstituteVariable ($name); $name =~ s/^["'](.*)["']$/$1/; return $name if $name; } sub FindPOTKeywords { my $keywords = "--keyword\=\_ --keyword\=N\_ --keyword\=U\_ --keyword\=Q\_"; my $varname = "XGETTEXT_OPTIONS"; my $make_source; { local (*IN); open (IN, "; close IN; } $keywords = $1 if $make_source =~ /^$varname[ ]*=\[?([^\n\]]+)/m; return $keywords; } sub FindMakevarsDomain { my $domain = ""; my $makevars_source; { local (*IN); open (IN, "; close IN; } $domain = $1 if $makevars_source =~ /^DOMAIN[ ]*=\[?([^\n\]\$]+)/m; $domain =~ s/^\s+//; $domain =~ s/\s+$//; return $domain; } xqf-1.0.5/install-sh0000755002404400000620000002202110422550571011232 00000000000000#!/bin/sh # install - install a program, script, or datafile scriptversion=2005-05-14.22 # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. It can only install one file at a time, a restriction # shared with many OS's install programs. # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit="${DOITPROG-}" # put in absolute paths if you don't have them in your path; or use env. vars. mvprog="${MVPROG-mv}" cpprog="${CPPROG-cp}" chmodprog="${CHMODPROG-chmod}" chownprog="${CHOWNPROG-chown}" chgrpprog="${CHGRPPROG-chgrp}" stripprog="${STRIPPROG-strip}" rmprog="${RMPROG-rm}" mkdirprog="${MKDIRPROG-mkdir}" chmodcmd="$chmodprog 0755" chowncmd= chgrpcmd= stripcmd= rmcmd="$rmprog -f" mvcmd="$mvprog" src= dst= dir_arg= dstarg= no_target_directory= usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: -c (ignored) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -s $stripprog installed files. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. --help display this help and exit. --version display version info and exit. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test -n "$1"; do case $1 in -c) shift continue;; -d) dir_arg=true shift continue;; -g) chgrpcmd="$chgrpprog $2" shift shift continue;; --help) echo "$usage"; exit $?;; -m) chmodcmd="$chmodprog $2" shift shift continue;; -o) chowncmd="$chownprog $2" shift shift continue;; -s) stripcmd=$stripprog shift continue;; -t) dstarg=$2 shift shift continue;; -T) no_target_directory=true shift continue;; --version) echo "$0 $scriptversion"; exit $?;; *) # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. test -n "$dir_arg$dstarg" && break # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dstarg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dstarg" shift # fnord fi shift # arg dstarg=$arg done break;; esac done if test -z "$1"; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call `install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi for src do # Protect names starting with `-'. case $src in -*) src=./$src ;; esac if test -n "$dir_arg"; then dst=$src src= if test -d "$dst"; then mkdircmd=: chmodcmd= else mkdircmd=$mkdirprog fi else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dstarg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dstarg # Protect names starting with `-'. case $dst in -*) dst=./$dst ;; esac # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test -n "$no_target_directory"; then echo "$0: $dstarg: Is a directory" >&2 exit 1 fi dst=$dst/`basename "$src"` fi fi # This sed command emulates the dirname command. dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'` # Make sure that the destination directory exists. # Skip lots of stat calls in the usual case. if test ! -d "$dstdir"; then defaultIFS=' ' IFS="${IFS-$defaultIFS}" oIFS=$IFS # Some sh's can't handle IFS=/ for some reason. IFS='%' set x `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'` shift IFS=$oIFS pathcomp= while test $# -ne 0 ; do pathcomp=$pathcomp$1 shift if test ! -d "$pathcomp"; then $mkdirprog "$pathcomp" # mkdir can fail with a `File exist' error in case several # install-sh are creating the directory concurrently. This # is OK. test -d "$pathcomp" || exit fi pathcomp=$pathcomp/ done fi if test -n "$dir_arg"; then $doit $mkdircmd "$dst" \ && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \ && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \ && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \ && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; } else dstfile=`basename "$dst"` # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 trap '(exit $?); exit' 1 2 13 15 # Copy the file name to the temp name. $doit $cpprog "$src" "$dsttmp" && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \ && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \ && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \ && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } && # Now rename the file to the real destination. { $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \ || { # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { if test -f "$dstdir/$dstfile"; then $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \ || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \ || { echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2 (exit 1); exit 1 } else : fi } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dstdir/$dstfile" } } fi || { (exit 1); exit 1; } done # The final little trick to "correctly" pass the exit status to the exit trap. { (exit 0); exit 0 } # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: xqf-1.0.5/autogen.sh0000755002404400000620000001061210311576062011232 00000000000000#! /bin/sh # Run this to generate all the initial makefiles, etc. # Stolen from the GNU Midnight Commander. Customized for giFTcurs. # adapted for xqf # Make it possible to specify path in the environment : ${AUTOCONF=autoconf} : ${AUTOHEADER=autoheader} : ${AUTOMAKE=automake} : ${ACLOCAL=aclocal} : ${GETTEXTIZE=gettextize} srcdir=`dirname $0` test -z "$srcdir" && srcdir=. ( cd $srcdir # extract flag icons rm pixmaps/flags/*.png tar -C pixmaps -xzf pixmaps/flags.tar.gz # The autoconf cache (version after 2.52) is not reliable yet. rm -rf autom4te.cache # Ensure that gettext is reasonably new. gettext_ver=`$GETTEXTIZE --version | sed -n '1s/\.//g;1s/.* //;1s/^\(...\)$/\100/;1s/^\(...\)\(.\)$/\10\2/;1p'` if test $gettext_ver -lt 01038; then echo "Don't use gettext older than 0.10.38" 2>&1 exit 1 fi echo "Running $GETTEXTIZE and intltoolize..." rm -rf intl if test $gettext_ver -ge 01100; then if test $gettext_ver -ge 01104; then # gettextize doesn't want us to run it in a non-interactive script. GETTEXTIZE_FIXED=./gettextize.fixed egrep -v "read.*/dev/tty" `which $GETTEXTIZE` > $GETTEXTIZE_FIXED chmod +x $GETTEXTIZE_FIXED GETTEXTIZE=$GETTEXTIZE_FIXED fi # $GETTEXTIZE --copy --force --intl --no-changelog >tmpout || exit 1 glib-gettextize --copy --force || exit 1 intltoolize --copy --force --automake || exit 1 if test -f Makefile.am~; then rm -rf Makefile.am mv Makefile.am~ Makefile.am fi if test -f configure.in~ ; then rm -rf configure.in mv configure.in~ configure.in fi for i in po/Rules-quot po/boldquot.sed po/en@boldquot.header \ po/en@quot.header po/insert-header.sin po/quot.sed \ po/remove-potcdate.sin po/Makefile.in.in do if diff -s $i $i~ >/dev/null 2>&1 ; then mv $i~ $i fi done # Do we need po/Makevars.in and family for gettext 0.11 ? if test ! -f po/Makevars; then cat > po/Makevars <tmpout || exit 1 if test -f po/ChangeLog~; then rm -f po/ChangeLog mv po/ChangeLog~ po/ChangeLog fi fi rm -f aclocal.m4 if test -f `aclocal --print-ac-dir`/gettext.m4; then : # gettext macro files are available to aclocal. else # gettext macro files are not available. # Find them and copy to a local directory. # Ugly way to parse the instructions gettexize gives us. m4files="`cat tmpout | sed -n -e '/^Please/,/^from/s/^ *//p'`" fromdir=`cat tmpout | sed -n -e '/^Please/,/^from/s/^from the \([^ ]*\) .*$/\1/p'` rm -rf gettext.m4 mkdir gettext.m4 for i in $m4files; do cp -f $fromdir/$i gettext.m4 done ACLOCAL_INCLUDES="-I gettext.m4" fi if test -d m4; then # gettextize 0.11.4 wants this for some reason ACLOCAL_INCLUDES="$ACLOCAL_INCLUDES -I m4" fi rm -f tmpout $GETTEXTIZE_FIXED ## workaround for libtoolize putting files in .. #if [ ! -e install-sh ]; then # removeinstallsh=1 # touch install-sh #fi # #echo "running libtoolize ..." #libtoolize --force || die libtoolize libtool # #[ -n "$removeinstallsh" ] && rm install-sh # Some old version of GNU build tools fail to set error codes. # Check that they generate some of the files they should. echo "Running $ACLOCAL..." $ACLOCAL $ACLOCAL_INCLUDES $ACLOCAL_FLAGS || exit 1 test -f aclocal.m4 || \ { echo "aclocal failed to generate aclocal.m4" 2>&1; exit 1; } echo "Running $AUTOHEADER..." $AUTOHEADER || exit 1 test -f src/gnuconfig.h.in || \ { echo "autoheader failed to generate src/gnuconfig.h.in" 2>&1; exit 1; } echo "Running $AUTOCONF..." $AUTOCONF || exit 1 test -f configure || \ { echo "autoconf failed to generate configure" 2>&1; exit 1; } ## Workaround for Automake 1.5 to ensure that depcomp is distributed. echo "Running $AUTOMAKE..." ## doesn't work $AUTOMAKE -a src/Makefile || exit 1 $AUTOMAKE -a || exit 1 test -f Makefile.in || \ { echo "automake failed to generate Makefile.in" 2>&1; exit 1; } ) || exit 1 #conf_flags="--enable-maintainer-mode --enable-compile-warnings" #echo Running $srcdir/configure $conf_flags "$@" ... #$srcdir/configure --cache-file=config.cache $conf_flags "$@" && \ # echo "Now type \`make' (\`gmake' on some systems) to compile XQF" xqf-1.0.5/missing0000755002404400000620000002540610422550571010637 00000000000000#! /bin/sh # Common stub for a few missing GNU programs while installing. scriptversion=2005-06-08.21 # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005 # Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. # 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, 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., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi run=: # In the cases where this matters, `missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac else configure_ac=configure.in fi msg="missing on your system" case "$1" in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 # Exit code 63 means version mismatch. This often happens # when the user try to use an ancient version of a tool on # a file that requires a minimum version. In this case we # we should proceed has if the program had been absent, or # if --run hadn't been passed. if test $? = 63; then run=: msg="probably too old" fi ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch] Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; esac # Now exit if we have it, but it failed. Also exit now if we # don't have it and --version was passed (most likely to detect # the program). case "$1" in lex|yacc) # Not GNU programs, they don't have --version. ;; tar) if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then exit 1 fi ;; *) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then # Could not run --version or --help. This is probably someone # running `$TOOL --version' or `$TOOL --help' to check whether # $TOOL exists and not knowing $TOOL uses missing. exit 1 fi ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case "$1" in aclocal*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do case "$f" in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; autom4te) echo 1>&2 "\ WARNING: \`$1' is needed, but is $msg. You might have modified some files without having the proper tools for further handling them. You can get \`$1' as part of \`Autoconf' from any GNU archive site." file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'` test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo "#! /bin/sh" echo "# Created by GNU Automake missing as a replacement of" echo "# $ $@" echo "exit 0" chmod +x $file exit 1 fi ;; bison|yacc) echo 1>&2 "\ WARNING: \`$1' $msg. You should only need it if you modified a \`.y' file. You may need the \`Bison' package in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if [ $# -ne 1 ]; then eval LASTARG="\${$#}" case "$LASTARG" in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.h fi ;; esac fi if [ ! -f y.tab.h ]; then echo >y.tab.h fi if [ ! -f y.tab.c ]; then echo 'main() { return 0; }' >y.tab.c fi ;; lex|flex) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c if [ $# -ne 1 ]; then eval LASTARG="\${$#}" case "$LASTARG" in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if [ ! -f lex.yy.c ]; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a dependency of a manual page. You may need the \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'` fi if [ -f "$file" ]; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit 1 fi ;; makeinfo) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy \`make' (AIX, DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." # The file to touch is that specified with -o ... file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then # ... or it is the one specified with @setfilename ... infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $infile` # ... or it is derived from the source name (dir/f.texi becomes f.info) test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info fi # If the file does not exist, the user really needs makeinfo; # let's fail without touching anything. test -f $file || exit 1 touch $file ;; tar) shift # We have already tried tar in the generic part. # Look for gnutar/gtar before invocation to avoid ugly error # messages. if (gnutar --version > /dev/null 2>&1); then gnutar "$@" && exit 0 fi if (gtar --version > /dev/null 2>&1); then gtar "$@" && exit 0 fi firstarg="$1" if shift; then case "$firstarg" in *o*) firstarg=`echo "$firstarg" | sed s/o//` tar "$firstarg" "$@" && exit 0 ;; esac case "$firstarg" in *h*) firstarg=`echo "$firstarg" | sed s/h//` tar "$firstarg" "$@" && exit 0 ;; esac fi echo 1>&2 "\ WARNING: I can't seem to be able to run \`tar' with the given arguments. You may want to install GNU tar or Free paxutils, or check the command line arguments." exit 1 ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and is $msg. You might have modified some files without having the proper tools for further handling them. Check the \`README' file, it often tells you about the needed prerequisites for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing \`$1' program." exit 1 ;; esac exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: xqf-1.0.5/mkinstalldirs0000755002404400000620000000662210520653073012045 00000000000000#! /bin/sh # mkinstalldirs --- make directory hierarchy scriptversion=2005-06-29.22 # Original author: Noah Friedman # Created: 1993-05-16 # Public domain. # # This file is maintained in Automake, please report # bugs to or send patches to # . errstatus=0 dirmode= usage="\ Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ... Create each directory DIR (with mode MODE, if specified), including all leading file name components. Report bugs to ." # process command line arguments while test $# -gt 0 ; do case $1 in -h | --help | --h*) # -h for help echo "$usage" exit $? ;; -m) # -m PERM arg shift test $# -eq 0 && { echo "$usage" 1>&2; exit 1; } dirmode=$1 shift ;; --version) echo "$0 $scriptversion" exit $? ;; --) # stop option processing shift break ;; -*) # unknown option echo "$usage" 1>&2 exit 1 ;; *) # first non-opt arg break ;; esac done for file do if test -d "$file"; then shift else break fi done case $# in 0) exit 0 ;; esac # Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and # mkdir -p a/c at the same time, both will detect that a is missing, # one will create a, then the other will try to create a and die with # a "File exists" error. This is a problem when calling mkinstalldirs # from a parallel make. We use --version in the probe to restrict # ourselves to GNU mkdir, which is thread-safe. case $dirmode in '') if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then echo "mkdir -p -- $*" exec mkdir -p -- "$@" else # On NextStep and OpenStep, the `mkdir' command does not # recognize any option. It will interpret all options as # directories to create, and then abort because `.' already # exists. test -d ./-p && rmdir ./-p test -d ./--version && rmdir ./--version fi ;; *) if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 && test ! -d ./--version; then echo "mkdir -m $dirmode -p -- $*" exec mkdir -m "$dirmode" -p -- "$@" else # Clean up after NextStep and OpenStep mkdir. for d in ./-m ./-p ./--version "./$dirmode"; do test -d $d && rmdir $d done fi ;; esac for file do case $file in /*) pathcomp=/ ;; *) pathcomp= ;; esac oIFS=$IFS IFS=/ set fnord $file shift IFS=$oIFS for d do test "x$d" = x && continue pathcomp=$pathcomp$d case $pathcomp in -*) pathcomp=./$pathcomp ;; esac if test ! -d "$pathcomp"; then echo "mkdir $pathcomp" mkdir "$pathcomp" || lasterr=$? if test ! -d "$pathcomp"; then errstatus=$lasterr else if test ! -z "$dirmode"; then echo "chmod $dirmode $pathcomp" lasterr= chmod "$dirmode" "$pathcomp" || lasterr=$? if test ! -z "$lasterr"; then errstatus=$lasterr fi fi fi fi pathcomp=$pathcomp/ done done exit $errstatus # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: xqf-1.0.5/Makefile.am0000644002404400000620000000114010206174235011260 00000000000000SUBDIRS = po src docs pixmaps man_MANS = xqf.6 @INTLTOOL_DESKTOP_RULE@ DESKTOP_IN_FILES = xqf.desktop.in DESKTOP_FILES = $(DESKTOP_IN_FILES:.desktop.in=.desktop) desktopdir= $(datadir)/applications desktop_DATA = $(DESKTOP_FILES) gtkrcdir = $(pkgdatadir)/default gtkrc_DATA = gtkrc EXTRA_DIST = \ BUGS \ autogen.sh \ clean.sh \ $(man_MANS) \ xqf.spec \ $(DESKTOP_IN_FILES) \ $(gtkrc_DATA) \ intltool-merge.in \ intltool-update.in \ intltool-extract.in DISTCLEANFILES = \ po/.intltool-merge-cache \ intltool-extract \ intltool-merge \ intltool-update \ $(DESKTOP_FILES) xqf-1.0.5/Makefile.in0000644002404400000620000005772610523105435011314 00000000000000# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = . am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = . DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/xqf.spec.in \ $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \ TODO compile depcomp install-sh missing mkinstalldirs ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno configure.status.lineno mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/src/gnuconfig.h CONFIG_CLEAN_FILES = xqf.spec SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-exec-recursive install-info-recursive \ install-recursive installcheck-recursive installdirs-recursive \ pdf-recursive ps-recursive uninstall-info-recursive \ uninstall-recursive man6dir = $(mandir)/man6 am__installdirs = "$(DESTDIR)$(man6dir)" "$(DESTDIR)$(desktopdir)" \ "$(DESTDIR)$(gtkrcdir)" NROFF = nroff MANS = $(man_MANS) am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; desktopDATA_INSTALL = $(INSTALL_DATA) gtkrcDATA_INSTALL = $(INSTALL_DATA) DATA = $(desktop_DATA) $(gtkrc_DATA) ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ { test ! -d $(distdir) \ || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -fr $(distdir); }; } DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_XQFRCON_FALSE = @BUILD_XQFRCON_FALSE@ BUILD_XQFRCON_TRUE = @BUILD_XQFRCON_TRUE@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COMPRESSION = @COMPRESSION@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEBUG = @DEBUG@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DUMMY_LIBGDKPIXBUF_FALSE = @DUMMY_LIBGDKPIXBUF_FALSE@ DUMMY_LIBGDKPIXBUF_ORIG = @DUMMY_LIBGDKPIXBUF_ORIG@ DUMMY_LIBGDKPIXBUF_SONAME = @DUMMY_LIBGDKPIXBUF_SONAME@ DUMMY_LIBGDKPIXBUF_TRUE = @DUMMY_LIBGDKPIXBUF_TRUE@ DUMMY_LIBGEOIP_FALSE = @DUMMY_LIBGEOIP_FALSE@ DUMMY_LIBGEOIP_ORIG = @DUMMY_LIBGEOIP_ORIG@ DUMMY_LIBGEOIP_SONAME = @DUMMY_LIBGEOIP_SONAME@ DUMMY_LIBGEOIP_TRUE = @DUMMY_LIBGEOIP_TRUE@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GDK_PIXBUF_CFLAGS = @GDK_PIXBUF_CFLAGS@ GDK_PIXBUF_CONFIG = @GDK_PIXBUF_CONFIG@ GDK_PIXBUF_LIBS = @GDK_PIXBUF_LIBS@ GEOIP_LIB = @GEOIP_LIB@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_CONFIG = @GLIB_CONFIG@ GLIB_LIBS = @GLIB_LIBS@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_CONFIG = @GTK_CONFIG@ GTK_LIBS = @GTK_LIBS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@ INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@ INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_ICONV = @INTLTOOL_ICONV@ INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@ INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_MSGFMT = @INTLTOOL_MSGFMT@ INTLTOOL_MSGMERGE = @INTLTOOL_MSGMERGE@ INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@ INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@ INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@ INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@ INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@ INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@ INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@ INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@ INTLTOOL_XGETTEXT = @INTLTOOL_XGETTEXT@ INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@ INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MSGFMT = @MSGFMT@ OBJEXT = @OBJEXT@ OLD_GTK_SUPPORT = @OLD_GTK_SUPPORT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_CFLAGS = @PACKAGE_CFLAGS@ PACKAGE_LIBS = @PACKAGE_LIBS@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ QSTATEXEC = @QSTATEXEC@ RANLIB = @RANLIB@ RELEASE = @RELEASE@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ XQFRCON_LIBS = @XQFRCON_LIBS@ ac_ct_CC = @ac_ct_CC@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ datadir = @datadir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ SUBDIRS = po src docs pixmaps man_MANS = xqf.6 DESKTOP_IN_FILES = xqf.desktop.in DESKTOP_FILES = $(DESKTOP_IN_FILES:.desktop.in=.desktop) desktopdir = $(datadir)/applications desktop_DATA = $(DESKTOP_FILES) gtkrcdir = $(pkgdatadir)/default gtkrc_DATA = gtkrc EXTRA_DIST = \ BUGS \ autogen.sh \ clean.sh \ $(man_MANS) \ xqf.spec \ $(DESKTOP_IN_FILES) \ $(gtkrc_DATA) \ intltool-merge.in \ intltool-update.in \ intltool-extract.in DISTCLEANFILES = \ po/.intltool-merge-cache \ intltool-extract \ intltool-merge \ intltool-update \ $(DESKTOP_FILES) all: all-recursive .SUFFIXES: am--refresh: @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \ cd $(srcdir) && $(AUTOMAKE) --gnu \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: $(am__configure_deps) cd $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) xqf.spec: $(top_builddir)/config.status $(srcdir)/xqf.spec.in cd $(top_builddir) && $(SHELL) ./config.status $@ uninstall-info-am: install-man6: $(man6_MANS) $(man_MANS) @$(NORMAL_INSTALL) test -z "$(man6dir)" || $(mkdir_p) "$(DESTDIR)$(man6dir)" @list='$(man6_MANS) $(dist_man6_MANS) $(nodist_man6_MANS)'; \ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ for i in $$l2; do \ case "$$i" in \ *.6*) list="$$list $$i" ;; \ esac; \ done; \ for i in $$list; do \ if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ else file=$$i; fi; \ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ case "$$ext" in \ 6*) ;; \ *) ext='6' ;; \ esac; \ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ inst=`echo $$inst | sed -e 's/^.*\///'`; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man6dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man6dir)/$$inst"; \ done uninstall-man6: @$(NORMAL_UNINSTALL) @list='$(man6_MANS) $(dist_man6_MANS) $(nodist_man6_MANS)'; \ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ for i in $$l2; do \ case "$$i" in \ *.6*) list="$$list $$i" ;; \ esac; \ done; \ for i in $$list; do \ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ case "$$ext" in \ 6*) ;; \ *) ext='6' ;; \ esac; \ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ inst=`echo $$inst | sed -e 's/^.*\///'`; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ echo " rm -f '$(DESTDIR)$(man6dir)/$$inst'"; \ rm -f "$(DESTDIR)$(man6dir)/$$inst"; \ done install-desktopDATA: $(desktop_DATA) @$(NORMAL_INSTALL) test -z "$(desktopdir)" || $(mkdir_p) "$(DESTDIR)$(desktopdir)" @list='$(desktop_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(desktopDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(desktopdir)/$$f'"; \ $(desktopDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(desktopdir)/$$f"; \ done uninstall-desktopDATA: @$(NORMAL_UNINSTALL) @list='$(desktop_DATA)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(desktopdir)/$$f'"; \ rm -f "$(DESTDIR)$(desktopdir)/$$f"; \ done install-gtkrcDATA: $(gtkrc_DATA) @$(NORMAL_INSTALL) test -z "$(gtkrcdir)" || $(mkdir_p) "$(DESTDIR)$(gtkrcdir)" @list='$(gtkrc_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(gtkrcDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(gtkrcdir)/$$f'"; \ $(gtkrcDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(gtkrcdir)/$$f"; \ done uninstall-gtkrcDATA: @$(NORMAL_UNINSTALL) @list='$(gtkrc_DATA)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(gtkrcdir)/$$f'"; \ rm -f "$(DESTDIR)$(gtkrcdir)/$$f"; \ done # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" mostlyclean-recursive clean-recursive distclean-recursive \ maintainer-clean-recursive: @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) $(am__remove_distdir) mkdir $(distdir) $(mkdir_p) $(distdir)/. $(distdir)/po @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(mkdir_p) "$(distdir)/$$subdir" \ || exit 1; \ distdir=`$(am__cd) $(distdir) && pwd`; \ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$top_distdir" \ distdir="$$distdir/$$subdir" \ distdir) \ || exit 1; \ fi; \ done -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r $(distdir) dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 $(am__remove_distdir) dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__remove_distdir) dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__remove_distdir) dist dist-all: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir); chmod a+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && cd $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck $(am__remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}' distuninstallcheck: @cd $(distuninstallcheck_dir) \ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-recursive all-am: Makefile $(MANS) $(DATA) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(man6dir)" "$(DESTDIR)$(desktopdir)" "$(DESTDIR)$(gtkrcdir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-desktopDATA install-gtkrcDATA install-man install-exec-am: install-info: install-info-recursive install-man: install-man6 installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-desktopDATA uninstall-gtkrcDATA \ uninstall-info-am uninstall-man uninstall-info: uninstall-info-recursive uninstall-man: uninstall-man6 .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \ check-am clean clean-generic clean-recursive ctags \ ctags-recursive dist dist-all dist-bzip2 dist-gzip dist-shar \ dist-tarZ dist-zip distcheck distclean distclean-generic \ distclean-recursive distclean-tags distcleancheck distdir \ distuninstallcheck dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am \ install-desktopDATA install-exec install-exec-am \ install-gtkrcDATA install-info install-info-am install-man \ install-man6 install-strip installcheck installcheck-am \ installdirs installdirs-am maintainer-clean \ maintainer-clean-generic maintainer-clean-recursive \ mostlyclean mostlyclean-generic mostlyclean-recursive pdf \ pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \ uninstall-desktopDATA uninstall-gtkrcDATA uninstall-info-am \ uninstall-man uninstall-man6 @INTLTOOL_DESKTOP_RULE@ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xqf-1.0.5/AUTHORS0000644002404400000620000000050507560307160010304 00000000000000Copyright (C) 1998-2002 Roman Pozlevich Roman Pozlevich Significant contributors: Bill Adams Alex Burger Ludwig Nussel Jordi Mallach Other contributors: Jochen Baier xqf-1.0.5/xqf.spec.in0000644002404400000620000000245710025074052011312 00000000000000%define name xqf %define version @VERSION@ %define release %{?CUSTOM_RELEASE} %{!?CUSTOM_RELEASE:@RELEASE@} Summary: A network game browser and launcher Name: %{name} Version: %{version} Release: %{release} License: GPL Group: Games/Utilities Source0: %{name}-%{version}.tar.gz URL: http://www.linuxgames.com/xqf/ Buildroot: %{_tmppath}/%{name}-buildroot Packager: The XQF Team #Since there is not a .spec file with qstat, we will not # require it for now. You may want to uncomment it # for your dist. #Requires: qstat >= 2.4e Requires: gzip Requires: wget %description XQF is a network game browser (e.g. Quake, Unreal, etc.). It helps you locate and connect to game servers. It has configurable server and player filters so you can find a server running your favorite game type or that has a buddy. %prep rm -rf $RPM_BUILD_ROOT %setup %build CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" \ ./configure \ --prefix=%{_prefix} \ --infodir=%{_infodir} \ --mandir=%{_mandir} make %install %makeinstall %clean rm -rf $RPM_BUILD_ROOT %files %defattr (-,root,root) %doc AUTHORS BUGS COPYING ChangeLog NEWS README TODO %doc docs/*html docs/PreLaunch.example %dir %{_datadir}/xqf %{_prefix}/bin/* %{_mandir}/man?/xqf.* %{_datadir}/locale/*/LC_MESSAGES/xqf.mo %{_datadir}/xqf/* xqf-1.0.5/INSTALL0000644002404400000620000002243210422550571010265 00000000000000Installation Instructions ************************* Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free Software Foundation, Inc. This file is free documentation; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. Basic Installation ================== These are generic installation instructions. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). It can also use an optional file (typically called `config.cache' and enabled with `--cache-file=config.cache' or simply `-C') that saves the results of its tests to speed up reconfiguring. (Caching is disabled by default to prevent problems with accidental use of stale cache files.) If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If you are using the cache, and at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.ac' (or `configure.in') is used to create `configure' by a program called `autoconf'. You only need `configure.ac' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. If you're using `csh' on an old version of System V, you might need to type `sh ./configure' instead to prevent `csh' from trying to execute `configure' itself. Running `configure' takes awhile. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with the package. 4. Type `make install' to install the programs and any data files and documentation. 5. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. Run `./configure --help' for details on some of the pertinent environment variables. You can give `configure' initial values for configuration parameters by setting variables in the command line or in the environment. Here is an example: ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix *Note Defining Variables::, for more details. Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you must use a version of `make' that supports the `VPATH' variable, such as GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. If you have to use a `make' that does not support the `VPATH' variable, you have to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. Installation Names ================== By default, `make install' installs the package's commands under `/usr/local/bin', include files under `/usr/local/include', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PREFIX'. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you pass the option `--exec-prefix=PREFIX' to `configure', the package uses PREFIX as the prefix for installing programs and libraries. Documentation and other data files still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=DIR' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Optional Features ================= Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The `README' should mention any `--enable-' and `--with-' options that the package recognizes. For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. Specifying the System Type ========================== There may be some features `configure' cannot figure out automatically, but needs to determine by the type of machine the package will run on. Usually, assuming the package is built to be run on the _same_ architectures, `configure' can figure that out, but if it prints a message saying it cannot guess the machine type, give it the `--build=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name which has the form: CPU-COMPANY-SYSTEM where SYSTEM can have one of these forms: OS KERNEL-OS See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the machine type. If you are _building_ compiler tools for cross-compiling, you should use the option `--target=TYPE' to select the type of system they will produce code for. If you want to _use_ a cross compiler, that generates code for a platform different from the build platform, you should specify the "host" platform (i.e., that on which the generated programs will eventually be run) with `--host=TYPE'. Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. Defining Variables ================== Variables not defined in a site shell script can be set in the environment passed to `configure'. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set them in the `configure' command line, using `VAR=value'. For example: ./configure CC=/usr/local2/bin/gcc causes the specified `gcc' to be used as the C compiler (unless it is overridden in the site shell script). Here is a another example: /bin/bash ./configure CONFIG_SHELL=/bin/bash Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent configuration-related scripts to be executed by `/bin/bash'. `configure' Invocation ====================== `configure' recognizes the following options to control how it operates. `--help' `-h' Print a summary of the options to `configure', and exit. `--version' `-V' Print the version of Autoconf used to generate the `configure' script, and exit. `--cache-file=FILE' Enable the cache: use and save the results of the tests in FILE, traditionally `config.cache'. FILE defaults to `/dev/null' to disable caching. `--config-cache' `-C' Alias for `--cache-file=config.cache'. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to `/dev/null' (any error messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. xqf-1.0.5/intltool-merge.in0000755002404400000620000010462010520653073012530 00000000000000#!@INTLTOOL_PERL@ -w # -*- Mode: perl; indent-tabs-mode: nil; c-basic-offset: 4 -*- # # The Intltool Message Merger # # Copyright (C) 2000, 2003 Free Software Foundation. # Copyright (C) 2000, 2001 Eazel, Inc # # Intltool is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # version 2 published by the Free Software Foundation. # # Intltool 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., 675 Mass Ave, Cambridge, MA 02139, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # # Authors: Maciej Stachowiak # Kenneth Christiansen # Darin Adler # # Proper XML UTF-8'ification written by Cyrille Chepelov # ## Release information my $PROGRAM = "intltool-merge"; my $PACKAGE = "intltool"; my $VERSION = "0.34.1"; ## Loaded modules use strict; use Getopt::Long; use Text::Wrap; use File::Basename; my $must_end_tag = -1; my $last_depth = -1; my $translation_depth = -1; my @tag_stack = (); my @entered_tag = (); my @translation_strings = (); my $leading_space = ""; ## Scalars used by the option stuff my $HELP_ARG = 0; my $VERSION_ARG = 0; my $BA_STYLE_ARG = 0; my $XML_STYLE_ARG = 0; my $KEYS_STYLE_ARG = 0; my $DESKTOP_STYLE_ARG = 0; my $SCHEMAS_STYLE_ARG = 0; my $RFC822DEB_STYLE_ARG = 0; my $QUIET_ARG = 0; my $PASS_THROUGH_ARG = 0; my $UTF8_ARG = 0; my $MULTIPLE_OUTPUT = 0; my $cache_file; ## Handle options GetOptions ( "help" => \$HELP_ARG, "version" => \$VERSION_ARG, "quiet|q" => \$QUIET_ARG, "oaf-style|o" => \$BA_STYLE_ARG, ## for compatibility "ba-style|b" => \$BA_STYLE_ARG, "xml-style|x" => \$XML_STYLE_ARG, "keys-style|k" => \$KEYS_STYLE_ARG, "desktop-style|d" => \$DESKTOP_STYLE_ARG, "schemas-style|s" => \$SCHEMAS_STYLE_ARG, "rfc822deb-style|r" => \$RFC822DEB_STYLE_ARG, "pass-through|p" => \$PASS_THROUGH_ARG, "utf8|u" => \$UTF8_ARG, "multiple-output|m" => \$MULTIPLE_OUTPUT, "cache|c=s" => \$cache_file ) or &error; my $PO_DIR; my $FILE; my $OUTFILE; my %po_files_by_lang = (); my %translations = (); my $iconv = $ENV{"ICONV"} || $ENV{"INTLTOOL_ICONV"} || "/usr/bin/iconv"; my $devnull = ($^O eq 'MSWin32' ? 'NUL:' : '/dev/null'); # Use this instead of \w for XML files to handle more possible characters. my $w = "[-A-Za-z0-9._:]"; # XML quoted string contents my $q = "[^\\\"]*"; ## Check for options. if ($VERSION_ARG) { &print_version; } elsif ($HELP_ARG) { &print_help; } elsif ($BA_STYLE_ARG && @ARGV > 2) { &utf8_sanity_check; &preparation; &print_message; &ba_merge_translations; &finalize; } elsif ($XML_STYLE_ARG && @ARGV > 2) { &utf8_sanity_check; &preparation; &print_message; &xml_merge_output; &finalize; } elsif ($KEYS_STYLE_ARG && @ARGV > 2) { &utf8_sanity_check; &preparation; &print_message; &keys_merge_translations; &finalize; } elsif ($DESKTOP_STYLE_ARG && @ARGV > 2) { &utf8_sanity_check; &preparation; &print_message; &desktop_merge_translations; &finalize; } elsif ($SCHEMAS_STYLE_ARG && @ARGV > 2) { &utf8_sanity_check; &preparation; &print_message; &schemas_merge_translations; &finalize; } elsif ($RFC822DEB_STYLE_ARG && @ARGV > 2) { &preparation; &print_message; &rfc822deb_merge_translations; &finalize; } else { &print_help; } exit; ## Sub for printing release information sub print_version { print <<_EOF_; ${PROGRAM} (${PACKAGE}) ${VERSION} Written by Maciej Stachowiak, Darin Adler and Kenneth Christiansen. Copyright (C) 2000-2003 Free Software Foundation, Inc. Copyright (C) 2000-2001 Eazel, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. _EOF_ exit; } ## Sub for printing usage information sub print_help { print <<_EOF_; Usage: ${PROGRAM} [OPTION]... PO_DIRECTORY FILENAME OUTPUT_FILE Generates an output file that includes some localized attributes from an untranslated source file. Mandatory options: (exactly one must be specified) -b, --ba-style includes translations in the bonobo-activation style -d, --desktop-style includes translations in the desktop style -k, --keys-style includes translations in the keys style -s, --schemas-style includes translations in the schemas style -r, --rfc822deb-style includes translations in the RFC822 style -x, --xml-style includes translations in the standard xml style Other options: -u, --utf8 convert all strings to UTF-8 before merging (default for everything except RFC822 style) -p, --pass-through deprecated, does nothing and issues a warning -m, --multiple-output output one localized file per locale, instead of a single file containing all localized elements -c, --cache=FILE specify cache file name (usually \$top_builddir/po/.intltool-merge-cache) -q, --quiet suppress most messages --help display this help and exit --version output version information and exit Report bugs to http://bugzilla.gnome.org/ (product name "$PACKAGE") or send email to . _EOF_ exit; } ## Sub for printing error messages sub print_error { print STDERR "Try `${PROGRAM} --help' for more information.\n"; exit; } sub print_message { print "Merging translations into $OUTFILE.\n" unless $QUIET_ARG; } sub preparation { $PO_DIR = $ARGV[0]; $FILE = $ARGV[1]; $OUTFILE = $ARGV[2]; &gather_po_files; &get_translation_database; } # General-purpose code for looking up translations in .po files sub po_file2lang { my ($tmp) = @_; $tmp =~ s/^.*\/(.*)\.po$/$1/; return $tmp; } sub gather_po_files { for my $po_file (glob "$PO_DIR/*.po") { $po_files_by_lang{po_file2lang($po_file)} = $po_file; } } sub get_local_charset { my ($encoding) = @_; my $alias_file = $ENV{"G_CHARSET_ALIAS"} || "/usr/lib/charset.alias"; # seek character encoding aliases in charset.alias (glib) if (open CHARSET_ALIAS, $alias_file) { while () { next if /^\#/; return $1 if (/^\s*([-._a-zA-Z0-9]+)\s+$encoding\b/i) } close CHARSET_ALIAS; } # if not found, return input string return $encoding; } sub get_po_encoding { my ($in_po_file) = @_; my $encoding = ""; open IN_PO_FILE, $in_po_file or die; while () { ## example: "Content-Type: text/plain; charset=ISO-8859-1\n" if (/Content-Type\:.*charset=([-a-zA-Z0-9]+)\\n/) { $encoding = $1; last; } } close IN_PO_FILE; if (!$encoding) { print STDERR "Warning: no encoding found in $in_po_file. Assuming ISO-8859-1\n" unless $QUIET_ARG; $encoding = "ISO-8859-1"; } system ("$iconv -f $encoding -t UTF-8 <$devnull 2>$devnull"); if ($?) { $encoding = get_local_charset($encoding); } return $encoding } sub utf8_sanity_check { print STDERR "Warning: option --pass-through has been removed.\n" if $PASS_THROUGH_ARG; $UTF8_ARG = 1; } sub get_translation_database { if ($cache_file) { &get_cached_translation_database; } else { &create_translation_database; } } sub get_newest_po_age { my $newest_age; foreach my $file (values %po_files_by_lang) { my $file_age = -M $file; $newest_age = $file_age if !$newest_age || $file_age < $newest_age; } $newest_age = 0 if !$newest_age; return $newest_age; } sub create_cache { print "Generating and caching the translation database\n" unless $QUIET_ARG; &create_translation_database; open CACHE, ">$cache_file" || die; print CACHE join "\x01", %translations; close CACHE; } sub load_cache { print "Found cached translation database\n" unless $QUIET_ARG; my $contents; open CACHE, "<$cache_file" || die; { local $/; $contents = ; } close CACHE; %translations = split "\x01", $contents; } sub get_cached_translation_database { my $cache_file_age = -M $cache_file; if (defined $cache_file_age) { if ($cache_file_age <= &get_newest_po_age) { &load_cache; return; } print "Found too-old cached translation database\n" unless $QUIET_ARG; } &create_cache; } sub create_translation_database { for my $lang (keys %po_files_by_lang) { my $po_file = $po_files_by_lang{$lang}; if ($UTF8_ARG) { my $encoding = get_po_encoding ($po_file); if (lc $encoding eq "utf-8") { open PO_FILE, "<$po_file"; } else { print STDERR "WARNING: $po_file is not in UTF-8 but $encoding, converting...\n" unless $QUIET_ARG;; open PO_FILE, "$iconv -f $encoding -t UTF-8 $po_file|"; } } else { open PO_FILE, "<$po_file"; } my $nextfuzzy = 0; my $inmsgid = 0; my $inmsgstr = 0; my $msgid = ""; my $msgstr = ""; while () { $nextfuzzy = 1 if /^#, fuzzy/; if (/^msgid "((\\.|[^\\])*)"/ ) { $translations{$lang, $msgid} = $msgstr if $inmsgstr && $msgid && $msgstr; $msgid = ""; $msgstr = ""; if ($nextfuzzy) { $inmsgid = 0; } else { $msgid = unescape_po_string($1); $inmsgid = 1; } $inmsgstr = 0; $nextfuzzy = 0; } if (/^msgstr "((\\.|[^\\])*)"/) { $msgstr = unescape_po_string($1); $inmsgstr = 1; $inmsgid = 0; } if (/^"((\\.|[^\\])*)"/) { $msgid .= unescape_po_string($1) if $inmsgid; $msgstr .= unescape_po_string($1) if $inmsgstr; } } $translations{$lang, $msgid} = $msgstr if $inmsgstr && $msgid && $msgstr; } } sub finalize { } sub unescape_one_sequence { my ($sequence) = @_; return "\\" if $sequence eq "\\\\"; return "\"" if $sequence eq "\\\""; return "\n" if $sequence eq "\\n"; return "\r" if $sequence eq "\\r"; return "\t" if $sequence eq "\\t"; return "\b" if $sequence eq "\\b"; return "\f" if $sequence eq "\\f"; return "\a" if $sequence eq "\\a"; return chr(11) if $sequence eq "\\v"; # vertical tab, see ascii(7) return chr(hex($1)) if ($sequence =~ /\\x([0-9a-fA-F]{2})/); return chr(oct($1)) if ($sequence =~ /\\([0-7]{3})/); # FIXME: Is \0 supported as well? Kenneth and Rodney don't want it, see bug #48489 return $sequence; } sub unescape_po_string { my ($string) = @_; $string =~ s/(\\x[0-9a-fA-F]{2}|\\[0-7]{3}|\\.)/unescape_one_sequence($1)/eg; return $string; } ## NOTE: deal with < - < but not > - > because it seems its ok to have ## > in the entity. For further info please look at #84738. sub entity_decode { local ($_) = @_; s/'/'/g; # ' s/"/"/g; # " s/&/&/g; s/</; close INPUT; } open OUTPUT, ">$OUTFILE" or die "can't open $OUTFILE: $!"; # Binmode so that selftest works ok if using a native Win32 Perl... binmode (OUTPUT) if $^O eq 'MSWin32'; while ($source =~ s|^(.*?)([ \t]*<\s*$w+\s+($w+\s*=\s*"$q"\s*)+/?>)([ \t]*\n)?||s) { print OUTPUT $1; my $node = $2 . "\n"; my @strings = (); $_ = $node; while (s/(\s)_($w+\s*=\s*"($q)")/$1$2/s) { push @strings, entity_decode($3); } print OUTPUT; my %langs; for my $string (@strings) { for my $lang (keys %po_files_by_lang) { $langs{$lang} = 1 if $translations{$lang, $string}; } } for my $lang (sort keys %langs) { $_ = $node; s/(\sname\s*=\s*)"($q)"/$1"$2-$lang"/s; s/(\s)_($w+\s*=\s*")($q)"/$1 . $2 . entity_encoded_translation($lang, $3) . '"'/seg; print OUTPUT; } } print OUTPUT $source; close OUTPUT; } ## XML (non-bonobo-activation) merge code # Process tag attributes # Only parameter is a HASH containing attributes -> values mapping sub getAttributeString { my $sub = shift; my $do_translate = shift || 0; my $language = shift || ""; my $result = ""; my $translate = shift; foreach my $e (reverse(sort(keys %{ $sub }))) { my $key = $e; my $string = $sub->{$e}; my $quote = '"'; $string =~ s/^[\s]+//; $string =~ s/[\s]+$//; if ($string =~ /^'.*'$/) { $quote = "'"; } $string =~ s/^['"]//g; $string =~ s/['"]$//g; if ($do_translate && $key =~ /^_/) { $key =~ s|^_||g; if ($language) { # Handle translation my $decode_string = entity_decode($string); my $translation = $translations{$language, $decode_string}; if ($translation) { $translation = entity_encode($translation); $string = $translation; } $$translate = 2; } else { $$translate = 2 if ($translate && (!$$translate)); # watch not to "overwrite" $translate } } $result .= " $key=$quote$string$quote"; } return $result; } # Returns a translatable string from XML node, it works on contents of every node in XML::Parser tree sub getXMLstring { my $ref = shift; my $spacepreserve = shift || 0; my @list = @{ $ref }; my $result = ""; my $count = scalar(@list); my $attrs = $list[0]; my $index = 1; $spacepreserve = 1 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?preserve["']?$/)); $spacepreserve = 0 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?default["']?$/)); while ($index < $count) { my $type = $list[$index]; my $content = $list[$index+1]; if (! $type ) { # We've got CDATA if ($content) { # lets strip the whitespace here, and *ONLY* here $content =~ s/\s+/ /gs if (!$spacepreserve); $result .= $content; } } elsif ( "$type" ne "1" ) { # We've got another element $result .= "<$type"; $result .= getAttributeString(@{$content}[0], 0); # no nested translatable elements if ($content) { my $subresult = getXMLstring($content, $spacepreserve); if ($subresult) { $result .= ">".$subresult . ""; } else { $result .= "/>"; } } else { $result .= "/>"; } } $index += 2; } return $result; } # Translate list of nodes if necessary sub translate_subnodes { my $fh = shift; my $content = shift; my $language = shift || ""; my $singlelang = shift || 0; my $spacepreserve = shift || 0; my @nodes = @{ $content }; my $count = scalar(@nodes); my $index = 0; while ($index < $count) { my $type = $nodes[$index]; my $rest = $nodes[$index+1]; if ($singlelang) { my $oldMO = $MULTIPLE_OUTPUT; $MULTIPLE_OUTPUT = 1; traverse($fh, $type, $rest, $language, $spacepreserve); $MULTIPLE_OUTPUT = $oldMO; } else { traverse($fh, $type, $rest, $language, $spacepreserve); } $index += 2; } } sub isWellFormedXmlFragment { my $ret = eval 'require XML::Parser'; if(!$ret) { die "You must have XML::Parser installed to run $0\n\n"; } my $fragment = shift; return 0 if (!$fragment); $fragment = "$fragment"; my $xp = new XML::Parser(Style => 'Tree'); my $tree = 0; eval { $tree = $xp->parse($fragment); }; return $tree; } sub traverse { my $fh = shift; my $nodename = shift; my $content = shift; my $language = shift || ""; my $spacepreserve = shift || 0; if (!$nodename) { if ($content =~ /^[\s]*$/) { $leading_space .= $content; } print $fh $content; } else { # element my @all = @{ $content }; my $attrs = shift @all; my $translate = 0; my $outattr = getAttributeString($attrs, 1, $language, \$translate); if ($nodename =~ /^_/) { $translate = 1; $nodename =~ s/^_//; } my $lookup = ''; $spacepreserve = 0 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?default["']?$/)); $spacepreserve = 1 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?preserve["']?$/)); print $fh "<$nodename", $outattr; if ($translate) { $lookup = getXMLstring($content, $spacepreserve); if (!$spacepreserve) { $lookup =~ s/^\s+//s; $lookup =~ s/\s+$//s; } if ($lookup || $translate == 2) { my $translation = $translations{$language, $lookup} if isWellFormedXmlFragment($translations{$language, $lookup}); if ($MULTIPLE_OUTPUT && ($translation || $translate == 2)) { $translation = $lookup if (!$translation); print $fh " xml:lang=\"", $language, "\"" if $language; print $fh ">"; if ($translate == 2) { translate_subnodes($fh, \@all, $language, 1, $spacepreserve); } else { print $fh $translation; } print $fh ""; return; # this means there will be no same translation with xml:lang="$language"... # if we want them both, just remove this "return" } else { print $fh ">"; if ($translate == 2) { translate_subnodes($fh, \@all, $language, 1, $spacepreserve); } else { print $fh $lookup; } print $fh ""; } } else { print $fh "/>"; } for my $lang (sort keys %po_files_by_lang) { if ($MULTIPLE_OUTPUT && $lang ne "$language") { next; } if ($lang) { # Handle translation # my $translate = 0; my $localattrs = getAttributeString($attrs, 1, $lang, \$translate); my $translation = $translations{$lang, $lookup} if isWellFormedXmlFragment($translations{$lang, $lookup}); if ($translate && !$translation) { $translation = $lookup; } if ($translation || $translate) { print $fh "\n"; $leading_space =~ s/.*\n//g; print $fh $leading_space; print $fh "<", $nodename, " xml:lang=\"", $lang, "\"", $localattrs, ">"; if ($translate == 2) { translate_subnodes($fh, \@all, $lang, 1, $spacepreserve); } else { print $fh $translation; } print $fh ""; } } } } else { my $count = scalar(@all); if ($count > 0) { print $fh ">"; my $index = 0; while ($index < $count) { my $type = $all[$index]; my $rest = $all[$index+1]; traverse($fh, $type, $rest, $language, $spacepreserve); $index += 2; } print $fh ""; } else { print $fh "/>"; } } } } sub intltool_tree_comment { my $expat = shift; my $data = shift; my $clist = $expat->{Curlist}; my $pos = $#$clist; push @$clist, 1 => $data; } sub intltool_tree_cdatastart { my $expat = shift; my $clist = $expat->{Curlist}; my $pos = $#$clist; push @$clist, 0 => $expat->original_string(); } sub intltool_tree_cdataend { my $expat = shift; my $clist = $expat->{Curlist}; my $pos = $#$clist; $clist->[$pos] .= $expat->original_string(); } sub intltool_tree_char { my $expat = shift; my $text = shift; my $clist = $expat->{Curlist}; my $pos = $#$clist; # Use original_string so that we retain escaped entities # in CDATA sections. # if ($pos > 0 and $clist->[$pos - 1] eq '0') { $clist->[$pos] .= $expat->original_string(); } else { push @$clist, 0 => $expat->original_string(); } } sub intltool_tree_start { my $expat = shift; my $tag = shift; my @origlist = (); # Use original_string so that we retain escaped entities # in attribute values. We must convert the string to an # @origlist array to conform to the structure of the Tree # Style. # my @original_array = split /\x/, $expat->original_string(); my $source = $expat->original_string(); # Remove leading tag. # $source =~ s|^\s*<\s*(\S+)||s; # Grab attribute key/value pairs and push onto @origlist array. # while ($source) { if ($source =~ /^\s*([\w:-]+)\s*[=]\s*["]/) { $source =~ s|^\s*([\w:-]+)\s*[=]\s*["]([^"]*)["]||s; push @origlist, $1; push @origlist, '"' . $2 . '"'; } elsif ($source =~ /^\s*([\w:-]+)\s*[=]\s*[']/) { $source =~ s|^\s*([\w:-]+)\s*[=]\s*[']([^']*)[']||s; push @origlist, $1; push @origlist, "'" . $2 . "'"; } else { last; } } my $ol = [ { @origlist } ]; push @{ $expat->{Lists} }, $expat->{Curlist}; push @{ $expat->{Curlist} }, $tag => $ol; $expat->{Curlist} = $ol; } sub readXml { my $filename = shift || return; if(!-f $filename) { die "ERROR Cannot find filename: $filename\n"; } my $ret = eval 'require XML::Parser'; if(!$ret) { die "You must have XML::Parser installed to run $0\n\n"; } my $xp = new XML::Parser(Style => 'Tree'); $xp->setHandlers(Char => \&intltool_tree_char); $xp->setHandlers(Start => \&intltool_tree_start); $xp->setHandlers(CdataStart => \&intltool_tree_cdatastart); $xp->setHandlers(CdataEnd => \&intltool_tree_cdataend); my $tree = $xp->parsefile($filename); # Hello thereHowdydo # would be: # [foo, [{}, head, [{id => "a"}, 0, "Hello ", em, [{}, 0, "there"]], bar, [{}, # 0, "Howdy", ref, [{}]], 0, "do" ] ] return $tree; } sub print_header { my $infile = shift; my $fh = shift; my $source; if(!-f $infile) { die "ERROR Cannot find filename: $infile\n"; } print $fh qq{\n}; { local $/; open DOCINPUT, "<${FILE}" or die; $source = ; close DOCINPUT; } if ($source =~ /()/s) { print $fh "$1\n"; } elsif ($source =~ /(]*>)/s) { print $fh "$1\n"; } } sub parseTree { my $fh = shift; my $ref = shift; my $language = shift || ""; my $name = shift @{ $ref }; my $cont = shift @{ $ref }; while (!$name || "$name" eq "1") { $name = shift @{ $ref }; $cont = shift @{ $ref }; } my $spacepreserve = 0; my $attrs = @{$cont}[0]; $spacepreserve = 1 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?preserve["']?$/)); traverse($fh, $name, $cont, $language, $spacepreserve); } sub xml_merge_output { my $source; if ($MULTIPLE_OUTPUT) { for my $lang (sort keys %po_files_by_lang) { if ( ! -e $lang ) { mkdir $lang or die "Cannot create subdirectory $lang: $!\n"; } open OUTPUT, ">$lang/$OUTFILE" or die "Cannot open $lang/$OUTFILE: $!\n"; binmode (OUTPUT) if $^O eq 'MSWin32'; my $tree = readXml($FILE); print_header($FILE, \*OUTPUT); parseTree(\*OUTPUT, $tree, $lang); close OUTPUT; print "CREATED $lang/$OUTFILE\n" unless $QUIET_ARG; } } open OUTPUT, ">$OUTFILE" or die "Cannot open $OUTFILE: $!\n"; binmode (OUTPUT) if $^O eq 'MSWin32'; my $tree = readXml($FILE); print_header($FILE, \*OUTPUT); parseTree(\*OUTPUT, $tree); close OUTPUT; print "CREATED $OUTFILE\n" unless $QUIET_ARG; } sub keys_merge_translations { open INPUT, "<${FILE}" or die; open OUTPUT, ">${OUTFILE}" or die; binmode (OUTPUT) if $^O eq 'MSWin32'; while () { if (s/^(\s*)_(\w+=(.*))/$1$2/) { my $string = $3; print OUTPUT; my $non_translated_line = $_; for my $lang (sort keys %po_files_by_lang) { my $translation = $translations{$lang, $string}; next if !$translation; $_ = $non_translated_line; s/(\w+)=.*/[$lang]$1=$translation/; print OUTPUT; } } else { print OUTPUT; } } close OUTPUT; close INPUT; } sub desktop_merge_translations { open INPUT, "<${FILE}" or die; open OUTPUT, ">${OUTFILE}" or die; binmode (OUTPUT) if $^O eq 'MSWin32'; while () { if (s/^(\s*)_(\w+=(.*))/$1$2/) { my $string = $3; print OUTPUT; my $non_translated_line = $_; for my $lang (sort keys %po_files_by_lang) { my $translation = $translations{$lang, $string}; next if !$translation; $_ = $non_translated_line; s/(\w+)=.*/${1}[$lang]=$translation/; print OUTPUT; } } else { print OUTPUT; } } close OUTPUT; close INPUT; } sub schemas_merge_translations { my $source; { local $/; # slurp mode open INPUT, "<$FILE" or die "can't open $FILE: $!"; $source = ; close INPUT; } open OUTPUT, ">$OUTFILE" or die; binmode (OUTPUT) if $^O eq 'MSWin32'; # FIXME: support attribute translations # Empty nodes never need translation, so unmark all of them. # For example, <_foo/> is just replaced by . $source =~ s|<\s*_($w+)\s*/>|<$1/>|g; while ($source =~ s/ (.*?) (\s+)((\s*) (\s*(?:\s*)?(.*?)\s*<\/default>)?(\s*) (\s*(?:\s*)?(.*?)\s*<\/short>)?(\s*) (\s*(?:\s*)?(.*?)\s*<\/long>)?(\s*) <\/locale>) //sx) { print OUTPUT $1; my $locale_start_spaces = $2 ? $2 : ''; my $default_spaces = $4 ? $4 : ''; my $short_spaces = $7 ? $7 : ''; my $long_spaces = $10 ? $10 : ''; my $locale_end_spaces = $13 ? $13 : ''; my $c_default_block = $3 ? $3 : ''; my $default_string = $6 ? $6 : ''; my $short_string = $9 ? $9 : ''; my $long_string = $12 ? $12 : ''; print OUTPUT "$locale_start_spaces$c_default_block"; $default_string =~ s/\s+/ /g; $default_string = entity_decode($default_string); $short_string =~ s/\s+/ /g; $short_string = entity_decode($short_string); $long_string =~ s/\s+/ /g; $long_string = entity_decode($long_string); for my $lang (sort keys %po_files_by_lang) { my $default_translation = $translations{$lang, $default_string}; my $short_translation = $translations{$lang, $short_string}; my $long_translation = $translations{$lang, $long_string}; next if (!$default_translation && !$short_translation && !$long_translation); print OUTPUT "\n$locale_start_spaces"; print OUTPUT "$default_spaces"; if ($default_translation) { $default_translation = entity_encode($default_translation); print OUTPUT "$default_translation"; } print OUTPUT "$short_spaces"; if ($short_translation) { $short_translation = entity_encode($short_translation); print OUTPUT "$short_translation"; } print OUTPUT "$long_spaces"; if ($long_translation) { $long_translation = entity_encode($long_translation); print OUTPUT "$long_translation"; } print OUTPUT "$locale_end_spaces"; } } print OUTPUT $source; close OUTPUT; } sub rfc822deb_merge_translations { my %encodings = (); for my $lang (keys %po_files_by_lang) { $encodings{$lang} = ($UTF8_ARG ? 'UTF-8' : get_po_encoding($po_files_by_lang{$lang})); } my $source; $Text::Wrap::huge = 'overflow'; $Text::Wrap::break = qr/\n|\s(?=\S)/; { local $/; # slurp mode open INPUT, "<$FILE" or die "can't open $FILE: $!"; $source = ; close INPUT; } open OUTPUT, ">${OUTFILE}" or die; binmode (OUTPUT) if $^O eq 'MSWin32'; while ($source =~ /(^|\n+)(_*)([^:\s]+)(:[ \t]*)(.*?)(?=\n[\S\n]|$)/sg) { my $sep = $1; my $non_translated_line = $3.$4; my $string = $5; my $underscore = length($2); next if $underscore eq 0 && $non_translated_line =~ /^#/; # Remove [] dummy strings my $stripped = $string; $stripped =~ s/\[\s[^\[\]]*\],/,/g if $underscore eq 2; $stripped =~ s/\[\s[^\[\]]*\]$//; $non_translated_line .= $stripped; print OUTPUT $sep.$non_translated_line; if ($underscore) { my @str_list = rfc822deb_split($underscore, $string); for my $lang (sort keys %po_files_by_lang) { my $is_translated = 1; my $str_translated = ''; my $first = 1; for my $str (@str_list) { my $translation = $translations{$lang, $str}; if (!$translation) { $is_translated = 0; last; } # $translation may also contain [] dummy # strings, mostly to indicate an empty string $translation =~ s/\[\s[^\[\]]*\]$//; if ($first) { if ($underscore eq 2) { $str_translated .= $translation; } else { $str_translated .= Text::Tabs::expand($translation) . "\n"; } } else { if ($underscore eq 2) { $str_translated .= ', ' . $translation; } else { $str_translated .= Text::Tabs::expand( Text::Wrap::wrap(' ', ' ', $translation)) . "\n .\n"; } } $first = 0; # To fix some problems with Text::Wrap::wrap $str_translated =~ s/(\n )+\n/\n .\n/g; } next unless $is_translated; $str_translated =~ s/\n \.\n$//; $str_translated =~ s/\s+$//; $_ = $non_translated_line; s/^(\w+):\s*.*/$sep${1}-$lang.$encodings{$lang}: $str_translated/s; print OUTPUT; } } } print OUTPUT "\n"; close OUTPUT; close INPUT; } sub rfc822deb_split { # Debian defines a special way to deal with rfc822-style files: # when a value contain newlines, it consists of # 1. a short form (first line) # 2. a long description, all lines begin with a space, # and paragraphs are separated by a single dot on a line # This routine returns an array of all paragraphs, and reformat # them. # When first argument is 2, the string is a comma separated list of # values. my $type = shift; my $text = shift; $text =~ s/^[ \t]//mg; return (split(/, */, $text, 0)) if $type ne 1; return ($text) if $text !~ /\n/; $text =~ s/([^\n]*)\n//; my @list = ($1); my $str = ''; for my $line (split (/\n/, $text)) { chomp $line; if ($line =~ /^\.\s*$/) { # New paragraph $str =~ s/\s*$//; push(@list, $str); $str = ''; } elsif ($line =~ /^\s/) { # Line which must not be reformatted $str .= "\n" if length ($str) && $str !~ /\n$/; $line =~ s/\s+$//; $str .= $line."\n"; } else { # Continuation line, remove newline $str .= " " if length ($str) && $str !~ /\n$/; $str .= $line; } } $str =~ s/\s*$//; push(@list, $str) if length ($str); return @list; } xqf-1.0.5/xqf.desktop.in0000644002404400000620000000041210517364761012035 00000000000000[Desktop Entry] Encoding=UTF-8 _Name=XQF Game Server Browser _GenericName=Game Server Browser _Comment=Locate and connect to game servers Exec=xqf Icon=xqf_32x32.png StartupNotify=true Terminal=false Type=Application Categories=GTK;Game;ActionGame;X-SuSE-Core-Game; xqf-1.0.5/pixmaps/0000777002404400000620000000000010523106504010771 500000000000000xqf-1.0.5/pixmaps/trayicon/0000777002404400000620000000000010523106505012622 500000000000000xqf-1.0.5/pixmaps/trayicon/frame_basic.png0000644002404400000620000000404410110214761015475 00000000000000PNG  IHDRĴl;bKGD pHYs  ~tIME$ln;.IDATxYLLIH.첲``""i**n+* Jmm)99LKb33  65#$pp+??>=,06>>>=<&Xhh::@?,>>%448BA,NTT}}lZZbb$UTNNA@n Q  ,O __::Dd///?ʹCCC@i#j))O H"99p *#[bִB H/&ҰHHH L1B/  ---Q  @444A233!!!```!!!Dttt&))):///^U %&|ǩV(((72NNN oyۑ>> 11  S Z򹹹p D 齽󾾾>&&0Z rn6uS''i)(Cee{{nm_TTnm*hh)) EELL9??32 `ba) fDD!%%`43iiZY:! i  43GGMX .괴5T}hIENDB`xqf-1.0.5/pixmaps/trayicon/Makefile.am0000644002404400000620000000016410065102306014567 00000000000000EXTRA_DIST = $(tray_DATA) traydir = $(pkgdatadir)/default/trayicon tray_DATA = $(wildcard *.png) $(wildcard *.ani) xqf-1.0.5/pixmaps/trayicon/Makefile.in0000644002404400000620000002614310523105434014611 00000000000000# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = pixmaps/trayicon DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/src/gnuconfig.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(traydir)" trayDATA_INSTALL = $(INSTALL_DATA) DATA = $(tray_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_XQFRCON_FALSE = @BUILD_XQFRCON_FALSE@ BUILD_XQFRCON_TRUE = @BUILD_XQFRCON_TRUE@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COMPRESSION = @COMPRESSION@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEBUG = @DEBUG@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DUMMY_LIBGDKPIXBUF_FALSE = @DUMMY_LIBGDKPIXBUF_FALSE@ DUMMY_LIBGDKPIXBUF_ORIG = @DUMMY_LIBGDKPIXBUF_ORIG@ DUMMY_LIBGDKPIXBUF_SONAME = @DUMMY_LIBGDKPIXBUF_SONAME@ DUMMY_LIBGDKPIXBUF_TRUE = @DUMMY_LIBGDKPIXBUF_TRUE@ DUMMY_LIBGEOIP_FALSE = @DUMMY_LIBGEOIP_FALSE@ DUMMY_LIBGEOIP_ORIG = @DUMMY_LIBGEOIP_ORIG@ DUMMY_LIBGEOIP_SONAME = @DUMMY_LIBGEOIP_SONAME@ DUMMY_LIBGEOIP_TRUE = @DUMMY_LIBGEOIP_TRUE@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GDK_PIXBUF_CFLAGS = @GDK_PIXBUF_CFLAGS@ GDK_PIXBUF_CONFIG = @GDK_PIXBUF_CONFIG@ GDK_PIXBUF_LIBS = @GDK_PIXBUF_LIBS@ GEOIP_LIB = @GEOIP_LIB@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_CONFIG = @GLIB_CONFIG@ GLIB_LIBS = @GLIB_LIBS@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_CONFIG = @GTK_CONFIG@ GTK_LIBS = @GTK_LIBS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@ INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@ INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_ICONV = @INTLTOOL_ICONV@ INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@ INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_MSGFMT = @INTLTOOL_MSGFMT@ INTLTOOL_MSGMERGE = @INTLTOOL_MSGMERGE@ INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@ INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@ INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@ INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@ INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@ INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@ INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@ INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@ INTLTOOL_XGETTEXT = @INTLTOOL_XGETTEXT@ INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@ INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MSGFMT = @MSGFMT@ OBJEXT = @OBJEXT@ OLD_GTK_SUPPORT = @OLD_GTK_SUPPORT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_CFLAGS = @PACKAGE_CFLAGS@ PACKAGE_LIBS = @PACKAGE_LIBS@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ QSTATEXEC = @QSTATEXEC@ RANLIB = @RANLIB@ RELEASE = @RELEASE@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ XQFRCON_LIBS = @XQFRCON_LIBS@ ac_ct_CC = @ac_ct_CC@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ datadir = @datadir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ EXTRA_DIST = $(tray_DATA) traydir = $(pkgdatadir)/default/trayicon tray_DATA = $(wildcard *.png) $(wildcard *.ani) all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu pixmaps/trayicon/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu pixmaps/trayicon/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh uninstall-info-am: install-trayDATA: $(tray_DATA) @$(NORMAL_INSTALL) test -z "$(traydir)" || $(mkdir_p) "$(DESTDIR)$(traydir)" @list='$(tray_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(trayDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(traydir)/$$f'"; \ $(trayDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(traydir)/$$f"; \ done uninstall-trayDATA: @$(NORMAL_UNINSTALL) @list='$(tray_DATA)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(traydir)/$$f'"; \ rm -f "$(DESTDIR)$(traydir)/$$f"; \ done tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(DATA) installdirs: for dir in "$(DESTDIR)$(traydir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-trayDATA install-exec-am: install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-info-am uninstall-trayDATA .PHONY: all all-am check check-am clean clean-generic distclean \ distclean-generic distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-exec \ install-exec-am install-info install-info-am install-man \ install-strip install-trayDATA installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic pdf pdf-am ps ps-am uninstall \ uninstall-am uninstall-info-am uninstall-trayDATA # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xqf-1.0.5/pixmaps/trayicon/red_frame_4_4.png0000644002404400000620000000404410110214761015634 00000000000000PNG  IHDRĴl;bKGD pHYs  ~tIMEIDATxYKK!XF3 䲲wLy0e.  :0wS8GJO%   L2yU:S/%!! %2R2'%$UZzSP18>> &.+%1SE^KI$M[Ue\2C C^KQ%,NwIIN<6'J%$]= D$Bd///?ʹCCC@^Z ]H"p *#[ 8f¿41H. #ҰHHH L1 1.' ---Q A444A233!!!```!!!Ϲ0O3 ttt&))):///^U )2V(((72NNN oyۑU)4 $"Z Z򹹹p D 齽󾾾J2(6) x2Ғ Բ'oߺ>>L?5Ev$h q|uS,s#3"yP/ѡ3uTTvS:6?zS59.ؔ:zQJ EEvXK*-yU:gU7AQW1 PFl -ҸgXW K8&'  !.( GG'TW++嵵TIENDB`xqf-1.0.5/pixmaps/trayicon/busy.ani0000644002404400000620000000012610065102306014204 00000000000000around_frame_1.png 8 around_frame_2.png 8 around_frame_3.png 8 around_frame_4.png 8 xqf-1.0.5/pixmaps/trayicon/around_frame_1.png0000644002404400000620000000404410110214761016124 00000000000000PNG  IHDRĴl;bKGD pHYs  ~tIME848IDATxYKK!XF3 䲲wLy0e.  :0wS8GJO%  !%65#$yU:S/%!! %278>=<&XzSP18>> '448BA,N^KI$M[Ubb$UT^,$?1| Q  ,$]= D$Bd///?ʹCCC@i#j))OH"p *#[bִB H. #ҰHHH L1B/' ---Q  E444A233!!!```!!!Dttt&))):///^U %&|ǩV(((72NNN oyۑ>> 11  S Z򹹹p D 齽󾾾>&&0Z rn6uS''i)(Cee{{nm_TTnm*hh)) EELL9??32 `ba) fDD!%%`43iiZY:! i  43GGMX .괴\ހnIENDB`xqf-1.0.5/pixmaps/trayicon/around_frame_2.png0000644002404400000620000000404410110214761016125 00000000000000PNG  IHDRĴl;bKGD pHYs  ~tIMEIDATxYLLIH.첲``""i**n+* Jmm)99LKb33  ;+)pp+??>=,06쾾D?C($(Mhh::@?,>>%$'2].TT}}lZZbb$S gOONNA@n%/R  O __::Dd///?ʹCCC@EJ"(q H"99p *#[> 11  S Z򹹹p D 齽󾾾>&&0Z rn6uS''i)(Cee{{nm_TTnm*hh)) EELL9??32 `ba) fDD!%%`43iiZY:! i  43GGMX .괴XIENDB`xqf-1.0.5/pixmaps/trayicon/around_frame_3.png0000644002404400000620000000404410110214761016126 00000000000000PNG  IHDRĴl;bKGD pHYs  ~tIME) IDATxYLLIH.첲``""i**n+* Jmm)99LKb33  65#$pp+??>=,06>>>=<&Xhh::@?,>>%448BA,NTT}}lZZbb$UTNNA@n Q  ,O __::Dd///?ʹCCC@i#j))O H"99p *#[bִB H/&ҰHHH L1B/  ---Q  @444A233!!!```!!!Dttt&))):///^U )%&|ǩV(((72NNN oyۑU)4  S Z򹹹p D 齽󾾾J2(11 rҦ Բ'oߺ>>L?5Ev$h rn6uS,s#3"ee{{nm_TTvS:6?zS)) EET6JX+#aba) fW1 PFl -ҸgZY:7&'  !.( GG'TW++嵵`Ҏ{oIENDB`xqf-1.0.5/pixmaps/trayicon/around_frame_4.png0000644002404400000620000000404410110214761016127 00000000000000PNG  IHDRĴl;bKGD pHYs  ~tIME8pIDATxYLLIH.첲``""i**n+* Jmm)99LKb33  65#$pp+??>=,06>>>=<&Xhh::@?,>>%448BA,NTT}}lZZbb$UTNNA@n Q  ,O __::Dd///?ʹCCC@i#j))O H"99p *#[bִB H/&ҰHHH L1B/  ---Q  @444A233!!!```!!!D ttt&))):///^U 2V(((72NNN oyۑ>> 11 $"Z Z򹹹p D 齽󾾾>EE066q**$p q|uS''i)(CyP/ѡ3uTTnm*hh6 -EELL9??32 `gU7AQDD!%%`43iiXW K"!i  43GGMX .괴hJ/o `IENDB`xqf-1.0.5/pixmaps/trayicon/ready.ani0000644002404400000620000000031010150213166014323 00000000000000red_frame_4_4.png 50 frame_basic.png 50 red_frame_4_4.png 50 frame_basic.png 50 red_frame_4_4.png 50 frame_basic.png 50 red_frame_4_4.png 50 frame_basic.png 50 red_frame_4_4.png 50 frame_basic.png 50 xqf-1.0.5/pixmaps/flags/0000777002404400000620000000000010523106504012065 500000000000000xqf-1.0.5/pixmaps/flags/ae.png0000644002404400000620000000027007746545516013122 00000000000000PNG  IHDRh]gAMA a PLTEmKgbKGDH pHYs  ~tIME7%2{"IDATxcZjU^ʁBR?)[mIENDB`xqf-1.0.5/pixmaps/flags/ag.png0000644002404400000620000000157107746545516013131 00000000000000PNG  IHDR XPLTE   ?,&8.:1?717On~a8MDSBk]lZo2bgijmqruuvvwtVXOMOMBL? ? >!? > !A"s@OGb''- '++*-#+*(**)))*)*,,-10/# $ $ '')(**)*++0%I:iWymxo ˴!!!!"|bKGDHIDATxcPf`b``eggd2XĔd$X$l8Uj<Dx+[[T |Eek* B"]t t #B١&ZZZjIQ ,OS+3 sKhPt\J ڒcB}=1 !{ ]%޹@f6_OBg[9o0*CtEXtSoftware@(#)ImageMagick 4.2.7 99/07/01 cristy@mystic.es.dupont.comk*tEXtSignaturea8a6447f73b34ce245d16113d6172bff tEXtDelay100\IENDB`xqf-1.0.5/pixmaps/flags/ba.png0000644002404400000620000000115607746545516013123 00000000000000PNG  IHDROdgAMA7tEXtSoftwareAdobe ImageReadyqe<IDATxbvʰX8ߏ, XN};ׇdU 9㬵ܜẓD}edɆ1303?Œ\,wܸxErgj槯  &GN>1<~=ge @1Af_kks~ |􎟁<| )2I,\s9># *b}cc<|)o:΋xZ+ =xXx73{T a72 =x/?Ɉͣ`]X=@L`p~g?Liq8,P@1 ftV<'' @L`7@l/|۾Wԕgz}Y^pqbz XX_VaD8 \WMS3Fb/R0.(Ͽ M3'6'J?`gf0sNc}Y}^f!\O?JI"5YIENDB`xqf-1.0.5/pixmaps/flags/be.png0000644002404400000620000000031607746545516013124 00000000000000PNG  IHDRh]gAMA a PLTE18tEXtSoftwareXV Version 3.10a Rev: 12/29/94 (PNG patch 1.2).IIDATxc`j-Pp#㞪ytIME 8iIENDB`xqf-1.0.5/pixmaps/flags/bg.png0000644002404400000620000000031307746545516013123 00000000000000PNG  IHDRh]gAMA a PLTE 8tEXtSoftwareXV Version 3.10a Rev: 12/29/94 (PNG patch 1.2).IIDATxc`V@1T(8` Y_tIME +/hL;IENDB`xqf-1.0.5/pixmaps/flags/ar.png0000644002404400000620000000101707746545516013137 00000000000000PNG  IHDR lIPLTErS7<=9899::8[Z]_^iDFBCEFDHACdedddeedefgfihnpm#NrƴƷbKGD>Id{IDATxc BRP c3p3sB  $jr<YC zfv@`eg`dga &v6P2 `. a*00qA##+'!*DCtEXtSoftware@(#)ImageMagick 4.2.7 99/07/01 cristy@mystic.es.dupont.comk*tEXtSignatureca21c805fa15b0f09c718cfda5f16b62įIENDB`xqf-1.0.5/pixmaps/flags/bh.png0000644002404400000620000000032607746545516013130 00000000000000PNG  IHDR2(JgAMA a0PLTEXFbKGDH pHYs  d_tIME*E 6IDATxc3`Kj`nqq_wIENDB`xqf-1.0.5/pixmaps/flags/at.png0000644002404400000620000000067307746545516013150 00000000000000PNG  IHDRا~PLTE &DbKGDaf}QIDATxu0Q ?o@ Ӳ́$@D " RҢ2bbr)4vCtEXtSoftware@(#)ImageMagick 4.2.9 99/09/01 cristy@mystic.es.dupont.com*tEXtSignature72eaf31ab9d2878a05c9c6c9ddfa3b14F tEXtDelay100\IENDB`xqf-1.0.5/pixmaps/flags/au.png0000644002404400000620000000040107746545516013136 00000000000000PNG  IHDR2(J'PLTE 8 X ` X0h X舐 0 XPHp IDATx1 @D9fF?,aMۀ}V9Ux/⫆d>s)q;}?#8YxOCez u褠C:KM(CmaV8Ij8kmN Lp?R- U IENDB`xqf-1.0.5/pixmaps/flags/ca.png0000644002404400000620000000046607746545516013127 00000000000000PNG  IHDROdgAMA1_IDATxڕ=AF_D. ahEL BxAH&",;=L8|4M, P ϳs$_ dgؓ՞d+r&#@MF,N ;}9ltU՟iК Pwњv&(()+,,.10102233 8 8 : < 1"xCd6|3BOze{e|e}g' Q~\wlK(!#02  WgNM L JM N N S U p hhgheee  , %bKGDq\IDATxcp30 E= M1kjki@: V `iogcnkf[3xEeABNjXdF0xE%)1H'WDj|||\N"Yal<0xeggg&;HIdfOP ;;8 +r1B(s @0'`";z91CtEXtSoftware@(#)ImageMagick 4.2.7 99/07/01 cristy@mystic.es.dupont.comk*tEXtSignature40b4542e05aab2043392b1b8444fe78arIENDB`xqf-1.0.5/pixmaps/flags/az.png0000644002404400000620000000022407746545516013146 00000000000000PNG  IHDROd pHYs  ~FIDATxc`0CiJB9xe[j}O= d`58af<7BכǪIENDB`xqf-1.0.5/pixmaps/flags/br.png0000644002404400000620000000057407746545516013147 00000000000000PNG  IHDR8ctRNS7X}bKGDClIDATxڥQTLf] 2/<~șy[׬P7R(6́k=o?iuM"UP+ Ŀ@92\ 1EzTXtSoftwarexsPMLOMLLV033Q7070TH.,.t(-H,L/J|jx3zTXtSignaturex362546I47O5I0O4NLH243247jzTXtPagex320466 #5IENDB`xqf-1.0.5/pixmaps/flags/ch.png0000644002404400000620000000054007746545516013127 00000000000000PNG  IHDROdtRNSnbKGDC%IDATxc@6GCE?1`0~"8fMbEzTXtSoftwarexsPMLOMLLV033Q7070TH.,.t(-H,L/J|jx3zTXtSignaturexKL04MJM1L3OML3762N010O1HM33 MzTXtPagex320466 #5zTXtCommentxMLIU(,Pp $ JXIENDB`xqf-1.0.5/pixmaps/flags/cl.png0000644002404400000620000000116207746545516013134 00000000000000PNG  IHDRاPLTEi%Rn1[s-Vs.Vt,Uu/WJP}WOtYNsZNr[Nr]Np%)**+0357899 6 9 : :<= <><><,:>:<=BAB:R9Q8R9R;S&Q&RKn}~}yӾ,([m''&%!!#%%   ۾펇ȚbKGDYIDATxcЗ7 D}q!y>4Q]Ya-C14Q)mcs4-xPEu$$4yM"C#AOUME]C22 Y-# 3+up`0pzy{y"{;g puG .('``rt2LCGACtEXtSoftware@(#)ImageMagick 4.2.7 99/07/01 cristy@mystic.es.dupont.comk*tEXtSignaturec409723b9d745cb97df7c54029b4a770 VyIENDB`xqf-1.0.5/pixmaps/flags/cn.png0000644002404400000620000000054507746545516013142 00000000000000PNG  IHDR8ctRNSxbKGDTUIDATxQ9 _`J8:HBCG""Ξ F2 c;u)h%k 9  ?hBY(EzTXtSoftwarexsPMLOMLLV033Q7070TH.,.t(-H,L/J|jx3zTXtSignaturex3I6MLMNK0445K40H6537N161J53MV zTXtPagex320466 #5IENDB`xqf-1.0.5/pixmaps/flags/cr.png0000644002404400000620000000022407746545516013140 00000000000000PNG  IHDR F%`[IDATxՓK 0 'i$x?wj[EEg $¸;|IY] Dz/9bؾMH%37.^9IENDB`xqf-1.0.5/pixmaps/flags/dj.png0000644002404400000620000000037407746545516013137 00000000000000PNG  IHDR2(JgAMA a0PLTEs(bKGDH pHYs  ~tIME9'ZBIDATxEʱ @GXlYӳD z %}]Gg[UӪ6WkLTAIENDB`xqf-1.0.5/pixmaps/flags/cu.png0000644002404400000620000000042407746545516013145 00000000000000PNG  IHDR }IDATx1NQyFwl#&&&a;9 PYcahDN@cbcaeӷCE"kKb2N.nymt~{ă:|mx}>>OgʁtT?kKŃ,8XPky^vjkh69\r@jRѳsIMZ0Me: ‘TwN>:IENDB`xqf-1.0.5/pixmaps/flags/dk.png0000644002404400000620000000054107746545516013134 00000000000000PNG  IHDR8ctRNSxbKGDTQIDATxP _JJe= ( ,@D xn?&a(Zl-iڑSc~ɡґFEzTXtSoftwarexsPMLOMLLV033Q7070TH.,.t(-H,L/J|jx3zTXtSignaturexK6LML34K1304LK0HILN44K6O566zTXtPagex320466 #5IENDB`xqf-1.0.5/pixmaps/flags/ec.png0000644002404400000620000000122207746545516013122 00000000000000PNG  IHDR lI PLTEbKGD_sQ-IDATxc0q/o(`bz:;BE]}Rh_,\TUJX d32+p3N1̺r`HSW22)0`Hooklh-LniljjBЈ(i٬hz:?/0yyOB# *>AS t@JCF^ HkM 3RjCtEXtSoftware@(#)ImageMagick 4.2.7 99/07/01 cristy@mystic.es.dupont.comk*tEXtSignaturea65f23adb24356e47c1947cb77a2f6d7~IENDB`xqf-1.0.5/pixmaps/flags/cz.png0000644002404400000620000000060207746545516013150 00000000000000PNG  IHDR8ctRNSxbKGDTrIDATxڥQ ;XdhEYc"-4h "f+5R@gg$ z,+4!'8a$ѻ%rb.[K6Wm_,Z3EzTXtSoftwarexsPMLOMLLV033Q7070TH.,.t(-H,L/J|jx3zTXtSignaturexڳ451J27M614H134LM2L560LN1KNLI2$zTXtPagex320466 #5IENDB`xqf-1.0.5/pixmaps/flags/ee.png0000644002404400000620000000057507746545516013136 00000000000000PNG  IHDRWbKGDAT8IDATxՒ ŠqH6$?; #=4󩳚oy!aEzTXtSoftwarexsPMLOMLLV033Q7070TH.,.t(-H,L/J|jx3zTXtSignaturex3OKJMJ6O1HJJ43L2I43HII60HLJ p.zTXtDelayx34bVzTXtPagex320466 #5zTXtCommentxs-.LSHIL#J3uʨIENDB`xqf-1.0.5/pixmaps/flags/eg.png0000644002404400000620000000050607746545516013132 00000000000000PNG  IHDROdgAMA abKGD pHYs.#.#x?vtIME ${IDATx1n1E؃wQ&]+pgn>-"@$)HAao$˅۞gd~xVd4 L$o u)١30tVA V8o͚Zka>8}R,)N O/V4Mn֪!5w s38dW< ԠxnI0IENDB`xqf-1.0.5/pixmaps/flags/dz.png0000644002404400000620000000027307746545516013155 00000000000000PNG  IHDRh]gAMA a PLTE:3bKGDH pHYs  ~tIME:#(IDATxcXjSS+P 'IENDB`xqf-1.0.5/pixmaps/flags/es.png0000644002404400000620000000053407746545516013147 00000000000000PNG  IHDR8ctRNSxbKGDTLIDATxcA CTP B (.L>z;;+IsP*M(@) g]ƕEzTXtSoftwarexsPMLOMLLV033Q7070TH.,.t(-H,L/J|jx3zTXtSignaturex3O36741174L24614N4H500HMI3777K~8zTXtPagex320466 #5IENDB`xqf-1.0.5/pixmaps/flags/fi.png0000644002404400000620000000056007746545516013135 00000000000000PNG  IHDR8ctRNSxbKGDT`IDATxQ !>͟+DC5NDz!"`YB~{90&X ZU9CͰsaTDf5r)Zx!UfEzTXtSoftwarexsPMLOMLLV033Q7070TH.,.t(-H,L/J|jx3zTXtSignaturex3I462IK6KJK5M6HN402O50I622L54g}qzTXtPagex320466 #5IENDB`xqf-1.0.5/pixmaps/flags/gb.png0000644002404400000620000000064307746545516013131 00000000000000PNG  IHDR8ctRNSxbKGDTIDATxڭQ[ =7s1d#~th=У_uZ8AsXPUH:BzxqrN+Ԡ`"z-'sdqYuHArw?3׳g'w%ω48EzTXtSoftwarexsPMLOMLLV033Q7070TH.,.t(-H,L/J|jx3zTXtSignaturex3LIIM40N3O42M3ML1LK320M42703՗azTXtPagex320466 #5IENDB`xqf-1.0.5/pixmaps/flags/gd.png0000644002404400000620000000236307746545516013134 00000000000000PNG  IHDR UmPLTE{S>stwZM|SB{RH{UI|UJWP$ +++*/,#'%$*-* * 17?0764576701 4 377 9;=:> CAB@CNIQ ^[OPU czca enzqy YW_Y^ V?c a [mVQYQQFPU $.)#'+3 1 1 2 489#& + / "$!'./&&!$'$(*.,2 42;%#*)%&"$'&'($%&1 3FBMT EP Vebfqh!WWz{{~k%   ΅ƾק ѳ                bKGD︰ pHYs&?IDATxPm[W|fedq~zulxvtk{rp}gQoLνʼЬ/9B(!1`ID&%4M '* 0^K8;5Żѿ= #".]F 3վ6yOJ-@,b\csjTYiUSZVRhnwI p M7CtEXtSoftware@(#)ImageMagick 4.2.7 99/07/01 cristy@mystic.es.dupont.comk*tEXtSignature1f33d1597c7167fbd6930ab7525a8917CV$tEXtCommentLEAD Technologies Inc. V1.01~Ѓ IENDB`xqf-1.0.5/pixmaps/flags/fr.png0000644002404400000620000000051307746545516013144 00000000000000PNG  IHDR8ctRNSxbKGDT*4uBeT?P1ؒ<EzTXtSoftwarexsPMLOMLLV033Q7070TH.,.t(-H,L/J|jx2zTXtSignaturexڳLJJIHN10LI651NIK X[s `wzTXtPagex320466 #5IENDB`xqf-1.0.5/pixmaps/flags/gh.png0000644002404400000620000000044207746545516013134 00000000000000PNG  IHDRاcPLTELC]O`R~iy$&2dnvxn!%#] ` ` 1D4zIDATxmȁ ᥙ[*Y"2'yqlaй'S'CC`֬(GigX܆v8bvGWʧ})ymMN"!bD5rʩe=E IENDB`xqf-1.0.5/pixmaps/flags/gr.png0000644002404400000620000000057107746545516013151 00000000000000PNG  IHDR8ctRNSxbKGDTiIDATxڝP @t=fy>4#նK) +4^YZYJ<D١ yZ&}h|m >Ʋ[xkM6 Y ,EzTXtSoftwarexsPMLOMLLV033Q7070TH.,.t(-H,L/J|jx3zTXtSignaturexK632JK4MN2II60N11276452NJJ44LAEzTXtPagex320466 #5IENDB`xqf-1.0.5/pixmaps/flags/gt.png0000644002404400000620000000125207746545516013150 00000000000000PNG  IHDR qLR/PLTE3M-Eb:Fj=Yt^gggzkf{nf|n_RmT{X/./..//680002342JFEEBEEFIJA@DEごzywrƮDzړݜ¾̬ȾbKGDdڸ IDATxc`SWTTKOIKWQhQȔk14aIhj% |M EtX}Eyܹ=dLDE]=t]xQlIaf DsYLh{cSRr(hkJ;@f% lrr"A!!Afjr@1>CtEXtSoftware@(#)ImageMagick 4.2.7 99/07/01 cristy@mystic.es.dupont.comk*tEXtSignaturebc598e1e1a6b744e70bc4604cd2cee22<IENDB`xqf-1.0.5/pixmaps/flags/Makefile.am0000644002404400000620000000013707746756415014067 00000000000000EXTRA_DIST = $(flag_DATA) flagdir = $(pkgdatadir)/default/flags flag_DATA = $(wildcard *.png) xqf-1.0.5/pixmaps/flags/Makefile.in0000644002404400000620000002610510523105434014053 00000000000000# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = pixmaps/flags DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/src/gnuconfig.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(flagdir)" flagDATA_INSTALL = $(INSTALL_DATA) DATA = $(flag_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_XQFRCON_FALSE = @BUILD_XQFRCON_FALSE@ BUILD_XQFRCON_TRUE = @BUILD_XQFRCON_TRUE@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COMPRESSION = @COMPRESSION@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEBUG = @DEBUG@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DUMMY_LIBGDKPIXBUF_FALSE = @DUMMY_LIBGDKPIXBUF_FALSE@ DUMMY_LIBGDKPIXBUF_ORIG = @DUMMY_LIBGDKPIXBUF_ORIG@ DUMMY_LIBGDKPIXBUF_SONAME = @DUMMY_LIBGDKPIXBUF_SONAME@ DUMMY_LIBGDKPIXBUF_TRUE = @DUMMY_LIBGDKPIXBUF_TRUE@ DUMMY_LIBGEOIP_FALSE = @DUMMY_LIBGEOIP_FALSE@ DUMMY_LIBGEOIP_ORIG = @DUMMY_LIBGEOIP_ORIG@ DUMMY_LIBGEOIP_SONAME = @DUMMY_LIBGEOIP_SONAME@ DUMMY_LIBGEOIP_TRUE = @DUMMY_LIBGEOIP_TRUE@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GDK_PIXBUF_CFLAGS = @GDK_PIXBUF_CFLAGS@ GDK_PIXBUF_CONFIG = @GDK_PIXBUF_CONFIG@ GDK_PIXBUF_LIBS = @GDK_PIXBUF_LIBS@ GEOIP_LIB = @GEOIP_LIB@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_CONFIG = @GLIB_CONFIG@ GLIB_LIBS = @GLIB_LIBS@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_CONFIG = @GTK_CONFIG@ GTK_LIBS = @GTK_LIBS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@ INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@ INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_ICONV = @INTLTOOL_ICONV@ INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@ INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_MSGFMT = @INTLTOOL_MSGFMT@ INTLTOOL_MSGMERGE = @INTLTOOL_MSGMERGE@ INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@ INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@ INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@ INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@ INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@ INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@ INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@ INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@ INTLTOOL_XGETTEXT = @INTLTOOL_XGETTEXT@ INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@ INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MSGFMT = @MSGFMT@ OBJEXT = @OBJEXT@ OLD_GTK_SUPPORT = @OLD_GTK_SUPPORT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_CFLAGS = @PACKAGE_CFLAGS@ PACKAGE_LIBS = @PACKAGE_LIBS@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ QSTATEXEC = @QSTATEXEC@ RANLIB = @RANLIB@ RELEASE = @RELEASE@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ XQFRCON_LIBS = @XQFRCON_LIBS@ ac_ct_CC = @ac_ct_CC@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ datadir = @datadir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ EXTRA_DIST = $(flag_DATA) flagdir = $(pkgdatadir)/default/flags flag_DATA = $(wildcard *.png) all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu pixmaps/flags/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu pixmaps/flags/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh uninstall-info-am: install-flagDATA: $(flag_DATA) @$(NORMAL_INSTALL) test -z "$(flagdir)" || $(mkdir_p) "$(DESTDIR)$(flagdir)" @list='$(flag_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(flagDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(flagdir)/$$f'"; \ $(flagDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(flagdir)/$$f"; \ done uninstall-flagDATA: @$(NORMAL_UNINSTALL) @list='$(flag_DATA)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(flagdir)/$$f'"; \ rm -f "$(DESTDIR)$(flagdir)/$$f"; \ done tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(DATA) installdirs: for dir in "$(DESTDIR)$(flagdir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-flagDATA install-exec-am: install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-flagDATA uninstall-info-am .PHONY: all all-am check check-am clean clean-generic distclean \ distclean-generic distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-exec \ install-exec-am install-flagDATA install-info install-info-am \ install-man install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic pdf pdf-am ps ps-am uninstall \ uninstall-am uninstall-flagDATA uninstall-info-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xqf-1.0.5/pixmaps/flags/hn.png0000644002404400000620000000102507746545516013141 00000000000000PNG  IHDR lIPLTEtuuvwvwv{ | z {{{w{ |zBiBjDkEkFkOqTs,&())(*-145648;ؕLbKGDAlNxIDATxeW0EE]'I+{nQ5Kaa,K`\|W*$D=wRx}һ>ÿ׻>xé%{X t )*UNK*c5CtEXtSoftware@(#)ImageMagick 4.2.7 99/07/01 cristy@mystic.es.dupont.comk*tEXtSignature491c269eef8497f08cfb230a36ded3a3ȻQIENDB`xqf-1.0.5/pixmaps/flags/id.png0000644002404400000620000000016507746545516013134 00000000000000PNG  IHDR 7gAMA a,IDATxc?IENDB`xqf-1.0.5/pixmaps/flags/ie.png0000644002404400000620000000051507746545516013134 00000000000000PNG  IHDROdtRNSxbKGDT pHYsYYݚ!IDATxc`f@C1R4tFP+ϱLzTXtSoftwarexsPMLOMLLV033P7070TH.,.tȭ,.LK-K)-+K|KJ3zTXtSignaturexK1O671OK5LI053JKI4H13H1L31H55K -8zTXtPagex320466 #5IENDB`xqf-1.0.5/pixmaps/flags/hr.png0000644002404400000620000000057707746545516013160 00000000000000PNG  IHDR8ctRNSxbKGDTpIDATxڥR0=l-׆\!8$Db͓h-_$P? zȀtHb=[xOpJ>|Cqv4"7=]?FkvdEzTXtSoftwarexsPMLOMLLV033Q7070TH.,.t(-H,L/J|jx2zTXtSignaturexK30LJ5J57LMNM4ILNM50434I $Y9 CȕAzTXtPagex320466 #5IENDB`xqf-1.0.5/pixmaps/flags/hu.png0000644002404400000620000000033207746545516013150 00000000000000PNG  IHDRE/zk0PLTEPdtEXtSoftwaregif2png 1.2.2,>\BIDATxu1 ɕUp` %$lkz,VjayyOOW'wUz gIENDB`xqf-1.0.5/pixmaps/flags/il.png0000644002404400000620000000024607746545516013144 00000000000000PNG  IHDROdgAMA1_]IDATxR[ 0 K<7כŀ cj׼$4Ѡce3ŸIIENDB`xqf-1.0.5/pixmaps/flags/ir.png0000644002404400000620000000022607746545516013150 00000000000000PNG  IHDROdtIME .(٠bKJIDATxcdh`0Q{p_l8 gd2p~FF8@Ca:qam;Q`0Ja*gU-IENDB`xqf-1.0.5/pixmaps/flags/is.png0000644002404400000620000000062307746545516013152 00000000000000PNG  IHDROdgAMA a8tEXtSoftwareXV Version 3.10a Rev: 12/29/94 (PNG patch 1.2).I[IDATxQA Kd3Re:a! HdȊG!!4iW@zS|#1=Y~G9g>3tIME (*4uBeT?P?1(eEzTXtSoftwarexsPMLOMLLV033Q7070TH.,.t(-H,L/J|jx3zTXtSignaturex3231L10LJJ4L16N60N51IIN3665160MJF@FELARARM \[pnzt|{~yGGGGGJHGHLLJUTVFjHJoJGpGHpHIpHIqHOrHIzH]i]_cmb_Hbcf   )*))]^_~`_H9 fjom'+-,-')676558333254451011Oz|HNkkok HρЄǤbKGDx IDATxc426Ss.=} gW0tkWb0qO; ^)WwwwoGېNYENZ_C_Xbk!H>CAX!#() TZ`ڦ ӘYPZ`c5[$2(`ЫVט\PZd`boN)+<]A~v0ȍ0k;"CtEXtSoftware@(#)ImageMagick 4.2.7 99/07/01 cristy@mystic.es.dupont.comk*tEXtSignatureb273650ed0cdbea3c776c6fbdb1de4186IENDB`xqf-1.0.5/pixmaps/flags/lc.png0000644002404400000620000000115507746545516013136 00000000000000PNG  IHDR 6OPLTE 640740=PvHJYIKYEUw@SyBTxCTxEUxEUyY_mNhpk|LcwVexT#'%)-///3567661333234455535 8@ABBGH>a?d\o]zktpsxUsxz{lmrzz΄bKGDI|IDATxcanff.(CGJ$t%L)v)ye3إ@I\_ TTjY12Y i*hY20Xj):8#ٻٙJ"9:;ADA.tp ^>~~>^/S CtEXtSoftware@(#)ImageMagick 4.2.7 99/07/01 cristy@mystic.es.dupont.comk*tEXtSignature30bb69d99df168170de9c2910140f4ecn` tEXtDelay100\IENDB`xqf-1.0.5/pixmaps/flags/kp.png0000644002404400000620000000112307746545516013145 00000000000000PNG  IHDR 6OPLTE@OuK[yJZz\bm),(*+,q{N@TAgV$%'&'*)&'/125467776:->Di>b3c5a6i;ik>i;m]qJvNtcp{v}ƂDŽ˃̄̄̄&bKGDPnLIDATxc`fd l,,,e`dkih6 nZ:0-*"(o'&¢ <f^jRr2 U7S1PF ml6= #wT.GqV_SIvCtEXtSoftware@(#)ImageMagick 4.2.7 99/07/01 cristy@mystic.es.dupont.comk*tEXtSignature7614e971c23469d398307be16972d57ecbhIENDB`xqf-1.0.5/pixmaps/flags/kr.png0000644002404400000620000000042007746545516013146 00000000000000PNG  IHDR F%`gAMAXG cHRMz%u._:oi+IDATxbOeĀC8  ↆS2 )>d#ctV2`taC6  3 !Ȇ0!C f(.e 2 h& & $FuIENDB`xqf-1.0.5/pixmaps/flags/ma.png0000644002404400000620000000026307746545516013134 00000000000000PNG  IHDRh]gAMA a PLTE{bKGDH pHYs  ~tIME 83 IDATxcT$DJ V ãLEnvJIENDB`xqf-1.0.5/pixmaps/flags/kw.png0000644002404400000620000000031307746545516013154 00000000000000PNG  IHDRh]gAMA a PLTEmKgbKGDH pHYs  ~tIME:D&[5IDATxcx ~A?z`P@HP_!U0s)VIENDB`xqf-1.0.5/pixmaps/flags/lt.png0000644002404400000620000000014007746545516013150 00000000000000PNG  IHDR }'IDATxcV? Z2200e|*.0OCJ9]rIENDB`xqf-1.0.5/pixmaps/flags/lu.png0000644002404400000620000000071107746545516013155 00000000000000PNG  IHDR qLRPLTEMf}ZOYMZMmc_ff``g`fggKdKfZn<98ҽ;WKYKYLbZ+,607843V'13]^DvlN>Do8VD,.*qN ,?<0%aYDCtEXtSoftware@(#)ImageMagick 4.2.7 99/07/01 cristy@mystic.es.dupont.comk*tEXtSignature41d2d0b43d831e9bed31402a18597e76WIENDB`xqf-1.0.5/pixmaps/flags/mk.png0000644002404400000620000000070107746545516013143 00000000000000PNG  IHDRا`PLTE*-/ ~pbT F#8%*(?bKGDH\IDATxuK 1C%.JWqaQLIxRwjR̘OpZRlF:M?X_e. WEuN+oN֟ R<EzTXtSoftwarexsPMLOMLLV033Q7070TH.,.t(-H,L/J|jx3zTXtSignaturexKJK24N551L1OHM6L15JMIN6IN4N64M A"zTXtPagex320466 #5IENDB`xqf-1.0.5/pixmaps/flags/lv.png0000644002404400000620000000041207746545516013154 00000000000000PNG  IHDR8ctIME  87$ؽ pHYs  ~IDATxڵA! EiKEF3kvb;P"1Ť/͠{ep4k 醮&dUV2i 9g=EqPC(ulAq'{lwx㊛"0vOAJ-W'봵Z27CD$0kXjB@qIENDB`xqf-1.0.5/pixmaps/flags/ly.png0000644002404400000620000000024207746545516013160 00000000000000PNG  IHDRh]gAMA a PLTE bKGDH pHYs  ~tIME jIDATxcX Cr5})ZIENDB`xqf-1.0.5/pixmaps/flags/ni.png0000644002404400000620000000026107746545516013143 00000000000000PNG  IHDR F%`xIDATxcd`ʀ-CYgL 7 oǯBb{Y[2t)[7_2 AGANG?m44hIENDB`xqf-1.0.5/pixmaps/flags/mt.png0000644002404400000620000000050607746545516013157 00000000000000PNG  IHDRاgAMA a`PLTEyYN{\Qz\Rz]S{\Rx]Tjdbpk)<#"77 8 ;32716ٔ}䧛bKGDH pHYs  ~tIME %\IDATx͐I 0b\p6"",Kїm9_@vBKK:ZA@DRD[(p֥H-k*>py3kIENDB`xqf-1.0.5/pixmaps/flags/nl.png0000644002404400000620000000020707746545516013146 00000000000000PNG  IHDRWgAMA a>IDATxc|J@F&j Z222) | :ާC@"1IENDB`xqf-1.0.5/pixmaps/flags/mx.png0000644002404400000620000000121507746545516013161 00000000000000PNG  IHDR PLTE\!Oe3nG)|\%SsCWuGWuHXuIXtJbj]pN$%&%*556132569 9 _[sj9 T0g>SCWGWHXJXIso*%%&%6559 32651dwqqrrwy鏃jbKGD]0IDATxc`eccgvWWVTTPb7 tSҖa`㳈47a`5zhkDbC\bE]dc=ՑEy,|ԐEMQD:;fq\{ w,}%CtEXtSoftware@(#)ImageMagick 4.2.7 99/07/01 cristy@mystic.es.dupont.comk*tEXtSignature430ba145041937da9b06b50ee3e476b9; 1IENDB`xqf-1.0.5/pixmaps/flags/no.png0000644002404400000620000000030407746545516013147 00000000000000PNG  IHDRWgAMA a pHYs  d_fIDATx10 m:0g_fBBmҁfRY'YF^84eUdnDSjwgj]ްSj" ͗IENDB`xqf-1.0.5/pixmaps/flags/pa.png0000644002404400000620000000161207746545516013136 00000000000000PNG  IHDRاPLTERYnT]oR\pS]pz[Q{\Qz\Rx]T{^Ulllkpz )!#$/051323446787 70 8 9;:?<>CB)X`o}}~̿) < #!$/577 8 9 ;03234708?16>3 CBJ-ٔ}ps~~υȽߙ蚀Ͼ@xbKGDgJIDATxc   `aVv¢4O3+K07`+?%!H4ہHtJV).6 `g WҜ҅"ӝږn` 0iJ3piGD00?\͔ } ̊R -^۔IENDB`xqf-1.0.5/pixmaps/flags/om.png0000644002404400000620000000150007746545516013145 00000000000000PNG  IHDRاgAMA aPLTE3f3333f333ff3fffff3f̙3f3f3333f3333333333f333333f3f33f3ff3f3f33333f33̙33333f3333333f333ff3fffff3f3f33ff3f3f3fffff3fffffffffff3ffff̙fff3fffffff3fffff3f3333f333ff3fffff3f̙̙̙3̙f̙̙̙3f3f̙3333f3̙33ff3fff̙ff3f̙̙3f̙3f̙3f3333f333ff3fffff3f̙3f3f}jbKGDH pHYs  ~tIME (ވ.IDATxch$MZ&`W  mHAs(Vs<IIENDB`xqf-1.0.5/pixmaps/flags/nz.png0000644002404400000620000000055707746545516013174 00000000000000PNG  IHDR2(JgAMA a0PLTE   PHp X0h ` X0 X8 X` Hм舐 *8tEXtSoftwareXV Version 3.10a Rev: 12/29/94 (PNG patch 1.2).IIDATx1 @D?zBL5S.Iv=g ~jjjMMIENDB`xqf-1.0.5/pixmaps/flags/ro.png0000644002404400000620000000044307746545516013157 00000000000000PNG  IHDRh] PLTE_]tRNS@*bKGD LIDATxc`` ]- pu%m?CtEXtSoftware@(#)ImageMagick 4.2.9 99/09/01 cristy@mystic.es.dupont.com*tEXtSignature62919b94bc5ef0698582a3806bfb561a7=*tEXtPage21x14+0+0/uIENDB`xqf-1.0.5/pixmaps/flags/sd.png0000644002404400000620000000050207746545516013141 00000000000000PNG  IHDROd pHYsodIDATxcxR{ud"fh1L Dmuj>*RV I_+PCQ;~kӣE| "0$ [)%g"N>_4#"g`)\ߝ;a6r=dܩQ^V`Pw # lf43ZCLM p`itIENDB`xqf-1.0.5/pixmaps/flags/se.png0000644002404400000620000000054107746545516013145 00000000000000PNG  IHDR8ctRNSxbKGDTQIDATxc` Y`nQM"A(6% g4.ri\G#фcfj9C(k肢CEzTXtSoftwarexsPMLOMLLV033Q7070TH.,.t(-H,L/J|jx3zTXtSignaturex3LL4H05JL23INJ6LK1LL5HIHK6NN әCzTXtPagex320466 #5IENDB`xqf-1.0.5/pixmaps/flags/si.png0000644002404400000620000000020607746545516013147 00000000000000PNG  IHDRh] PLTEQ55IDATxc PjLj*UԺw`j.0444!4 R(jݠTIENDB`xqf-1.0.5/pixmaps/flags/ru.png0000644002404400000620000000053207746545516013164 00000000000000PNG  IHDRtRNS!'FbKGDT pHYsBB.IDATxc?@0Z?փ@CQG'Gx (zPrLzTXtSoftwarexsPMLOMLLV033P7070TH.,.tȭ,.LK-K)-+K|KJ3zTXtSignaturexKK64310K5573MLI5N441HI544It3zTXtPagex320466 #5IENDB`xqf-1.0.5/pixmaps/flags/sk.png0000644002404400000620000000061607746545516013156 00000000000000PNG  IHDR8ctRNSxbKGDT~IDATxڥRA }?c.sfM-*!".U݄x$:ʪ8}Q‡H\r+Cwsa<-#)I麾3}>PwnD7EzTXtSoftwarexsPMLOMLLV033Q7070TH.,.t(-H,L/J|jx3zTXtSignaturex300MKIHI6043K6J0520L34620J6.>PzTXtPagex320466 #5IENDB`xqf-1.0.5/pixmaps/flags/so.png0000644002404400000620000000034407746545516013160 00000000000000PNG  IHDR2(JgAMA a-PLTEࠀ@p P0``0P0` @phbKGDH pHYs  ~tIME b-IDATxcxwr P5HlAA"PCĂ! ;a IENDB`xqf-1.0.5/pixmaps/flags/sr.png0000644002404400000620000000020307746545516013155 00000000000000PNG  IHDRWgAMA a:IDATx咱 Šp?`H#H1ь& }ghԮ𻧡{)p \zIENDB`xqf-1.0.5/pixmaps/flags/th.png0000644002404400000620000000015007746545516013145 00000000000000PNG  IHDRW/IDATxc<ʀP 3204 pCP:0T>n 0IENDB`xqf-1.0.5/pixmaps/flags/sv.png0000644002404400000620000000112207746545516013162 00000000000000PNG  IHDR PLTEowZoy[oz[oz\rzX c k l m l m nnab`dehihijkkkikklmmxs~yRYgkiggfhዊbu~h}jkŊΜ̹TAJbKGDNaqIDATxu@ EZ|RZE3iOf>%kE&l7DŽ˧ zN8nfÖ^OF=;nW> t&hך:רWՖN0P6 O"IIENDB`xqf-1.0.5/pixmaps/flags/tr.png0000644002404400000620000000046607746545516013171 00000000000000PNG  IHDRōPLTEZbKGDH+IDATxcA?P?D $RU%ZiDEzTXtSoftwarexsPMLOMLLV033Q7070TH.,.t(-H,L/J|jx3zTXtSignaturexK50K2OLI5OJMI16425IM2I16J135J .DYzTXtPagex320466 #5IENDB`xqf-1.0.5/pixmaps/flags/tt.png0000644002404400000620000000135507746545516013171 00000000000000PNG  IHDR UmDPLTE   #$'('13*573=?3>@>EC=JL@<@+ O\uc̡>Ndf "0CtEXtSoftware@(#)ImageMagick 4.2.7 99/07/01 cristy@mystic.es.dupont.comk*tEXtSignaturea940c40f440d601332fc627d4a40f4f4OIENDB`xqf-1.0.5/pixmaps/flags/tw.png0000644002404400000620000000035307746545516013171 00000000000000PNG  IHDRh]gAMA a PLTEhMtEXtSoftwareXV Version 3.10a Rev: 12/29/94 (jp-extension 5.3.3 + PNG patch 1.2d){0!IDATxcM aȕS@T*0/j2*UI*ʮ J `tIME 7('5IENDB`xqf-1.0.5/pixmaps/flags/vc.png0000644002404400000620000000122307746545516013144 00000000000000PNG  IHDR XPLTE$N~FUwHWuJXtQ^nWuGUuHXtJ_vH]bj-.56132 9LL ,-0576349 ABCNOOOQSYqIHHH FfbKGDU3IDATxcdfbd6VvfA^>Ks s+3UqIY&.a` `eQi &^~na{@@?w%1)MQqB>@]AE=JU^PNK:D_SM YOV7! zs s m5!}$-aCtEXtSoftware@(#)ImageMagick 4.2.7 99/07/01 cristy@mystic.es.dupont.comk*tEXtSignature2918230b1664ced4b8ab72176b6fd237b tEXtDelay100\IENDB`xqf-1.0.5/pixmaps/flags/ve.png0000644002404400000620000000157007746545516013153 00000000000000PNG  IHDRاPLTEX]Qb0tgMpeMqgQsgUvgUvhUviUwiUwjVwiWwiUwmUxhVxkUxlYui_{jpaP=?><=?>36779::;;?@AA@BBBCG@BBBCCDDEE @ HCMP FLLSQ3_ V#W+^'[&\0c5c@lOw\g^g# !  #!    εڿ <bKGD IDATxc).*,-,(f(Q2: &1 v#@'C~.CeOcK+B@#CuW_fz֤޾&1 r1spsrpr 0H((+K9ں( hxyژx;x @` %i(njgh```֢Zj:"@&C?Р )H !,2.D1$DƇqlD |J`;<CtEXtSoftware@(#)ImageMagick 4.2.7 99/07/01 cristy@mystic.es.dupont.comk*tEXtSignaturef18ef52974e1cd92c3d406032c5ef4b2kIENDB`xqf-1.0.5/pixmaps/flags/us.png0000644002404400000620000000046707746545516013174 00000000000000PNG  IHDRh] PLTEMbKGDH&IDATxc`` u`PRZ7r401<e ]EzTXtSoftwarexsPMLOMLLV033Q7070TH.,.t(-H,L/J|jx3zTXtSignaturex31414K5N35I3370054MN447476KM>zTXtPagex320466 #5IENDB`xqf-1.0.5/pixmaps/flags/vn.png0000644002404400000620000000031307746545516013156 00000000000000PNG  IHDROd pHYsod}IDATxc@  B9(@~ 7~H_*~`$B/~|f~'!/?I 0TZCV@b5pLHN[4IENDB`xqf-1.0.5/pixmaps/flags/uy.png0000644002404400000620000000140707746545516013175 00000000000000PNG  IHDRاtPLTERfyWj|lllcp}gs~dd douuvwvvwxxwx~$v/~5{0}3~*(-0HTWWRTUUUVVQUU\pkkkk evTSB^hosrrۃ _bKGD{OҵIDATxc`r  P/ҘtȎb+Lsͩ^N8{c+spye(R`Hq61u,"X73K 2=QI (gHuȬ69jP ܂B;+`cgLFɑxFIC'CtEXtSoftware@(#)ImageMagick 4.2.7 99/07/01 cristy@mystic.es.dupont.comk*tEXtSignature34b7ed648a82784053f87f72a4f88001-IENDB`xqf-1.0.5/pixmaps/flags/ye.png0000644002404400000620000000033107746545516013150 00000000000000PNG  IHDR2(JgAMA a0PLTElbKGDH pHYs  ~tIME4YIDATxc ̙ı8?n6ZLKWxIENDB`xqf-1.0.5/pixmaps/flags/za.png0000644002404400000620000000204007746545516013144 00000000000000PNG  IHDRاLPLTE   )<+ @/WA ZEnG1GKRIGRRRRSSRTTRWmK[oT]oT^oT]qS^rR{\Qz\R{]Sx]TfsRzbX~nR~uRehb+$%//002156 57 7 8 ;< 7@@AADE=cBa!#$%%'&%%&'&(()(**.//, (+(.. 310134556 7 12344556676767: 8 9 89:<>/ ;ABBBSZT/itpzi<{eNvGuH{^|ҿ7 8<f}kv%*)77 8 : 22125/ 1:665U9^M İıp٩ǛƯǯʱ̓ːђђί¯˴̶ϸڳbKGDÊhBIDATxcPn+'-2 "1L> 2ƻo?8wP0o*:X'Μ8/-صnX4AoUkfm`6eѩ^A! ;-';Rjy6D{&'Ab3{J,[ k#kvtYŠ*Vʪ` Zs&h3lV14=#vnCtEXtSoftware@(#)ImageMagick 4.2.7 99/07/01 cristy@mystic.es.dupont.comk*tEXtSignature58e0794b8d2a94360154081e8b7911f1O}IENDB`xqf-1.0.5/pixmaps/xqf_32x32.png0000644002404400000620000000452407746756414013107 00000000000000PNG  IHDR szzbKGD pHYs  ~tIME 03%IDATxڭ}Pu_ ઠbi!*zm=^z]s6N4uMtS\s59"F, 6(w%<ɂʃ ~f~<)MwډY5!DDɇ3L{EESι3XظXf w,A?ƍuH/0M\kmz^:sde9]ws))ǃN!!P~qtH ±cHdVc-_O|RGg^;Dglo fow*9z5JxI6$d݅سD+dFu: ,xGԚ\w8Mt:+N:(,,l2LYfܺubV˥h4|>z^C̙ WRQ^ |}¿UpSWUAeeG[,wVX2** !-###X,.]y䘵`r #!1Yp|x*C*a^/_鲴4M!sv ```lOOͽoԶ!8{<[i9^*%%t.VUU30jeS466#IPwwVB@HOG׳Dd<Ωg੘|$PWWwԩShZ^xq  **"!!ŋ233m{N'I≴4i4ӧyVgZS33111O+ n'..EEE|>پ}^Y ׯ/ySPPtddMc]QQkׂR/C嗴;:8yŐa3Gr}>3IIIg[ZZ^.\8@v;RR|>i``Zk0!>e`Z utpRy86f\VV&jbZ7HNN^qtٳ@@GC{HLy .rqU'0-g谖̪g/\tZ~oە&&&v1;l6575߿Ddfr(% xy>5ôN[xE$N> ,KMMM=5.??:Z^^v\nsKOgJ p';eB.^$[U͛7?RfZ?}W7laSNO Rb1<៷sqz:Ϟ fϘ6X,^t[(23 iC4&*La.y<2CJ%P&4)eS~^qxf# NG#K!j?$UDJ&Bk/󑣃E(22'cpZ !T*ȸF^s0cIENDB`xqf-1.0.5/pixmaps/xqf_48x48.png0000644002404400000620000000674607746756414013135 00000000000000PNG  IHDR00WbKGD pHYs  ~tIME #G' sIDATxip\evխZj[b ^206aEd!N!8 *L3P K^XeddmZKkro~⪩_ݧwyy;,f1Y3]r%Bf&v;l62ҙkIl"W1)XEM$cLD C|>5E$\lnFظ{n.&'\\.,dYDQ1|]C44MCK$H*p13?ߤK@:kopӜ99841`0$( ^ʊ¥#)2$5H&@Aa!8u6mš˚h>Ll؀TR͛ҜvD%p" (~bL#("( L`6f3`2$ùHNM:p{p._rc$Lee|CG]U < Rnb,Da"U!UeTUFb D" 2@Ʉh$de2PUBWb17u.PˇvG ",fwn\4(9Um4SS{ 8V^\+*@Bjs3g==ܷo/״kN$l!"7ߌh*g 0 _4>n**T%y }]I&;;&X ;LMLpcv6&5U ԡpAqO%{/\@غq#UWc G>'~v?Sp DbSix헓Z |>FNEɺvuKfhld^o1Id2?v6rpȑmբ$I \~?&ѣG׬Y#( W:VkaѢɛn6]- ^/-?r~>VVRcb^9}ݏS!eL>Ý],,ݻۭV9%%˅yee {w;wnիN777gO](Ꞷɲ6>`d`0 "YYYL:{zzmNdOdMHB/pP!}Ǐ?R^^v'N`i_h9srHI @$.4>xʬV]2Ł# r"Af~O#\|P*--uMR$I*8pu֙cpt]9v>INRuQiSSS1MbӶnpOQ0$'.q8Xw} < m&-\1V:vn7uuuE">/: vmGF=R"XL&/=Я(Af!9u=PWVJAUpG*]'+ul6~r`OykVVY-VUUKKKeKQKK.K6-r$IR~~~~fffs F?~^e. 3*C@i)Y]ER:?AW @X?9iii+\ϩO?i<| UU333I555kmmmWeaNN BIp:hVicccttt ggg D"GUUB`˛oyJyM);VWcXRp(]] e=ii!핕< ex|ŋjccc^wY^^^~QaaNqq~޽4LOf `v\銢d2hjjڿyf]c}e@GVa![,a˕ >scxCЌFv:sPŋsF6 y__ 1)HЕ2{|gssr2[,O=6ٙ|w`(t5 ݝ]TT4%񑑑 |& ,[-eK$15ze0ml fSRiq8 H{yF-C^Y⍍M6 \ZJwoD1a|>_<=3Z7eF|58o?|AQC^oɓqD`,D8261N:tEuݸĜf]Y5Q^G'vJMa3q͎jIV$d  =pHMP[1#l0?'r* J2s|4wvCGq*^'oh@ά]ټy]}s00r#5 ~(\ ": *-swOu#"}3f`z?ES]S]UO<[[[[[[[[[[[[[[՝ev7;< #o;Y/E? ?cVzk[-|G , lוWom LSO8 qX9 LS@Ѹ> Ѳ?/S* [=" !&X#wĝy gaϰ?Fk~kSZT 0dI!chZs1~G/|Ys8F0𫷺/Z tӔFU{>R ^ eT`(&~?oF/ D੍C{_5`laDO~G}\ d/ T U~-qčMn_XB>nMT1&B} 𦾾(_ԈO &P+:N o*h!h=-9 Ш`beiЊ?n}~G?-JGJcZt? ,qG{Ck/8:U,ڙ6KTX@U7OW pךki8B? DdšS|vJ/׶̳Tݲ$G&vqD@$ZD1SL D,hޗ¼ zqu|@.z^PozO0j=^ï‚AqH{Ƕwē%2?u&R*0,C0j™cp8|xBrΥ?!qZ~#@=eZP@cgZvot"0KE 5`"jY`#Z`㦄E@)> #ejM hIлsdb3awyy,^_#xM r;ԡ΀`Qoax'RUtӦ#z_#Ҫ\a  $ZGbL?K4-Jf^}ed! _`ErBÜh r[P$jYu0V q# 8C?^hïExȳr\FCbM̊–*ָcFGR7:_!Ҧ(`I_<$aKoBXͿa jP=_0z.UVCmhQɶ!h"W,X| xfq Y RMa! *̀V !HDmp17[BM gffR1N€3qVZJeg /~T[=*T /YSeXX(` j^xT(cÐF-JT%Jږif۾sl&(}е 髅8WFU.C"2m6 ӵ_+Hqd` C<D~BdZƳxYLTc^j4wq1fXu=@ >okAj(1Ӣ2KP,_+:\iҷ{x`I"uzK_L!0@ OON rq%l\ASJMRST'<[i7ȝ[ P!_l[ːPkͥ @P2ujeVTX l˷!ATKki=[4$š*dǦd l/48R+  #/S\<%mC֖ mgW7ur]M0QFN b cP.B2V"']7&r7=TDgl!r%`ӸF ٜQĆDd䵝ͦ!wRNr9iya;ˢ6\440 $͆f DŽŌ\ 7**9UzRDȳD`§WTqijYXZWG[ߢ}t&BE :xM쩝~Ip3pG쇩Q, 5z !i J8DBFړ (o#B3a[Lȳh>MGS-Ut  { 1;42uވ0ش m0.04A{B5>%tm KP,B(FF3~G ]ȁR㴅Jo n0"UR)H&! -m%*,oJi5.Cx/|i)hxX#ThD}93 U>K|45~pU*P*A0|y(PR/nlj`qJ|④JTZݠFi L3bHދ(O"ͯ՘=0ןM+)SARPBj.k;8ƏqENԟѡ9h$6Rwa{mFY?N JA:!_őK9^$ gjje"4C޸h<M66uU6Z-o1QN˰mҗTLv1  r914|BBK8"^SK!b`/U7$zvT11I_SlHXl!rŸdPQx $2*)%=Lˏ-T -MeZ:W6{Q*0ǁZ5(Pz$\ȼXHaмь%00}}4W ,(bV.CVL"Lx[)r{%V&V&18 a:O|,oe")^}D5_X E<IaE-R0ub$1qE"G?X\&&aba| *6lD5k``p``Dztl1>X.7W%RFJo᤽5"?>Zew)p!R9/DhC !#m/u 5fMGֿc:6(]MjPg]-kkIaby5n^a6 j_ 4$~3^Lv DBITzic6ԥ\zJbbҌQ u.mJ1+2w Ηkii) t} 4y!Tqp T#}}080c %fTOR#~LƧ_ N7!,i^˒׭ /bTȵyɤWZ#Ԭb{K%V(8 q'& +&H /m?%ʶTwvӎUD$Wf'&`&شU>,ۈZd^5׌! m? *1̑dC0,Q1΍}N-"U?:(  >q.-[Z|Y(H-D)ڑju@7Uf FǏKMqhkSv޸Z%}0Y*D*6 څ B3nW5/""Aې9"xJ?$~;x&Q d2P(@Y:X"ŐqŘ:\ͯDK4!y^=($1h@#sie.ڈ=bR4,{iYXZjX\_ځ1X } :L(lԂ5H{W I"*_^({N|eȶoOZyEG"FH1$bQ"ÈTj-WĄ dy>t#1 2l3`ğj{ƾӖdt\ u,l=G%0A8hu4/!䈩'Ky/ڒ*?۴2y= 6j83Uh7n! ɦC#G $Bgq m$慘5/3!+eQ&  V2`^CMksCX>H\?,N-BY/ƹD \<q"Ţd|5ͦ͂=ZW7B&leԅ/<[ǫ8&g^lǃv=K XO˟5|jDQuZUsm`^b5OG- 8~#vz#^uEZ1^ RaUDTe"nQ$D,r>H3,-~qP?°^ZiP1/tKV$Szd8\iQ,F7:+*gY>a '{%.:x# hE7*kUR%!-ZaL4~xSNG_!Vն`6.-f(sx79!PXI 0v-ZN}fjb@ͫR`<{ZmQtu`^ȤJ>/Ry1deɦ5$\㴀w#RJB2{Xg o6_\,: G. oEK? & a#xǩ 'őKHf] `4@? QtSUn\a) tX}6x@hȄXf}`3{^?H_.ծiR6"xo[APšO<_$F0"b xDo81#d@ x:(# yb'r"A$%*3T%-mP[MjͿ7+JZ4!B>-XAʴIXTJsB-o%Ҹ'LTf#/m$TyW@'e>'^,C!R6l%|"&.RiBk ak^BW] P?]M(\u:p}/%\b6l8j z=KăQ}D;Y1NۦYiF#iըKU_$7ye<`N ^p ɵ "o5)W r' Oє4*Ջ>`5Z ew|"+XzCBPZ]V%0j %G. W"Rm@Hfxw ʆ+#ƩU5`o *"K@"(1B1@1@lJ>ק n;.Gԅȅ#~نZOjP\ e0&ei]!{$WBB\WrF|`M<^wPf;]gM#Ā $"ICW.^E.h,!k} eM DH$0.r0^-r*jkӚhI-Z%O@Q5]} _1kJ왈4%,ppIt9u|ö~q:vJ -n.dQoE\5Z@ "<"+ 8ᢜ6NDѣU9 ڛE@R>S\+`uM? u,XjA\EM 8r'‰?!ZQ~j5MZi/ `DPkb(f( k\eVaŅj52e] a8 \A٩GJ:x/6JæO|Y0UiAPdNyVZA~*%a{iZaii]*T7tq/^@E~z7kM1#WDmzނ$ytőKx6 fqP jd4ׯ :"puR-؊~-E"A]bsVV Wա;,]6 `Ѣ6hQ ީD41tEUtT%$ZDz!mRQ,@bI#pQZ+h%P9Tk8!7kjl(죝VG\YUhd5pœ쓖Z*5a>B<3zKSV ˧6QW,q+/+>t;)ionٻH"EyeMmO55Uæ˔Cxp\U¼E?H*"k1!(Բޭt5Lb+9詚jFT[!_⚤-LbVWӕHr,:c<"1L|Q{3!*h`ŌKacUAd[lˣ~k :r&tEz^DEC:qN(P{Ҵ ჷwAԅN`f:KӢE`CCNŽ*UZM3vf;ԁ`NWJT 1yvwKrl6&3/g4 QRE..O|J(\<5ԡ:X)ap~jKa#b^Pqr_2F8mtM Be5$ELL*ҘeZzJtYyQaŌԶmxU:*Ub`(6/cpr v1tCG1l 'iVVDETDe1Z o GZO)Ռ^l K;jIk_EśOBz6-/TbCV@B™1|;z^zEU]K|ae(CXش6S' g)TWQӒʋ20ֲur I2O5ltj?E9nRJ&rѴ+xEE3ő ;A0Enx Cy"@jw .aȶcI0ֈSR3>N2'TC3T/6Bkh(yOBjM.sE.7d??DXVG_a ؎{^1࢝^[_(Hq|]>mů 3|E D'ꛪ 1T>V*C%[!1R-$Ű+PI|=e魮UDQvpA81/P2;z.!z,hC(ܺ2mO$b oď*l FpΥZ"Z٧oz\0~]9blvRt4d EJ%< ZoatW׆FuРϼa/j.K̀D'rڅ|ާLȶzkXa N?%: *h. zd HM"F7ix+ڔ_ܩ}m0Cs(lFI^ZKWc$uz.ғNPŢuj=ռZ?qi;Vף Tڮ3#(} s5ٌ0,ŧO^CCj^aa<;S6%a^a$ > ypkZN6s6܋d\pTjUMrfVz2yVPtR%zIVpf vb"=PR]]\NT1w0=7<5Ȅp1*CN!&mad(;r!B~u.[m|g薠&*1c̜yq*5м7T|Ez3[$xA іV+?f"pRpn(jhE(@?5/.͋_*/o1ysx3/ux2](x~yM`&E~.DX$\ʊB1u@ٔ"0q C1uN{D^+WP 6URR;NUkF͂_ڄ#^h"B1/*RWz|rTϙ"WXZ[ \Չ=M~T8|My/WUE :v~fOkcԴ#8;gr6BTc>(R]-=c]-Ńf͚na̙'x;U*/oN:dXv 7\ɶ-o|q;,b_rok׮ޥowx<}ƍwyaO/Yd`` Z[|??͝;n˗guV<T*FO>9cƌ=q{;ظqc~8ck֬6mtdٰgV?sO>}?wi'˲׼;׮]{g.Z<̝;sso|`… Ø~7yٲeTJIu}؇3gΘ7oayFg+o(661 ;wSf3H @.סV 4, vTFZ~b6kN͝s̛JE" _߇z З<e]."(\f/Z.-˺袋"Ջ/8zf٫CP,8o . NGԧ?3񏛦dɒ{s۶?=;S.s=w޼yϬj_җJ~p {キ\qe#~袋 _4/L&1sه~%[(BDWMUW{9 :a-# 8Pxg7[VRՌ|MíFmO;5je(a29u.}saa-a~it~f M&ԧsOzW\A4[|g^9ȦZ//?/G}[VE~a뮻T*ueM<餓N<7);];N_veoa;|G#8bٶmwqL<x*:p??#w^x`}x'yX ֟PYڣ`{ >9S+냁~{a=.?a$°}>/ьg1跑K{*'```Îɯ~+֭S\.|UW]52"s{Ϙ1|ӛsD"8skOwrP(DC9g<9D_}kLzW8 (gUz;q'&%Kx㍟gSԇ?˗r9˲N;4d /y۶qPӟz _uU9?hG}M79-\Uo{ m\JvqG|d||sO8c9&Nqׯ_llذ_*"L&xvy+ʊ+8ŋ+V~A-Xu,9s&?=*T*>T}/Fgж??q.N;a!$}?G HH"ê~Y^mk&~qӎHMK;*3/@{W.>fq(dcY0>>ܸj˖֭Cunu⓼=6ީmtIoC97Mu]J><]v娣:CwSO5 #]R./c`uө>b~HLlfΜ{"V{g||\l%K9Wi"ʬ]nذaPNi;#HR{aK,gܹÇ~x<5kw}+W 3gΞ{)q//h{!_a\QrgqLs_Z La}޿'*qj[nʟ~q*oOKⵝ31l`2IřoC_XxcͷuT7;;{/^Kf͚UVSN9E<#<#}E}ݷz>g~Cӟ?sR׿u~fGH$SO=+|>N=܇zSOe]W՟'0C&ɳ>[!_җ|HzJַs֬Y&CCCW_}od'} 6 mod2DqnO$'x"@uogc=vmvM}z媫>bc>V4X3sG/6 3DL(ga77PLd$;ҿD;|a?UBfCЃFnH^"w]< S]vl6;\j^oݺu_8;׿uAn+VL'IԭU^$… |/N֮]{WYf-~7a?P>wy晦ir뮻R ]jE9?8SL7|,emȃx|Wnܸ#˗wʕ+?zb_:~Zz?z 9l~ߏD>k>dh癮kYQd8\/Fh!ն&MBp,!Q.:]'ݺgB(__`axgw/.ZHak PmʕW]uURMRV}9u?qF˲֮]}磌JW\qł ^b&N| /,jROaY梋.w`Z]f?}^K{ xwl6~``裏^p7x9s_~_566F0l\OffZ;w%v?>ss{mۏ>g뮻2 O;100뮻FC C4֬Y݇_W_|Ӵ <eKF r`hsS㗶W6/fzšyϋ)ZDo=zs9vkl΋/ty]{\H!;66|4M~_wu~z=={vZ'|R_А+n:_iu'>|͞=#MO8Կ?~wfewbh67|Yg-^E\.|VHe<׻ޥfϞMײX,K.͛g-/y||\_eYH) & }饗~+_Iӆa\{?JeYy/^|EmpbD>mZzow8=} ?R^- ) ^\ץJ0=._ۇ׎i6'}뭷Ο???ĥ^nݺ;ylڴJ׿O>IOH###tٶۣ>z_s5{ j5Χ}g}',L^|P~_z饙L+Xvwm]wood]zW^|uC=%Gy$L+O<"݊+VZL&er{}//>\~M7}ZxṮy繎m xR+Z8%x QCw]H$va>jXlER|eV-VG E(%Fb^½\) w򕯬]6,BcL&ɤT*?g|;?я>NLLLle۶mxݙL&Hx<m;f6YQ( F3\mx@ӉHn2ń`).6 h1f΄ٳa0 0sߛӧȑ~Jɡ{# 9A,Wa;N; >c(H$<[b a8^{ƍ\]v_Zؘ8.YdŘVZ_5ZF-ܲ,2cD^{- ;::Di=j/Ȉi݇cX,'sx٬7J+>=άY0<׬Y0cGZ[O 3dƋE Dj#6I 1lۊ1˲ D#u6zToZV>" # pB<(6Ut}|G <' qKƩ=OP0 X,!-ӳy=@ިj5^9.usvL!* &z44x"aT&/V9gh>1 ja6Zy/JnIj~-oٗeM0-ˤZsB&jxڐZa;̉3f̸ f̘!0#;zO?D.YV!H=9t&Yf-Zhv3g]eVXܴiڵkW\q\.G8!uZ%胥=[.| dK@1> kĘTO1&T*dɒ:XhJ쯷yަMz IDAT~(!`m{ܹ{`]jV,U 0x0Hx ";N0\<Gc;z:`BY'/UoI jNE\lnUzƏ{*)sՈ!j˗^z׾NNwk׮r\*Qy.R̈́X. N"HRgq{Nzo}kttWًIW";#O==sJu̙3gΜyAMNN>wuի+db(O_l0~n8~8cb(Us\xr8ɒF +HB,,n&ij4#:ͩ乧w[ԕ+y~DPi6z-bu 8 mV^x"'~*<0ϘNַ^y;|%b;L&lٲN;wىW"e]<ȡ!, ů'S76r]..湮4tfꃎ '8#!S1ch$V#)}ƿ RUMY ҿxPl- >qhxX"H$/N;-,m^xj*9ilTMozӗeO}ݍG6.@ΕJ/ /n˶]vrPw~"aa/_K纞Sw|8 # aZmOP04]8nξlCRk0Y~RtJ5;`c-x{ L; m޽^DJ@5X,3.]H& w ` ^ȼf͚u5Ν###wygVs='I)1NT}^K,|o]+le2KbkJIN8awo'(딨u\i$+=I(77?P(-bK#~0mr& u\^({٣Ջ*vBڲ,&H$I4_~:`m`pp```/ 6+VLJ_,?Lwժ7SJ بvpL&.]} kgf͚K/AG ,8餓mߞ-㢃TUǩ7%وP\>o!^dz#E,#CKy$_|JiXZ #Jehcbx"j6[YͫU6l$UfENO;:$=VĕeJ!$u_{^zna@з߂ ?m^xbjR@ӲjV"ja]`S>+`ڎ`6xV_T-$G$_W#ŧ=T_aX&/ȬH$&''cj{㎣##X pTjٲe_~y-_~UVuRK%̍J%ta _"}ݿ/D /mvu~BZg0$_^_TWRϫ"Vb=X@%ȿ◭jB1Df% T%P,5L`/*"Ĕ ߼8қ^V  <[_XǮWMVVhePaxRebZ,\.*Urwr)w}wlQd=JJoz*o ڞ+r9b BXğAǮxfsζah}͝;w!۶捲<96@1L: B{ Vv2 Sšy!j\cm_!1ґGz-xiWpgI FuO=ԜÂU5r!<4Nh4J1K,op,s'_(WP-/H-rG/Zx-SOQ$oUYyyMJd:+3X`dj5K*5tHGFްB,vxO,Uk^i*, !N"B#n5 BX,{̝K=ۋV9昉 |> cy.2mWnrr5a, B!y`B3aǷmfu]K=F͵!qz'V {7s ƹ !T.0NL$OyL K#ߋR)u.ehE&4/μȧURi|q@_͘1ɷ7QaRA!mJꫯR̘''''sɜ!~A뮻vߪncN 8|y^ bzl!ؠ`~sT6^sk|0}iJ@ܫ}>l!?od7A7< (C2yQ E*NST X~i 9T˟7﨣{qo~;_Y yV>r>xMNNNN#ŏq!F3gƌ膣C0Sm4ם:>zv,L8\&Gx^"M~n2UseP)ӧ/z?Q8WZ]{:0A9"⛪0Em~O:7y_gӲbPx`EBYfbb\.?sE#bR v~îx<>wM6% FxWT*7,5zVSҍ Qd% [?H/4`VBƦ91- >󠎛ݨ(('soh:!]oBɌ ԞШA C <Çzh'Z\re2T;;7 x5W#l hcz``'6vތ^>d,+9cj 6!G_ٔ7j/N,Ӽ;8YhtC}o4WVBkb5/ IBX̙3;WU||=aٵyv0<#XH؆ r^{Nj%D3YPlkJR*q_0i{(uilGJ\j(.Әpa/S_oE";\ӄ :T+~Rʥ@7SS_HV}ϴl6YO !LmOH{-xtd_9 aa|& "7lxm~h3g<#g pcF6DaڮRGNWh,FGlEetrAW,Ӵl;f8e6Xc}mKrPATVac/zxJժZ\.bPz∐4R Hl zx\(4 ekR4i$͂m_,#޸ =l+lH8x<F,P_~_wzy5k&- \#G']]qyĶOB>_k8K$_(zI`2H&rydd 9s+DERJ@Vo^qaFً7#)W?#5|RhNW 6[| ٿ^wDm p]֠PDb1Pp=pաVrc#F(~a E]bQMG$4|a4?>gΜNȆ [AWW"_8go],lr2s,SDtT[1 mW*RXAj{D&'bzK!L GBXLW2 =(X7 9Z{KNW:]4xGg\ }6@9I 2܋Bj}(iD:G#]-o~3)kR/R躅*ڡcS,1D+ISkk~\@Xv-3Ԋ+^/0V „&s/X~5D6r 0#0< ZYnrC;g;9(ǒt \:餓@֬^=66֤]LVUe@siQD㳕2tS@[0#b`15~$*3B A_hjcōD] VJ~lY_9s,[ls###7nVUJ;x 9"DsNPL]`\LP{m,s#l-G|F7ȶ7lDi9Ņa"ӝ7b.QOf_>S $z"hA ŏ8{ެrW>Hq=_Z5.]EFT*TǯFظ"W:BK ߜN5-q]t1{jP`mBr|LԖ|/K05Wŵ0˲nuV=pB}ꫯBqTO8R{uaϰ|уştk (UUwئW<d2ʗJ%7]~B4uF{on &h [S_I|7u )ے%Hx"|ߗ뭧~z׵|uW* pFD.?:WUWœ*\~\l6z^V˱r9 "QlZx!-\-Dg5bq<#7aэ^~{9㺫cq_R,FOT8Ja;D S0˝SZ{ bN:Fx:bK˜ 9 ~ٍ*W7wֻOLLLHh✋y+ rʾQPS_X*jR)HTN*ѝ<.1~mCijնmYT,qˇwq߷\.mD}jXxy#9҉uoց7R>Oq A[C{Kv*,JoO<~&]&@v**&ECiS[j2Qz ~Wƛ[$9%"V6A&DN5u.n8clD.R8Q~ nЂ$:*|NDw!k.<pVϟ߭S|%pi'-lI |~|MhY&v⢗w T~K~i0<>H dڔ6}ZAHO9%u Ø;oIZN0'jSZiK$pE$amE'`/~~ >.E;z>Ȉ۴xk^[.Qx@w5-F=\J$)7xǵyCǝ3B y ~S[o!OE;̎]q| $ޛD1ܸRg9,lvԽz`Q@cnRU>b*ee%+:ӿ:CJ-Ns͊_*tpf`7 ťtӻR69 %Cvu \*H۶O8ǠE~D,l&ch,UúF()(~y Ĕ˲ٳg_,Kt h/I6J_SEL$~9S.q[fṉnNTiUt^5̛v h@p-~]@A2 4$Q|gMl9ॶK$drpp.2-XG966F^0@뭚gmo7CevI'ƻlܸGVTFDnZPRԕ:Y|7f y שAvUm2)>F#Є$gCmj6O{}j q+! \]9gyǯt:}[>.0>/23L-]g'~41H'ҿK)'owGcԦx $\j*J5[KR5{b$[ A&bxV0+؋AcRplJ%PFCW* d3CJ+U( \ΧfBǦ]:´D*JӧzqO%Kl}XZU7!! )׸[AP>vy!xYVsx0 ; !A2Hb8PB*O *f|>V R 6&I/ͭهX,"_>x!ݵ}8ӲЊb_*m}}}|dR;-ؚT.}J%tk O?*VGV+jTB}ƅAJY܆PXkh@Vf;ju!1gyV 28.T<찒iǏ[<0 ?) )X1܏NjզZSAf4N+bٯ>s?f*T;a8B ㉄i) "lKmƯx"G*JWĥSbNb&1)jVr\Vqxڰ}a#ࠏ_>~Q 2[.O>iWH>|2`O2Zb10 !?g2'S:faz W>MN Mi-ś_V+ؿD2V/!x68/R.kj4bD\cDy}˚(I\iBVeSJ.\x饗v8\.С\(,v04uctmZ銚:_6m* }}}m Ι;w56l(5"Sd={ůKfwe ZI* "cri vîSUh'# =[OC|anȼН55x#YyCw^!GǶ? MӐNA1;PlL lEȔTJ&Fp6JRfͺK;w׭]Kh.J{G'd=_/^KDt>>>>::~aEvZh3͝ rRI&~aa],r*l6we4ކfExȕ/,BB "jAZ T1"Gd =߇QZЩ)Fq3|," 駟޸qcqֻ6l@98:/9>@V]+, N <4^|QzQi[jw@P\r9w Eu5=B$ 7{#IZeŷ-C @ Tzii lX?PY @bZĂV*GfV+2ر}P(22f=skJ$r("T|KN?vcx<~{իWu])ˋBj/\㏯4Oo ({{{<o]Na4vX 3~|W΄^h:p Ʌ]ҼRiwWvvܛ/N<8pPFKe$DQ+c<#Pe˙3R8Dš?}d>+ڇR7D+ϫR78b<g}qB)4EQ|Oǭ[ TBoubsxoo˹мX/cd{! ҲQKɗ~`<[G9==%&I.C"!3!$bmq+p8^|[SO=u(_~ykkKz;SOoll\ظk|kƴ)ʲF(Z,?ΎUL qʕO}S+_͛{uX6*Y3u `ًe7'ַ6B`$ܠ胗:kgG]ټ+w֖`kY_TR}W9zI/i&i 4uG;䲪(fKzE7 `WՓkׯ]ۼsGd21 ?O/}K'x;6'7bj7kf$cՕ/I6Brf?VmQ_K&u"їTGxt y"FX܈|08 +iYA}Yzlǟ'p[]5N@ȇ۷G;{te/ }N.бҋ/BߟjM?CO>*[now3HۄL(BF~_l+^03b;+(rmo֖c^LTr|`hu?FtZ2ɔ}FLCuGNb HWg~O}'wvv]Q0.X,?}[$IOonnp\BSOO~}kg<?Y;=esrR8s)o0Ҽ[)v0䨳/7 UJHF|S6-vq 'տjӬM$%?f-ƅM4RWvzeYoÏ<$!"_T^kJɶ K_~pAɲ?_套f:_Ln߾e{6ϟ-QG*zW[wڵ7nL'mœx^f]6lr&D}1x,üF쵽ԏ>.x_~EقHA^!oeX55^t;5_xݻymlmmmook=&V(7^I؍K^{Å ׳,{}_B?fH?Gg>Ͽv͛7v>'uh(&#%P6*~lwşm< L<)ymnݭxiȞTnf*%gWRuih4?:bzoݺ[m6 k8@St'8CzG75az.w=smnn/ށ)>>U7oN#=f^d)e5*؃|v=Ѧ$Nr?_`?; K%0Mp,׉^~߭Q,dP9j G+__Z2}Pyoܸ ^t5 8~c=+CXEoܸ[Ybh\KH_7-oy}\UUݼyj/ڵ$Ήut&d Kz`Xe٫$<$BOukKn9ڥW:Z "Huc@vq^VS4M??BzWp{ײQ@Cdi5/~G}'Xi/|͛k2r AxuSO=я~4IӋ ^W^Ѳn2WgwwF0ae łR@I=R}͞"dॄK߰aeVf h~1 e#GiN~*qSQBҊ"Z0lȲ˲C?…4ATJ k?a@/XY#SVu !"Xb4{4|.Kॄˀ|czr0.(լd4t>Z#j}Z'E~7 e\Q0cP{{{5 ;V τ/u^xg}_. |`ts#S>|#կ~%paU| lv֭Gy䱷|`0mi4y-VӭlUWb8SX"צiE.Gp2AAzb}۷Kе蛟dLl^s.9SEva`Eo6yrQR^ɗoUI!WEՒg͐K(]G–,kAOlecIqK.]tiҥx<FQz^/IDe(\/Nv; cp3TU^ PCEw\im7U'3{8CF Puaosxʒ$Fzj2² .{jgJxX?r]v0j3Wh("=7񍍍+W\rҥK66p8Tʍ(r͌&ݻwM1x(LZK|y^\ߪ'alj:Ȃ2ͻASdgņ|/ KRkƒ"EDT2KURP|L&B$$A_"s+({I ,R2h4/TEerxd+{[@d9{_03(X97! ,4ht4n-:1~캑?5LP{*0`v}k~tn2x+ۧa%&1g0'>Uuv ^<K{.h¼N H\υHUIJI5󹖐UUV"/giG4 Օ֓/ŀl6໱_ߐ ':8 :iĿ°̋B/w@De\b1ө.~:*u1euE1XfW..| !F.N|h]TLuq`͢K"-M!S" xJӸQ={/XRÄv2xA2(5IA9!^<,x^a ۽2J O(TIzBʲ*J,y>/tPA/K3=FG<ʲZ9iT] G߄/~ϵ*rа/bkAX3t# Z>E8Fzx2Q{n~$0$Ѓr8`ų &~E"]*gv-oGV>*B2BI/IvF_]pس楲LOBsx{_(g3^ҢP$\IR%fUWeYFQQz(b(n#F=˪, s44 |6|i/by^d 4 @YҪW>!f`}LGTY 4%$`>=_rykcBTlW afdxytx.|cB٨8XK0aO:]Y2z-]}ymՆ 2/ 6yHdO}C# s񇃺[DVűq9Gy^\v=gI"Uс6enVNf9?/:=$~#Wx,sz٪IX0Cy\)s L+k6(hx1 "_>: ̱&/M~~EEIk)R1 *]LE>ce,{/9Ƶe2D1Y(Bl&b tBbX9XS7WYQ|$2,J`ح1;ybɕ{Qf[E+/l,Tn4^X%f/\E&/m_,:  +1]29-̱08ct|J-*ϫ_8ۈͨqoKBF#)eǒ28 T$\'%-tr6+E7)XQRFsd-qnlWo h_jW  ") zn߾}G?р~ez8ƾ-W_}a2\?!tR p'}]y$:d`Wx]6/U~:cd0A|$fTy8 ^w)rAWbg=?z+gQ 2apؒu$J*˪43Pd\#ԧuE`?xQ:x~9P_0ߡVe$0%lnn>3/_T:B0{~I/ʢd:E܍a^Ht_)Kw A/S±˴ }DcK/ya^8n(|UjR=4a^ۮTTڅ{x={_>(bՒCݾ9cTLҴJSɲh:-b6x2׼8T|]rQ1pK(P+ d1}aGd0P;\Uڣ fތg+p^Ӛ\.2/5*G`v3/B(2!x 1 [3F2TI\@8]P3üx&r!O w;&5@VVq-sGO<ӏVKHf\_Q;9$'׳/ EIGx0RE3Cj;S͠y{; L̒.;<:b9?( abN ?q;?y ˟xS)vX%ǒboH+ƜŀuFoa3k`t+//]7j/AS>~d>\ aΚJhUO=OQ_:yFw9+yvv~R`hf̰ ; ~`T}M`^_ȍ! RdK(G.:jbo* ^`^⫋.Cެs>}󮖦cStw%Bfs+<}3]cŕ<8vn`(  HLԙp͟Ȣ9;5jDz-&Cj2 j-  M5DZ"ԃvT^ZBz*W3r߬#}4;s;}S nQ򰅾)~ ʠvQ! <_'07sLĘ)9ݓ44inzo쑀 Nd:Ɲ~ֻ)*/㮟㗇ŢBbcWʼKE] ÝE T'="\Iy>QboeDDҬZ,dmНQ L0eJCAًN-c=j`FOE KO†^ E.ڗ Riqk+ؠr`T{><sh9?K t"f;+W׳!l8A_z}IɲVj~nv1123Q{\_A#+1ʪ<-lȖi>1lD0Fq(D|'*\>ryբ\̹.It`ӜրCSC9=X)Vs61VOR\q@vA}]?ѯ1&2F0\ [[d';Ո=pW#veܾBriׅ/f" 14#NY+^$(/||:VwJn"\|7\pE 6!bc46lbWo{yS?q͗=V!0ń+kObu пqb ءqiz.HùЊKE ]kp{‘ _ 8-oG7ti"I*IJ YJ?Ob3mlPO¤tpF7^G[ׂ=]TuUͬ50r1+fankabC8ׄ*G-nIy\p_g%E V(pq[Y*2H$ '-Lϙ,沨#wyIIMjxqL_ME12y#Ǽb }ef{,k t*Ӄ&A12}}Oͩ eZU?q|j.a̼Ź4l6Xea?(q넩~KTI N;exYI-R4B. %@:(q>D16N%@HS b)0*|~( [ f pՕqd~=TSRB,DYzxƬ(Y.o/iNX#863:7Q!.Q||Y]s[$@[T %l4|f벴 }c߹O+bz֖$q8]θCq"".,W",BzY]+P3*) I&z><Ldʱ$]N+="1h}oޔTAOiԥo3N AOz}7?kCY)t⨩^%Ⱦy>p.-*fԜ o,o12z4A/AKtGY'g ъ6K׌^EJ(`XUt+%4=7|tn)[St?6d3;zˠTUQcT321ZAg|K7'pPJ2V#*Dߜ$z@S}_DDy|nKAՃo27TK%Ո=Øg9hh}1 E-? k ,+娂ޒiX%U`^Wej~w,f*lv31N(U=>lcj9~^(*UϭS1eX*f2c 3ʽ3CKұ}N rD3MjЉ@_{-x b_ߛTe`/o\D8 ůM ~3]sUyb8A1M%ܮTRj8D2sZ|7!vٟ_J,uP| +@ 68*Љ-jqnN )c1Nk/*N fS"S a./&g6!uQԌTMbFb~]"|%Y"P`^H)3h'w{ߨ5QbAL^bCՌi`'""ԓ ]~X;&|Xy X+_QLnFWJ_Q8 3vyM5*Y(N D:o1TeI.ڰ'jw#UvFmyaSԬ/q.? R;/LE#AEʹMI6lpn6nڡJt9[. F8RJ|2ak_˖@X|he w],&MP$rK&JojʎU3<2ZhҌ2S^Lq [kzӰlg 0ϛfg=Ix^C VȈDcU1`NIx“ǶlJ9*_ۣVQ^Ah&lozA ÷`pV^d,P_.Ưb!̐/h# im*b1㻢Fryzp+?sSr(r1 7M*ܲ6 U8tםDMv7vdESw7րƯ s&Kx'3xDM Z#5f2N-&P^Cƕsڴ5ZlJ"*K!TAzF}wM*,<ėӈp*S Xh*/Be>N~{tl/Af>c5@{yk&r ڹŶ*\a0@ x3gR,1cXkPLK41>  3ŠXmK)nċڊ{T$ C\3c`?f|r"IF5~tKQLaz0[&R\E+RQB|s1 ~ F3Oڂ}ψRъ55~=f- oYBpg݊<%خ`4>u}5$iYkZ ,I2(Di>&QCג&FP22&3/3?ӟ?^lj@MuKZ~FeG||AP^-c+,|,3zh`X8Mj&[M Tp toZ_M zsy5D+15~3̦0惑OXQѵaDBIA<+VyiRo~4_`|eeN./ $xGIQ`E?ɓm3J%[kZDכKqtؒxוXc}>Xc}>Xz`d8䃣Gq%V&hG <5;y&ě 2 aр,Jr|06#08]&6C)v ssQp:\B!)"#c4k4B)8WV/,87ܼ G(ew/c[,^_l6+D$ <^pBW7]]xhr1U*"4ZÙGdJ 55 9e68hZ I[-Y߯-Tk[ *ϜArǃq%Tg|#&ɘN[[yqĆ ΘV~?G6n$u t4Yˌ^<, :;DV<*D-Z`P&cΞ;UtvN m0EHNYN}8UDtZp' ̚pPb2/* NfZOf3bcbMKC- ͼ\ZJo[["YX,ovUWW uә/V뫛6mj$Iܹ^866t: !TIK$|q?y_דP%I 5HKCCl4$>^=>0f*Gއnibb"!!!O>}سo߾L._|QS[[/s=jSoԚxBR-* Zىw=gRB)(Ry `4DIDmm`xsZNVV/rsse˖me`p$EgnF>uEϛ7[tDVU!:;d7ܙ"Tcj 19ꮪ:jժ Fy@YAL>2)J˗l©l%IBVkzz(jiA|B 3Z,#145!z{) ĉ"55w;?>7n|h4ӧf^0>>(@*2JEt`pky==tu!UNDZc$}jHG**ַmeGh膆.^ۇ~8\1 xxݽJO=TȢEVL.[`+s2T !RVK>S v`& yƜMg2'$23wv/2{'eeWvر%<<=WFJʪL ~{?!/M&@ _an'񈧟~4???tN9!Ĺs,#xE֭/+CG_D9%!0ؼbD쀍 =v쳿hZrrrٍ֨ީ;^b)1C{\`VRfl2ؘ͠kUu+رc/2rrrTO>|zmgCN'555>;[V*,$l8hhjO1d+FC Ktr9G\.E}}=---Qvd:zzz;;;_())ߟTW$Ip8Ll\`0Nqq1ݴwt<Ҿ܌$}7?NOJIm8Uyv~kꅁJc<6>v+hl2^ϒ$Iv+++VJ ƫ񪪪*^~vk?#իeee7L梚;og㢅fx?z_P@^!KO'OMMlcqk^z򤤤+++wܶZYNYEQ񠉈N%IKKŋ/E1Z&׋u|@ T*t!!ZXϜfL%9(}MMpŋ<Û>׳)nSƼ|~/oJt"" *ڠ.vrY".nS^(EFBF6DsyQVv%T J8N{+V׳(,P25+$ s1lgFFԗ7@OZIENDB`xqf-1.0.5/pixmaps/Makefile.am0000644002404400000620000000034210201207130012726 00000000000000SUBDIRS = flags trayicon EXTRA_DIST = $(pixmap_DATA) $(desktopicon_DATA) pixmapdir = $(pkgdatadir)/default pixmap_DATA = splash.png xqf_48x48.png desktopicondir = $(datadir)/pixmaps desktopicon_DATA = $(wildcard xqf_*.png) xqf-1.0.5/pixmaps/Makefile.in0000644002404400000620000004261710523105434012765 00000000000000# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = pixmaps DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/src/gnuconfig.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-exec-recursive install-info-recursive \ install-recursive installcheck-recursive installdirs-recursive \ pdf-recursive ps-recursive uninstall-info-recursive \ uninstall-recursive am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(desktopicondir)" \ "$(DESTDIR)$(pixmapdir)" desktopiconDATA_INSTALL = $(INSTALL_DATA) pixmapDATA_INSTALL = $(INSTALL_DATA) DATA = $(desktopicon_DATA) $(pixmap_DATA) ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_XQFRCON_FALSE = @BUILD_XQFRCON_FALSE@ BUILD_XQFRCON_TRUE = @BUILD_XQFRCON_TRUE@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COMPRESSION = @COMPRESSION@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEBUG = @DEBUG@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DUMMY_LIBGDKPIXBUF_FALSE = @DUMMY_LIBGDKPIXBUF_FALSE@ DUMMY_LIBGDKPIXBUF_ORIG = @DUMMY_LIBGDKPIXBUF_ORIG@ DUMMY_LIBGDKPIXBUF_SONAME = @DUMMY_LIBGDKPIXBUF_SONAME@ DUMMY_LIBGDKPIXBUF_TRUE = @DUMMY_LIBGDKPIXBUF_TRUE@ DUMMY_LIBGEOIP_FALSE = @DUMMY_LIBGEOIP_FALSE@ DUMMY_LIBGEOIP_ORIG = @DUMMY_LIBGEOIP_ORIG@ DUMMY_LIBGEOIP_SONAME = @DUMMY_LIBGEOIP_SONAME@ DUMMY_LIBGEOIP_TRUE = @DUMMY_LIBGEOIP_TRUE@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GDK_PIXBUF_CFLAGS = @GDK_PIXBUF_CFLAGS@ GDK_PIXBUF_CONFIG = @GDK_PIXBUF_CONFIG@ GDK_PIXBUF_LIBS = @GDK_PIXBUF_LIBS@ GEOIP_LIB = @GEOIP_LIB@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_CONFIG = @GLIB_CONFIG@ GLIB_LIBS = @GLIB_LIBS@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_CONFIG = @GTK_CONFIG@ GTK_LIBS = @GTK_LIBS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@ INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@ INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_ICONV = @INTLTOOL_ICONV@ INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@ INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_MSGFMT = @INTLTOOL_MSGFMT@ INTLTOOL_MSGMERGE = @INTLTOOL_MSGMERGE@ INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@ INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@ INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@ INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@ INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@ INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@ INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@ INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@ INTLTOOL_XGETTEXT = @INTLTOOL_XGETTEXT@ INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@ INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MSGFMT = @MSGFMT@ OBJEXT = @OBJEXT@ OLD_GTK_SUPPORT = @OLD_GTK_SUPPORT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_CFLAGS = @PACKAGE_CFLAGS@ PACKAGE_LIBS = @PACKAGE_LIBS@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ QSTATEXEC = @QSTATEXEC@ RANLIB = @RANLIB@ RELEASE = @RELEASE@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ XQFRCON_LIBS = @XQFRCON_LIBS@ ac_ct_CC = @ac_ct_CC@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ datadir = @datadir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ SUBDIRS = flags trayicon EXTRA_DIST = $(pixmap_DATA) $(desktopicon_DATA) pixmapdir = $(pkgdatadir)/default pixmap_DATA = splash.png xqf_48x48.png desktopicondir = $(datadir)/pixmaps desktopicon_DATA = $(wildcard xqf_*.png) all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu pixmaps/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu pixmaps/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh uninstall-info-am: install-desktopiconDATA: $(desktopicon_DATA) @$(NORMAL_INSTALL) test -z "$(desktopicondir)" || $(mkdir_p) "$(DESTDIR)$(desktopicondir)" @list='$(desktopicon_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(desktopiconDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(desktopicondir)/$$f'"; \ $(desktopiconDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(desktopicondir)/$$f"; \ done uninstall-desktopiconDATA: @$(NORMAL_UNINSTALL) @list='$(desktopicon_DATA)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(desktopicondir)/$$f'"; \ rm -f "$(DESTDIR)$(desktopicondir)/$$f"; \ done install-pixmapDATA: $(pixmap_DATA) @$(NORMAL_INSTALL) test -z "$(pixmapdir)" || $(mkdir_p) "$(DESTDIR)$(pixmapdir)" @list='$(pixmap_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(pixmapDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pixmapdir)/$$f'"; \ $(pixmapDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pixmapdir)/$$f"; \ done uninstall-pixmapDATA: @$(NORMAL_UNINSTALL) @list='$(pixmap_DATA)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(pixmapdir)/$$f'"; \ rm -f "$(DESTDIR)$(pixmapdir)/$$f"; \ done # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" mostlyclean-recursive clean-recursive distclean-recursive \ maintainer-clean-recursive: @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(mkdir_p) "$(distdir)/$$subdir" \ || exit 1; \ distdir=`$(am__cd) $(distdir) && pwd`; \ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$top_distdir" \ distdir="$$distdir/$$subdir" \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile $(DATA) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(desktopicondir)" "$(DESTDIR)$(pixmapdir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-desktopiconDATA install-pixmapDATA install-exec-am: install-info: install-info-recursive install-man: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-desktopiconDATA uninstall-info-am \ uninstall-pixmapDATA uninstall-info: uninstall-info-recursive .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \ clean clean-generic clean-recursive ctags ctags-recursive \ distclean distclean-generic distclean-recursive distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-data install-data-am \ install-desktopiconDATA install-exec install-exec-am \ install-info install-info-am install-man install-pixmapDATA \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ maintainer-clean-recursive mostlyclean mostlyclean-generic \ mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am uninstall-desktopiconDATA \ uninstall-info-am uninstall-pixmapDATA # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xqf-1.0.5/pixmaps/xqf_22x22.png0000644002404400000620000000257007746756414013104 00000000000000PNG  IHDRĴl;bKGD pHYs  ~tIME 0 IDATxڝ}LWL^AP/EHd0.Dd~PfpeYlƘjh} 8t́sBU>[Rg|ږ! nnOr{9yr=~kFDn.I}}EAG'Xe?Cܼ؎|Z`f=#Ȉ~N@uFzzP?bVb.]b@QhHz:;Џ8ze_cӃO2bCK8u|7_luggg˒%K\n{(**++;RPPvo%i|XR6b>SdiLYEYYY,ˣb:\.gŋUZۈ#|M&jt:O999$I0̈́tȲ~U\.DF,X`b4RԄ'8/_3gHٸ PWWWg…M WX,T*s-I!t7N¢(īxx:mp{J%ӧ(̙3޽[zSTDnT ;qeyxhH~%, !PEǎ˟r{nobrS9j'1+7TOZ[[m555^^g4* 1t:IeE xX FڨT8Y߬ckk5u ߵ1L+:G43G>Z^?bzmBs(:t"TXHO5Y;w,,,_HЦaE}S$'3=0{{_ӽ u:x|}҈0c;:دsdտH`}f-1Mp?LIENDB`xqf-1.0.5/ChangeLog0000644002404400000620000022222110523106420010774 00000000000000Nov 04, 2006: Ludwig Nussel - release 1.0.5 Oct 28, 2006: Jordi Mallach - fix Polish and reenable Oct 28, 2006: - update qstat.cfg from qstat - disable Polish translation, file is broken - add Warsow master protocol version 8 - update docu Oct 26, 2006: Jordi Mallach - add Polish translation by Miłosz Kosobucki - updated Catalan translation - tweaks to desktop file Jun 18, 2006: - split Half-Life support into old and new version - fix saving of Half-Life player information - allow to also delete servers that are not in the Favorites list - display Warsow team colors (suggested by Tomasz Kalkosiński) - fix compilation of stand alone rcon tool (patch by O. Sezer) - filter QuakeWorld namefun characters in rcon (patch by Jorge Hodge) Apr 08, 2006: - Tremulous support - don't pass -steam option to hl2 - strip newline when reading the doom3 version file Jan 05, 2006: - fix cursor navigation in server list (thanks Simon Philips) Jan 04, 2006: - add -Wl,--export-dynamic to LDFLAGS as xqf relies on it Jan 03, 2006: - add TC:E game types (patch by Steffen Pankratz) - remove AMS from qstat.cfg, it's native now Dec 28, 2005: - add CoD protocol 6 Dec 25, 2005: - allow to copy server info values Dec 13, 2005: - add new armyops master server Nov 19, 2005: - fix SOF2 query (thanks to Wiesław Młynarski for reporting) Nov 12, 2005: - clean up code duplication in pref.c - add support for warsow level shots Nov 01, 2005: - add gslist Q4 master - initial Warsow support, partially broken Oct 27, 2005: - unescape Q4 clan tags (thanks Gonzalo Nemmi for reporting) Oct 26, 2005: - make "Show only configured games" button reappear - require qstat 2.10 Oct 23, 2005: - fix Q4 rcon - change Q4 main mod to q4base - set rcon password correctly when launching Q4 - version 1.0.4.1 Oct 20, 2005: - release 1.0.4 Oct 18, 2005: - use Q4 clan name if it exists Oct 17, 2005: - add x86_64 to statistics page - fix Q4 master server protocol prefs Oct 09, 2005: - update NEWS - show anti-cheat icon for Doom3 and Quake4 (thanks Timothee Besset for reporting) - try to support Quake4 map previews Oct 07, 2005: - initial Quake4 support (thanks to Timothee Besset for providing the necessary info) Sep 20, 2005: Jordi Mallach - update Catalan transaltion Sep 13, 2005: - get rid of libtool - set version to 1.0.3.1 - another attempt to finally fix gensyms.pl Sep 12, 2005: - fix integer overflow in TGA loader Sep 09, 2005: - fix some typos in German translation Sep 07, 2005: Ludwig Nussel - docu update and master server cleanup by Steffen Pankratz Aug 23, 2005: Ludwig Nussel - fix redial dialog not honoring private clients (reported by Julien Langer) Aug 20, 2005: Ludwig Nussel - fix gamespy and descent exec functions (reported by Steffen Pankratz) Aug 14, 2005: Ludwig Nussel - fix saving of server filters (reported by Steffen Pankratz) Aug 07, 2005: Ludwig Nussel - add script install button - add multiple sort modes per column (#1253101) - fix compiler warnings - add delete button for quickfilter - update German translation Aug 01, 2005: Ludwig Nussel - add demo script Jul 03, 2005: Ludwig Nussel - add support for plugin scripts Jun 04, 2005: Ludwig Nussel - move generic code for running a program into util.c - Nexuiz support - check for q3 based gametypes before parsing the server info Jun 01, 2005: Ludwig Nussel - add doom3 protocol 1.40 to menu (Steffen Pankratz) Apr 29, 2005: Ludwig Nussel - honor setting to ignore bots when copying server info to clipboard Apr 15, 2005: Ludwig Nussel - add q3a Excessive Plus gametypes (patch by Jason Santos) Apr 04, 2005: Ludwig Nussel - add finish translation by Sami Laitinen Mar 24, 2005: Ludwig Nussel - use separate server type for ut2004 - add epic's second ut2004 master Mar 22, 2005: Ludwig Nussel - change default ET protocol to 84, fix qstat.cfg Mar 06, 2005: Ludwig Nussel - update NEWS file for 1.0.3 Feb 22, 2005: Ludwig Nussel - fix ut2k4 and doom3 master query not working after starting xqf Feb 20, 2005: Ludwig Nussel - fix logic for applying colors Feb 19, 2005: Ludwig Nussel - use GTK2 colors and Raleigh theme by default in GTK1 version - update German translation - reorder some structs to reduce size Feb 18, 2005: Ludwig Nussel - fix use of wrong server type when adding servers (#1143801, thanks roerich and kracho for helping to debug this) Feb 05, 2005: Ludwig Nussel - make all icons themeable - make yellow man actually yellow instead of green Feb 04, 2005: Ludwig Nussel - add --nomapscan option - add ET Gslist master - mark q3 servers with protocol different from master as incompatible Feb 03, 2005: Ludwig Nussel - update Danish translation (Morten Brix Pedersen) Jan 30, 2005: Ludwig Nussel - remove quakeforge specials - remove no longer needed ssam notes - fix saving of quake2 passwords (#1112381) Jan 25, 2005: Ludwig Nussel - Halflife2 support (untested) Jan 21, 2005: Ludwig Nussel - highly experimental: optionally use DT_AUXILIARY stub libraries to not depend on libGeoIP and libgdk_pixbuf at runtime Jan 12, 2005: Ludwig Nussel - split get_new_defaults into game specific functions - fix doom3 protocol detection (#1092165) Jan 11, 2005: Ludwig Nussel - Fix crashes due to wrong return type of callbacks (#1098910, patch by Jochen Baier) - fix q1/qw/q2 skin list update Dec 23, 2004: Ludwig Nussel - don't try to scan home directories for maps if the directory doesn't exist (reported by Steffen Pankratz) Dec 22, 2004: Ludwig Nussel - prepare for 1.0.2 - set TF_U2_NAMES qstat flag for armyops - require qstat 2.7 Dec 19, 2004: Ludwig Nussel - manpage corrections - add Netpanzer master Nov 26, 2004: Ludwig Nussel - add gslist master for UT, remove Epic one - updates for 1.0.1 Nov 22, 2004: Ludwig Nussel - update German translation because of typo - set window type of splash screen in gtk2 version Nov 22, 2004: Jordi Mallach - fix typo: Soure -> Source - Update Catalan and Spanish translations Nov 21, 2004: Ludwig Nussel - fix compatability issues with gcc 2.95 - remove unneeded tray icon animation frames Nov 17, 2004: Ludwig Nussel - Use non-blocking socket for rcon - Add small timeout to catch replies with multiple packets in xqf-rcon - Make xqf-recon optionally read the rcon passwort from the environment variable XQF_RCON_PASSWORD - Honor osmask of Doom3 servers and check for Linux support (suggested by TTimo) - update German translation Nov 13, 2004: Ludwig Nussel - update German translation - add wolfmp as main mod of rtcw (reportet by Ruediger Meier) Nov 11, 2004: Ludwig Nussel - add options for qstat source ip and port range (feature #1034631) Nov 06, 2004: Ludwig Nussel - open splash screen with progress bar when clicking the "scan now" button Nov 01, 2004: Ludwig Nussel - add country statistics - use an empty flag for countries without flag for proper alignment - add "clear servers" menu item for master servers - delete HL WON servers as they are switched off Oct 17, 2004: Ludwig Nussel - UT2004 master server support, needs qstat from CVS Oct 14, 2004: Ludwig Nussel - add descent3 server listing from d3.descent.cx. Thanks Esa for providing a format suitable for XQF! Oct 10, 2004: Ludwig Nussel - Show UT200[34] mutators as tree like dmflags - Add gslist master for RTCW Oct 09, 2004: Ludwig Nussel - Descent3: use Gamespy protocol instead of PXO protocol, remove no longer working masters, use custom launch function (uses --directip), fix saving of player info Oct 04, 2004: Ludwig Nussel - fix segfault at doom3 version detection (reported by Steffen Pankratz) Oct 02, 2004: Ludwig Nussel - automatically detect the doom3 network protocol version - add support for Netpanzer (> 0.1.6). Thanks Matze Braun for the patch. Sep 26, 2004: Ludwig Nussel - add support for gslist. Thanks to Luigi Auriemma for making this possible! - drop broken master servers, add some new ones for quake2 - update German translation - version 1.0.0.2 Sep 12, 2004: Ludwig Nussel - Fix UT99 master server listing - Allow to completely overwrite the qstat master argument via config file Aug 22, 2004: Ludwig Nussel - Set default master protocol version for COD to 5 Aug 18, 2004: Ludwig Nussel - Apply brightness correction to mapshots Aug 17, 2004: Ludwig Nussel - Fix usage of AC_ARG_ENABLE (#1010440). Thanks Mike Frysinger for reporting. Aug 16, 2004: Ludwig Nussel - Fix quickfilter not working when pressing backspace or delete in the empty textentry (thanks Ruediger Meier for spotting this one). - add new tray icons from Jochen Baier - set version to 1.0.0.1 Aug 15, 2004: Ludwig Nussel - Fix compile with gcc 2.95 (patch by Thomas Zajic) - Fix --add when one server without type is specified whose port matches exactly one game. Aug 15, 2004: Ludwig Nussel - released 1.0 Aug 14, 2004: Ludwig Nussel - Use TGA loader from quake2 if gdk-pixbuf fails to load a mapshot. Useful for at least Q3, RTCW, ET and Doom3 mapshots. - require qstat version 2.6 Aug 13, 2004: Jordi Mallach - update Catalan and Spanish translations - fix Makevar so intltool works ok - remove updateonepo, use intltool-update instead. Aug 13, 2004: Ludwig Nussel - Doom 3 rcon support Aug 12, 2004: Ludwig Nussel - properly detect installed Doom 3 maps. No preview though since gdk-pixbuf doesn't support the TGA format used by id :-( Aug 09, 2004: Ludwig Nussel - remove some obsolete stuff from docu, update list of supported games Aug 07, 2004: Ludwig Nussel - initial Doom 3 support Aug 01, 2004: Ludwig Nussel - support multiple words in quick filter (AND) - update German translation Jul 24, 2004: Ludwig Nussel - new feature: quick filter Jul 18, 2004: Ludwig Nussel - do not set fs_game if mod is a 'main mod' Jul 14, 2004: Ludwig Nussel - fix NULL pointer dereference when sorting rule/value columns with subtress (#990692) Jul 13, 2004: Ludwig Nussel - update German translation Jul 12, 2004: Jordi Mallach - update Catalan translation. Jul 04, 2004: Ludwig Nussel - rename xml tags suggest_commands -> command, main_mods -> main_mod - make command a NULL terminated string list - clean up some file dialog handling - fix sound test button not playing sound before pressing ok Jun 28, 2004: Ludwig Nussel - make Copy and Copy+ menu items also copy to CLIPBOARD instead of only PRIMARY to allow paste via Ctrl-v Jun 19, 2004: Ludwig Nussel - use separate types for ET and RTCW so update from master doesn't throw away all servers. Today's qstat cvs version required. - add gametypes for World of Padman Q3A mod - add support for Jedi Academy (wine game, patch by Steffen Pankratz) - add an animated tray icon for the GTK2 version (patch by Jochen Baier) Jun 06, 2004: Ludwig Nussel - update Danish translation (Morten Brix Pedersen) Jun 01, 2004: Ludwig Nussel - add support for Americas Army 2.1. Still no master, old version no longer supported, requires recent qstat from cvs (gs2 protocol) May 29, 2004: Ludwig Nussel - add AlienSwarm custom arguments for UT2004, also specify separate log file for each mod (patch by Andreas Schneider) May 24, 2004: Ludwig Nussel - add Troopers custom arguments for UT2004 (patch by Andreas Schneider) May 23, 2004: Ludwig Nussel - enable custom args for all games - add RedOrchestra custom arguments for UT2004 May 16, 2004: Ludwig Nussel - replace no longer working Tribes2 master server addresses with current ones (#954570) May 09, 2004: Ludwig Nussel - create LaunchInfo.txt by default - when suggesting a command, don't add full path (since it will be found in $PATH anyway) - clean up resolve_path. Let it do path and tilde expansion and don't suggest directories in $PATH. - fix some minor memory leaks - export the variables XQF_SERVER_NAME, XQF_SERVER_MAP, XQF_SERVER_HOSTNAME and XQF_SERVER_GAME when launching a game (suggested by Ruediger Meier) - don't inherit some tags from base game, e.g. suggested commands - use steam1.steampowered.com and steam2.steampowered.com as steam master May 08, 2004: Ludwig Nussel - support for Half-Life steam master. Nasty hack, hopefully doesn't break other stuff. - set anti-cheat flag for VAC (secure != 0) - increase version to 0.9.14.1 - redial also when only private slots are free and no password is set (suggested by John Stotler) - default_home and main_mods (e.g. baseq3) tags in games.xml - support custom config in all Q3A based games (suggested by Ruediger Meier) - fix fs_game for RTCW, offer it for ET (reported by Ruediger Meier) Mar 30, 2004: Jordi Mallach - add Russian translation by Dan Korostelev . Mar 22, 2004: Jordi Mallach - fix clean rule in toplevel Makefile.am. Mar 21, 2004: Ludwig Nussel - released 0.9.14 Mar 20, 2004: Ludwig Nussel - load GeoIP.dat from location specified in environment variable xqf_GEOIPDAT Mar 16, 2004: Jordi Mallach - update Catalan and Spanish translations. Mar 14, 2004: Ludwig Nussel - redesign about dialog to include logo - unify summary in .desktop and .spec file - change version to 0.9.13.2 Feb 17, 2004: Ludwig Nussel - add LAN master for ut2004 - detect whether a server is ut2003 or ut2004 - update ut2004 icon Feb 16, 2004: Ludwig Nussel - don't unset game if it's baseq3 to be able to filter for it Feb 14, 2004: Ludwig Nussel - also check GamePassword rule which is used by UT2004 - add multiplay.co.uk server listing Feb 13, 2004: Ludwig Nussel - move suggest_commands into xml file - add support for UT2004. Someone please tell me a master server for it! Feb 09, 2004: Ludwig Nussel - introduce GAME_ADMIN which allows to enter an rcon password without actually supporting rcon - fix launching savage with password, support rcon password. Thanks Andreas Schneider for reporting. Feb 08, 2004: Ludwig Nussel - allow tga as q3 mapshot Feb 02, 2004: Jordi Mallach - switch to intltoolize - add desktop file for GNOME and KDE - update Catalan translation Jan 17, 2004: Ludwig Nussel - add g_gear flags of Urban Terror 3.2 Jan 15, 2004: Ludwig Nussel - Update danish translation (Morten Brix Pedersen) - Update german translation Jan 14, 2004: Ludwig Nussel - fix GTK2 application icon Jan 12, 2004: Ludwig Nussel - add support for BF1942 (wine game). Uses EYE protocol, no official master, LAN browsing doesn't work. - load game icons by name via dlsym to reduce number of c&p operations when adding new games - renamed "pix" tag in xml to "icon" - use config_is_valid_generic for ET Jan 08, 2004: Ludwig Nussel - move struct games into games.c which is now generated from games.xml by gamesxml2c - don't pass tribes2 name if empty - add --dontlaunch parameter for internal use - add exec function to hexenworld (anyone ever played that game??) - make sof2 master protcol configurable - support password on savage servers. Thanks Andreas Schneider for reporting. Jan 07, 2004: Ludwig Nussel - check props pointer before dereferencing it ... Jan 05, 2004: Ludwig Nussel - added comment and "this server sucks" properties for servers Jan 02, 2004: Ludwig Nussel - add lan masters per default - fix lan browsing for Americas Army Jan 01, 2004: Ludwig Nussel - remove multiplay.co.uk AA master - fix some function prototypes - --add command line option to just add a server to favorites without launching a game Dec 27, 2003: Ludwig Nussel - added support for postal2, no master. Dec 18, 2003: Ludwig Nussel - fix LAN browsing. Only worked by luck. Dec 15, 2003: Ludwig Nussel - fix crash caused by wrong reference counting of uservers - use mkstemp instead of pid based temporary file to avoid symlink attacks Dec 14, 2003: Ludwig Nussel - --launch now guesses the type from the port if only one argument is given. If not enough information is given (no type, no port) it will prompt the user to choose the type. This way, it should be possible to use --launch now e.g. from within IRC clients where you don't know the type before. - add second argument to add_server_dialog() to preset the address - make combo_set_vals() work with empty str argument Dec 02, 2003: Ludwig Nussel - convert server names from iso-8859-1 to UTF-8 if needed Nov 30, 2003: Ludwig Nussel - new function create_server_type_menu creates a GtkOptionMenu with all games - modify statistics dialog to make it smaller, scollbars - remember size of statistics window - disable resize grip of status bars in gtk2 Nov 29, 2003: Ludwig Nussel - move help menu item to the left - pack games list in preferences into a scrolled window Nov 28, 2003: Ludwig Nussel - split up load_pixmap in load_pixmap, load_pixmap_as_pixmap and load_pixmap_as_pixbuf - set minimize icon as suggested by Jordi (someone know how to make this work properly with windowmaker?) - work around gcc complaining about %c in strftime Nov 27, 2003: Alex - Changed version to 0.9.13.1 Nov 24, 2003: Ludwig Nussel - released 0.9.13 Nov 24, 2003: Jordi Mallach - update Spanish translation Nov 23, 2003: Ludwig Nussel - remove the static option again, would link everything static *sigh* - update docu, use mozilla function for table of contents Nov 22, 2003: Ludwig Nussel - link GeoIP statically when using ./configure --enable-geoip=static - fix wrong function argument in rcon.c Nov 19, 2003: Ludwig Nussel - allow data and localedir to be overridden via environment variables Nov 18, 2003: Ludwig Nussel - add Call of Duty master from Activision Nov 16, 2003: Jordi Mallach - update Catalan translation Nov 16, 2003: Ludwig Nussel - update german translation - add custom arguments for FragOps UT2 mod Nov 16, 2003: Alex - Added Luca Camillo to the help about screen for submitted logos Nov 09, 2003: Ludwig Nussel - add support for Call of Duty (wine, no official master) - update docu - remove useless gamespy game listings - add note that the savage script has to be modified (needs translation) - update german translation Nov 06, 2003: Ludwig Nussel - update docu Nov 01, 2003: Ludwig Nussel - add custom arguments for Death Ball UT2003 mod - use case insensitive compare for password in ut&co Oct 30, 2003: Ludwig Nussel - move definition of PACKAGE_DATA_DIR to Makefile.am as recommended in autoconf docu Oct 29, 2003: Ludwig Nussel - additional gametypes for RTCW and ET mods. Thanks Ben Winslow for the patch Oct 28, 2003: Jordi Mallach - move list of supported languages to po/LINGUAS. Oct 26, 2003: Ludwig Nussel - added kde flag icons - new splash screen and desktop icons from Luca Camillo - new directory layout Oct 25, 2003: Ludwig Nussel - remove gettext stuff from repository. Instead autogen.sh will run gettextize to create the necessary files - fix alpha threshold when rendering flag icons - add GTK2 patch from Jochen Baier Oct 23, 2003: Alex - Replaced French translation with new fr.po from Michel Briand Oct 22, 2003: Alex - Updated Danish translation with diff file from Morten Brix Pedersen (again) Oct 19, 2003: Alex - Updated Danish translation with diff file from Morten Brix Pedersen Oct 19, 2003: Jordi Mallach - disable the QuakeForge HexenWorld master server while it gets fixed Oct 18, 2003: Ludwig Nussel - update german translation - run msgfmt -c in po/updateonepo Oct 16, 2003: Ludwig Nussel - display players on savage servers Oct 14, 2003: Ludwig Nussel - added some server listings from multiplay.co.uk, especially MOHAA. Thanks Steve Hartland of multiplay.co.uk for making this possible! - wget uses XQF/version as user-agent now - for savage support, you need Steve Hartland's qstat from ftp://ftp.multiplay.co.uk/pub/apps/qstat/. Please note that the 'savage' script of the savage demo is broken, you need to put "$@" after savage.bin in line five if you want to join any game. - show g_gametypestring for Medal of Honor - increase version number to make new masters show up Oct 13, 2003: Ludwig Nussel - savage support, finally Oct 11, 2003: Ludwig Nussel - rework qstat version parser to be able to deal with any amount of data Oct 08, 2003: Ludwig Nussel - stub functions for savage Oct 06, 2003: Jordi Mallach - remove non-ASCII character from source, which broke gettext 0.12. - update QuakeForge's HexenWorld port. - update Catalan translation. Oct 05, 2003: Ludwig Nussel - add twilight to q1 and qw command suggestion - add checkbox to be able to also filter countries without icon Sep 14, 2003: Ludwig Nussel - load flag icons from /usr/(local/)share/flags/default - scripts docs/copykdeflags and docs/convertmaxmindflags for copying kde or maxmind flags for use with xqf Sep 12, 2003: Ludwig Nussel - add ET protocol 83 for version 2.56 Aug 26, 2003: Ludwig Nussel - fix medal of honor to not check for q3a files (#795017) Aug 21, 2003: Ludwig Nussel - replace strings by ints in country filter (Jochen Baier) - add support for Medal of Honor Aug 17, 2003: Ludwig Nussel - patch from Jochen Baier * icon for LAN servers * new GeoIP server filter GUI Aug 14, 2003: Ludwig Nussel - detect cheating-death on halflife-servers - set variable XQF_SERVER_ANTICHEAT before launching a game when the server requires some anti-cheat software - split up stat_next() function to make it more readable Aug 10, 2003: Ludwig Nussel - use getopt for command line parameters - add --launch parameter, syntax subject to modification - add gametypes and voteflags for Urban Terror 3 Aug 03, 2003: Ludwig Nussel - Fix default ping value when reading server filters Jul 27, 2003: Ludwig Nussel - Support for America's Army. Thanks Florian Riepler for the patch. Jul 25, 2003: Ludwig Nussel - Fix default ET protocol, now 82. Thanks cjay for not reporting ;-) Jun 30, 2003: Alex - Replaced fr.po with updated version from Francois Perichon Jun 24, 2003: Ludwig Nussel - fix variable declaration to work with older gcc Jun 19, 2003: Ludwig Nussel - Option to stop current song in XMMS when launching a game - Option to resolve hostnames on update. This way it is possible to display hostnames even if they are not automatically resolved. Show hostnames is now default on, resolve hostnames off. - Merge GeoIP branch - Ability to directly join ut2k3 servers as spectator, even with password - Server side filtering for Half-Life will be used if you have a server filter enabled when clicking update. Currently filtering for game, map, not full and not empty will be requested from the server. Jun 18, 2003: Ludwig Nussel - Display team of player for Q3 mods that provide the necessary information (currently osp, truecombat) Jun 14, 2003: Ludwig Nussel - add gametypes for Truecombat 1.0 - compare private_clients case insensitive in q3 Jun 11, 2003: Alex Burger - Changed version to 0.9.12.1 Jun 10, 2003: Alex Burger - Changed version to 0.9.12 June 09, 2003: Alex Burger - Updated French translation Jun 05, 2003: Jordi Mallach - add QuakeForge's HexenWorld master May 31, 2003: Ludwig Nussel - added ET voteflags - fix PreLaunch, pass qstat type and address as parameter - don't overwrite server type with master server type on update - update docu - added docs/PreLaunch.example - fix vc to not add a new ChangeLog header if the last entry has the same header as the new one would get May 29, 2003: Ludwig Nussel - added master protocol version for full version of Enemy Territory - add qstat.cfg as EXTRA_DIST in Makefile.am May 20, 2003: Ludwig Nussel - install a qstat.cfg to $datadir/xqf to make ssam work out of the box May 20, 2003: Jordi Mallach - update Catalan and Spanish translations May 19, 2003: Ludwig Nussel - option to not count bots as players based on a patch by Mike Mestnik. Works for Q3 and Tribes2. - update german translation May 18, 2003: Ludwig Nussel - switch hostname resolving off by default - do not update single rows if more than 100 servers are to be updated. elimitates too large delay with hl master May 17, 2003: Ludwig Nussel - abort configure if gdk-pixbuf is not installed - adapt spec file May 07, 2003: Ludwig Nussel - Pass RCON password on command line when launching Half-Life. Thanks Andreas Schneider for reporting. May 02, 2003: Ludwig Nussel - update German translation - remove custom args for Rocket Arena as 1.6 does not need them anymore - display number of private clients in player column (initial idea from Michael Prager) - coresize option in config file because I always remember that I wanted to change the ulimit when xqf had already crashed ;-) Apr 29, 2003: Jordi Mallach - update Catalan and Spanish translations Apr 27, 2003: Ludwig Nussel - fix keyboard focus in server list - don't allow double click on map column if game supports map preview, otherwise mouse would be grabbed and not available in other windows Apr 26, 2003: Ludwig Nussel - Display team of player for wolf and et Apr 25, 2003: Ludwig Nussel - Icon for Enemy Territory - Config option for Master server Apr 24, 2003: Ludwig Nussel - cleanups, fixed some warnings, changed debug macros - initial Enemy Territory Support (Testversion) - increased version number Apr 22, 2003: Ludwig Nussel - don't display warnings about NULL if scanning for maps is disabled. Thanks Jochen Baier for reporting. Mar 24, 2003: Ludwig Nussel - popup window with levelshot when clicking on map column, currently supports jpg shots inside pk3 files for q3 and wolf. Mar 15, 2003: Ludwig Nussel - added Serious Sam: The Second Encounter Mar 10, 2003: Ludwig Nussel - store all map names lowercase, otherwise many maps are reported as not installed - #define ZEXPORT if not already defined to fix compilation problems. Thanks Pierre Pronchery - set private clients from reserve_slots variable for hl Mar 07, 2003: Ludwig Nussel - game types for westernq3 Feb 19, 2003: Jordi Mallach - update Catalan translation Feb 09, 2003: Ludwig Nussel - adapt configure.in to install French translation Feb 08, 2003: Alex Burger - Added French translation Feb 04, 2003: Ludwig Nussel - move server filter submenu to top level - remove rarely used buttons from toolbar Feb 03, 2003: Ludwig Nussel - merge patch from Jochen Baier to allow filtering for map and server name - update German translation Feb 01, 2003: Ludwig Nussel - fix high cpu load when dialogs are shown during launch phase. It's obviously no good idea to enter the gtk event loop from inside a gdk input callback. Jan 20, 2003: Ludwig Nussel - image loading through gdk-pixbuf (png, jpeg etc.) - splash screen, logo in $datadir/xqf/pixmaps/xqflogo.png Jan 03, 2002: Jordi Mallach - New Danish translation, from Morten Brix Pedersen. Dec 25, 2002: Ludwig Nussel - added button to scan for maps without restarting xqf - fixed some minor memleaks - map scan function for q1, qw, q2 and hl Dec 19, 2002: Alex Burger - Changed version to 0.9.11.1 Dec 19, 2002: Alex Burger - Changed version back to to 0.9.11 for release with fixes below Dec 19, 2002: Ludwig Nussel - properly quoted macros for zlib checks - changed configure argument because help text said --enable-externalrcon while it actually was --enable-readline. - disabled external rcon by default Dec 18, 2002: Alex Burger - Changed version to 0.9.11.1 Dec 18, 2002: Alex Burger - Changed version to 0.9.11 Dec 18, 2002: Ludwig Nussel - update NEWS - update german translation Dec 18, 2002: Jordi Mallach - Updated Catalan and Spanish translations. Dec 08, 2002: Ludwig Nussel - update configure.in and autogen.sh to match newer automake/autoconf Dec 07, 2002: Ludwig Nussel - Scan for installed q3, wolfenstein, ut, ut2 and rune maps. Mark not installed ones in serverlist Dec 06, 2002: Ludwig Nussel - Added support for Serious Sam, appropriate qstat config with "SMS" game type required Dec 05, 2002: Ludwig Nussel - display RTCW voteflags like dmflags Nov 28, 2002: Jordi Mallach - Updated Catalan and Spanish translations. Nov 22, 2002: Jordi Mallach - port Ludwig's setlocale fix to rcon.c. Nov 21, 2002: Ludwig Nussel - store when a server was last up, display this date in red if it's more than three days older than the last refresh. Necessary change to ~/.qf/srvinfo.gz is backward and forward compatible. - util function timet2string, it has yet to be verified this one works on none-linux system too. - use setlocale(LC_ALL, ""); - fix __FUNCTION__ warnings Nov 20, 2002: Ludwig Nussel - fix wrong pointer passed to userver_ref Nov 17, 2002: Jordi Mallach - Initialize i18n for xqf-rcon. Nov 16, 2002: Alex Burger - Changed version to 0.9.10.1 Nov 16, 2002: Alex Burger - Changed version to 0.9.10 Nov 09, 2002: Jordi Mallach - Fix typos in Catalan translation. Nov 07, 2002: Ludwig Nussel - make cl_punkbuster method usable for any game, make it configurable for wolf - use protocol 60 by default for RTCW Nov 06, 2002: Ludwig Nussel - added protocol 60 for RTCW 1.4 to preferences - added -lncurses to readline check Nov 05, 2002: Jordi Mallach - Update QW master list, remove non-working and add QuakeForge's. Nov 05, 2002: Jordi Mallach - Updated Catalan and Spanish translations. Nov 5, 2002: Alex Burger - Add parameter to play_sound to force playing even if sound is disabled. Used by Test buttons to Preferences - Sound page Nov 05, 2002: Ludwig Nussel - use gtk functions instead of spaces to make test button look nice - update german translation Nov 3, 2002: Alex Burger - Add Test buttons to Preferences - Sound page Nov 02, 2002: Ludwig Nussel - fix saving of player info for rune, ut2 and tribes2 - do not display a single slash when model and skin are empty Nov 2, 2002: Alex Burger - Add gametype decode for instaunlagged, instagibplus, beryllium, excessive, q3f, q3f2 Nov 1, 2002: Alex Burger - Add gametype decode for arena and cpma - Fix for find_file_in_path to not append / if directory is blank. Caused more and more beginning /'s in game command line each time you pressed enter in the field. Oct 31, 2002: Ludwig Nussel - remove workaround for unreal to use gps for lan broadcasting, this is no longer necessary with qstat 2.5c Oct 30, 2002: Alex Burger - Modify game command entry field to expand command line into full path if command is in the path. Also executes guess_dir Oct 30, 2002: Ludwig Nussel - fix some memleaks - update german translation Oct 29, 2002: Alex Burger - Fixup master_check_master_addr_prefix - Create resolve_path function for use with guess_dir, user_fix_defaults etc Oct 29, 2002: Ludwig Nussel - add some missing gettext calls - fix function casting to int* - use only first argument of command line for directory guessing Oct 28, 2002: Alex - Add guess_dir functionality to Suggest button and user_fix_defaults - Change find_file_in_path to return entire filename including path - Add (...) button to game directory - Add Guess button to game directory - follows symlinks - Changed UT2003 default port to 7777 - Changed UT2003 back to -ut2s as the next version of qstat (soon!) will support another UT2 query method that works off of gameport+1 which is the same as the in-game browser in UT2003 Oct 28, 2002: Ludwig Nussel - fix source menu - update german translation - print number of servers when changing filters too Oct 27, 2002: Ludwig Nussel - speed improvements for host and server lists - fix plural form in reset_main_status_bar Oct 27, 2002: Alex - Bug fix - was able to enter same custom argument twice if case of game was different - Changed UT2003 default port to 7787 - Changed UT2003 back to -gps for qstat, now uses query port from master server for server list, pulls hostport from server info when connecting - Number of servers in status bar now updated when enabling / disabling a filter and when finished searching for a player - Created function reset_main_status_bar Oct 26, 2002: Alex - Set focus to Game Contains when adding new server filter - Set focus to Game when adding new custom arg - Added file dialog box (... button) to sound config page Oct 26, 2002: Ludwig Nussel - cleanup q3_exec: - protocol dependant launching no longer requires full path, will search $PATH - do not check for valid mod dir for games other than q3a - do not check for punkbuster for games other than q3a - pass all options as separate arguments - fix xqf killing itself when exec failed Oct 25, 2002: Alex - Segfault fix - q3_exec - launch game even if it doesn't respond to refresh - Tooltip updates Oct 24, 2002: Alex - Make tooltips global so it can be used anywhere. Have new tooltips use toolbar tooltip enable / disable option Oct 24, 2002: Alex Burger - Use game_set_attribute / game_get_attribute for game Notes - Added notes for SFS, UT2003 and HL - Add note to Unreal Tournament config page to see documentation for modifications to UT script. - Make UT logo round, remove 2 from UT2 logo - Improve custom args editor Oct 24, 2002: Ludwig Nussel - code cleanup - do not append first argument directly to ip in ut to be consistent with q3 Oct 23, 2002: Jordi Mallach - Update Catalan and Spanish translations. Oct 23, 2002: Alex Burger - Add spacing around button - Added file dialog box (... button) to game config page - Removed rafix option from q3_exec - Modified vmfix option in q3_exec to make custom args preferred over vmfix args - Added button to add default custom args to editor page - Add default custom args for UT StrikeForce & TacticalOps - Add default custom args for Q3A Rocket Arena Oct 23, 2002: Ludwig Nussel - remove old tribes2 master, add three new - increase version to 0.9.9.3 Oct 22, 2002: Alex Burger - user_fix_defaults is now called if the version changes at all - add_custom_args_defaults created, user_fix_defaults calls it to add some default args for games - add default custom args for StrikeForce & TacticalOps Oct 22, 2002: Ludwig Nussel - use optimal width for arguments editor Oct 21, 2002: Alex Burger - Added tooltips to custom args editor - Update docs - Add Replace button to custom args editor - Cleaned up new arguments editor Oct 21, 2002: Alex Burger - Added new arguments editor - new tab for Q3, UT, UT2003 Oct 20, 2002: Alex Burger - Fixed width of redial button - Added support for ~ in file master filename - Fix edit menu sensitivity problem for add / remove fav Oct 19, 2002: Alex Burger - Updated documentation - Added server properties password page support to Unreal, UT2003 and Rune - Updated ca.po, de.po, es.po for 'Add new Server' and removal of ...'s. Had to remove duplicate 'Properties' because of this. Note: Translation still needs to be done for 'Add new Server' as the translated version is still just 'Add' - Add 'Add to Fav' to Edit menu, add 'Add new server' to Server menu - Change menu items to not end in ... - Make menus look similar (Add new Server instead of Add) etc. - Only Q3A uses find_game_dir now Oct 18, 2002: Alex Burger - Changed default port for UT2003 to 7777 - Continuing on with the October 11th addition of get_custom_arguments: -arguments now stored in a GSList -custom_arg_num no longer needed in config file -added to game structure and all games -added basic ability to add arguments to Games Invoking pref page -only visible for Quake3, Unreal Tournament and UT2003 -added support to q3_exec (ut_exec already done) - Flipped locked_punkbuster icon - Increased default width of Priv column - Applied Ludwig's patch which reduces code needed to speed up the startup of XQF - Added check to user_fix_defaults so that if 1 or more games are found it defaults to 'show only configured games' Oct 18, 2002: Jordi Mallach - Update Catalan and Spanish translations. Oct 17, 2002: Alex Burger - Changed default for 'show_only_configured_games' to false Oct 17, 2002: Bill Adams - Clear s->flags when analyzing server info. Oct 17, 2002: Bill Adams - Fixed init_masters to not have a memory leak. Oct 16, 2002: Alex Burger - Created server_list_prepend_ndp which does not check for duplicates. Modified master_add_server to use server_list_prepend_ndp. Modified init_master to do a duplicate check after loading all the masters. Greatly reduces startup time with large lists of serves. Does NOT affect updating of masters once inside XQF. Oct 16, 2002: Ludwig Nussel - show punkbuster warning only once Oct 15, 2002: Ludwig Nussel - switch fix conversion when adding ut2s as gps - update german translation Oct 15, 2002: Bill Adams - Added some support for punkbuster and setting cl_punkbuster on the command line. It is an option in the q3a game config. - Fixed the autogen.sh to better work with autoconf 2.5 in the case that both 2.5 and an earlier version are installed. - Added --with-rpm-release to configure, properly sets the release when generating the xqf.spec file. Oct 15, 2002: Alex Burger - Few minor changes to make it compile on gcc <3 - Properly fixed create_server_type_menu and create_master_type_menu bugs Oct 14, 2002: Alex Burger - Fixed create_server_type_menu bug - Added punkbuster (and locked_punkbuster) XPMs - Modified create_server_type_menu to show all server types until bug can be figured out - Updated help about and AUTHORS page with contributors - Updated reserved slots support to use integers (Jochen Baier) - Added reserved slots support for redial from Jochen Baier (email@jochen-baier.de). Server properties page allows setting for reserved admin slots for the server. Oct 13, 2002: Alex Burger - Updated q3_exec to search ~/.q3a and then real game dir for mods. Tested with osp (~/.q3a/Osp) - Created q2_exec function to be used by Quake2 to search ~/.quake2 folder and then real game dir for mods. Tested find_game_dir with Quake2-r0.14.1. Connects and then restarts using lowercase name. May work with other versions of Quake2. Leaving in. - g_free in find_game_dir and exec functions - find_game_dir fixes: Allow symlinks, use const - Minor fix to ut_exec if there are no custom arguments Oct 13, 2002: Jordi Mallach - add redial.c to POTFILES. - updated Catalan and Spanish translations. Oct 13, 2002: Ludwig Nussel - use server_clist_set_list in server_clist_build_filtered. It's actually faster to rebuild the displayed server list from scratch than to determine which servers have to be deleted or added. - when deleting last server from favorites, do not display it any longer - replace unsigned char type by enum server_type type - grey out delete button for masters != favorites - comment out unused redial code - rename "Delete" -> "Remove from Favorites" - update german translation - remove empty lines for unconfigures games in statistics dialog Oct 12, 2002: Ludwig Nussel - cleaned up get_custom_arguments - custom_arg_count no longer neccessary - suggest function for game commands - show only configured games by default Oct 11, 2002: Alex Burger - Modified q3_exec to call find_game_dir using quake3_data_dir - Added NULL checks to find_game_dir Oct 11, 2002: Alex Burger - Added function get_custom_arguments. Used by ut_exec to pass user defined command line arguments to UT when launching. Currently does not have a GUI front end. To use, add something like the following to the [Game: UN] section in ~/.qf/config: custom_arg0=TacticalOps, -ini=TacticalOps.ini custom_arg1=SFTeamDM, -ini=StrikeForce.ini -userini=SFUser.ini custom_arg_count=2 For UT, the 'gametype' server variable is compared with the entries in the config file above. If there is a match, the arguments are appended. For UT, the argument is appended to the IP address so you could specify additional options such as ?Name=Alex etc. If you want to pass - options, make sure you put a space after the comma like above. - Added function find_game_dir which searches for the game dir regardless of case. Called by qw_exec, q2_exec_generic, q3_exec and hl_exec to set the game, or fs_game argument. For example, if server has a game of 'OSP', and client has dir of 'osp', Q3 will now be properly be launched with +fs_game osp instead of OSP. Oct 10, 2002: Alex Burger - Added support of 'Show only configured games' to Add Master window Add Server window and Statistics page - Cleaned up 'When launching a game' placement in Preferences / General Oct 10, 2002: Ludwig Nussel - update NEWS and TODO - added script 'vc' to automate editing this file - remove instructions for Half-Life hack from docu - access functions for game specific attributes Oct 09, 2002: Alex Burger - Added password support to Unreal based games (games that use un_exec - Unreal, UT 2003, Rune) - Changed UT 2003 icon to have a #2 at the bottom right hand corner. I used KEdit which seams to have changed the format of the file, but it still looks fine in XQF. - Changed Unreal / UT icon to UT 2003 icon (without a number) - Changed Unreal name to 'Unreal / UT' Oct 08, 2002: Ludwig Nussel - Q3 protocol 68 Oct 06, 2002: Ludwig Nussel - clean up sound code - increased version to 0.9.9.2 to make UT2003 server lists visible. Note for those using the CVS Version: You need a qstat that supports 'ut2s' as gametype. You can generate a suitable config file at http://qstat.uglypunk.com/. Keep in mind that you may have to remove the file when a new qstat version is released! Oct 05, 2002: Alex Burger - Added Preferences Appearance option of 'Show only configured games'. Masters added will still be stored, but only displayed on the screen if the command line for the game is configured. Defaults to false. I was tired of scrolling past games I don't have. - Changed source_ctree_remove_master_group() to not be static. Oct 04, 2002: Ludwig Nussel - modified that ugly ut2 master hack a little Oct 04, 2002: Alex Burger - Added support for UT 2003 http masters (not the same as the other http formats) and added full and demo Epic masters - Fixed UT 2003 password column (servers use password=0/1 instead of password=False/True) - Added sound enable/disable button Oct 03, 2002: Alex Burger - Added sound support actions for: xqf start, xqf quit, update, refresh, stop, server connect, redial success. Added Preferences / Sound Options. If file does not start with a / (except for Player), prepends user's config folder (~/.qf/) Oct 03, 2002: Ludwig Nussel - add popup while redialing Oct 03, 2002: Ludwig Nussel - rename Unreal 2003 Demo -> UT 2003 Oct 01, 2002: Alex Burger - Update status bar for redial Oct 01, 2002: Ludwig Nussel - fix segfault because of format error and some cast warnings - use q3 parse and launch functions for SOF2 - reinsert signal handlers for changing debug level - set sensitivity of cancel redial button Sep 30, 2002: Alex Burger - Added busy server redial. Server - Cancel Redial to stop Sep 29, 2002: Alex Burger - Added Soldier of Fortune 2 support and master Sep 27, 2002: Ludwig Nussel - q3a gametypes for afterwards. that stuff should really be stored in a runtime parsed, external file Sep 26, 2002: Jordi Mallach - updated Catalan & Spanish translations Sep 23, 2002: Ludwig Nussel - improved debug functions, debug level can be in- and decreased with SIGUSR1 and SIGUSR2 - proper launch function for Half-Life Sep 16, 2002: Ludwig Nussel - changed some macros to make cvs work with older autoconf/automake Sep 15, 2002: Ludwig Nussel - new master type "file", reads ip addresses from a file Sep 14, 2002: Ludwig Nussel - support for Unreal Tournament 2003 Demo. No master yet. If you know one, tell me Sep 07, 2002: Ludwig Nussel - fix Half-Life rcon - primitive external rcon program that is not linked against X (xqf-rcon) Aug 15, 2002: Jordi Mallach - fixed a typo in the filter dialog - updated Catalan & Spanish translations Aug 10, 2002: Ludwig Nussel - fixed some strings that where marked for translation but the gettext call was missing Aug 09, 2002: Ludwig Nussel - fixed player search to move the visible area to the server on which a player was found - changed some player search dialog a bit - fixed default tribes2 master port, it's possible to actually add tribes2 masters now - made quake_parse_server less picky about number of columns in qstat output Jul 26, 2002: Jordi Mallach - updated Catalan and Spanish translations Jul 26, 2002: Ludwig Nussel - variable number of server filters - fix segfault when deleting last player filter entry - update german translation - better back up your config before trying this new versoin July 7, 2002: Alex Burger - Changed version to 0.9.9.1 Jul 07, 2002: Ludwig Nussel - fixed segfault when adding servers with no name to favorites - added RTCW protocol 59 July 4, 2002: Alex Burger - Changed version to 0.9.9c July 3, 2002: Alex Burger - Changed version to 0.9.9 Jun 30, 2002: Ludwig Nussel - added a short explanation about LAN queries to docu - added gametypes and dmflags for q3 freezetag Jun 28, 2002: Jordi Mallach - new Catalan translation - added a mnemonic to a menu item Jun 20, 2002: Jordi Mallach - updated Spanish translation May 20, 2002: Ludwig Nussel - increased servers hash - added some debug output for hash utilization - use macro QSTAT_EXEC for determining the qstat version as qstat is called quakestat on debian (reported by Despair) - added Ravensoft Elite Force master May 07, 2002: Ludwig Nussel - Added punkbuster label for rtcw. Yes it's ugly but ... May 05, 2002: Ludwig Nussel - fix LAN Browsing for games that need a port change (Rune) - replaced static struct for q3 options with a more flexible g_datalist - added preferences tab for q3 memory settings - renamed STVEFS to EFS to match qstat beta, old servers need to be renamed by hand else they will get lost - added master server preferences tab for voyager elite force (req upcoming qstat) - updated german translation Apr 23, 2002: Ludwig Nussel - acconfig.h seems to be deprecated, moved it to i18n.h - removed explicit -I/usr/include as gcc3 doesn't like that Apr 20, 2002: Jordi Mallach - updated Spanish translation Mar 17, 2002: Ludwig Nussel - added navy seals gametype - added RTCW protocol 58 to preferences - added a server_unref so old servers no longer pile up in srvinfo.gz - added player statistics per OS - updated german translation Feb 28, 2002: Jordi Mallach - updated copyright notice in about dialog - updated Spanish translation. Feb 17, 2002: Ludwig Nussel - support for LAN broadcast queries Feb 12, 2002: Ludwig Nussel - check for correct version of qstat on startup Feb 12, 2002: Ludwig Nussel - reworked dialog for adding master - added popup menu for master server tree - added function for renaming master servers Feb 01, 2002: Ludwig Nussel - fix display of gametypes > MAX_Q3A_TYPES Jan 17, 2002: Jordi Mallach - updated NEWS for 0.9.9. Jan 05, 2002: Ludwig Nussel - removed not working Tribes2 masterservers and added a new one - wrote new function for parsing Tribes2 player info - changed version to 0.9.9b Jan 2, 2002: Jordi Mallach - Spanish update Dec 30, 2001: Ludwig Nussel - changed textentries to comboboxes for q3/wolf protocol selection Dec 28, 2001: Ludwig Nussel - added gametypes for truecombat - wrote function for determining the gametype to get rid of all those ugly else if's Dec 27, 2001: Ludwig Nussel - added 20sec timeout for wget - support for Voyager Elite Force - changed some internals for statistics - removed 2 not working q3 masters - added gameaholic lists for voyager and q3a - renamed T/O -> Timeout - added tribes2 statistics, only 25% servers are running linux :-( Dec 23, 2001: Ludwig Nussel - default masterprotocol for q3 is now 67 (pr 1.31) Dec 23, 2001: Jordi Mallach - Spanish translation fixes Dec 22,2001: Alex Burger - Changed version to 0.9.9a Dec 21, 2001: Ludwig Nussel - added gametypes and dmflags for q3a mod generations Dec 17, 2001: Jordi Mallach - configure.in: remove debian/Makefile creation, too. - Attempt to fix Gamespy pixmap. - Updated NEWS for 0.9.8. Dec 16, 2001: Jordi Mallach - Makefile.am: remove debian from SUBDIRS. What a pain in the ass! The whole directory should be removed, but this is the bare minimum. Dec 16, 2001: Jordi Mallach - Updated Spanish translation. Dec 15, 2001: Ludwig Nussel - server filters were broken, fixed - new Tribes2 icon - updated TODO - updated german translation Dec 15, 2001: Alex Burger - Added Edit / Add Default Masters command. Adds in all the default master servers in case you accidentally deleted one (or all) Dec 13, 2001: Ludwig Nussel - qstat no longer required at build time Dec 09, 2001: Jordi Mallach - Added past release dates to NEWS. Dec 09, 2001: Ludwig Nussel - Updated NEWS and BUGS Dec 07, 2001: Ludwig Nussel - Patch by Ben Winslow to create OS/CPU statistics for RTCW, Kingpin and Half-Life Dec 06, 2001: Ludwig Nussel - added rtcw gametypes - changed master protocol for rtcw to 57 - added a missing gettext call Nov 22, 2001: Ludwig Nussel - the ppc problem turned out to be a bug in filter.c, special thanks to Philipp Thomas for finding it! - other changes by Philipp Thomas to get rid of some compiler warnings - updated german translation Nov 21, 2001: Ludwig Nussel - fixed the ppc fix (hopefully ;) Nov 21, 2001: Jordi Mallach - NEWS updates for 0.9.7 Nov 21, 2001: Jordi Mallach - es.po updates Nov 21, 2001: Ludwig Nussel - updated TODO Nov 19, 2001: Ludwig Nussel - workaround for ppc compiler bug Oct 23, 2001: Ludwig Nussel - changed wording and my email in about dialog - removed gnuconfig.h.in from cvs Oct 18, 2001: Ludwig Nussel - fixed compiler warnings - replaced some strange sprintf's with g_strdup - made server_pass_filter return FALSE if ping==-1 - fixed #define's for gametypes - set s->game to either fs_game, game or gamename rule in that order (game will be supported by next qstat) Oct 13, 2001: Ludwig Nussel - added gametype strings for TribalCTF and Threewave. Unfortunately TribalCTF servers modify their gamename variable, so this is not really useful yet. Oct 13, 2001: Ludwig Nussel - added gameaholic.com rune server list - game and gametype are now displayed in LaunchInfo.txt Oct 07, 2001: Ludwig Nussel - changed default commandline for qs & qws for quakeforge - added default commandlines for rune,tribes2,wolf and ut Oct 05, 2001: Ludwig Nussel - removed quakeforge workaround - added -Wall to CFLAGS Oct 05, 2001: Jordi Mallach - fixed a variable type in es.po which was making it segfault directly. Thanks, Ludwig. Oct 03, 2001: Ludwig Nussel - initial descent3 support (requires qstat 2.4e) - changed version to 0.9.7c (new master for descent3) - added quakeforge workaround - updated german translation - fixed player filter dialog bug Oct 01, 2001: Jordi Mallach - updated Spanish translation, again :) Oct 01, 2001: Ludwig Nussel - major redesign of settings dialog - individually configurable nick for q1,qw,q2,t2 - more translatabe strings - updated german translation Oct 01, 2001: Jordi Mallach - updated Spanish translation - added some notes in BUGS Sep 30, 2001: Ludwig Nussel - disabled write_quake_variables function for q3 - added ability to use custom configs for q3 - made some error popups translatable - updated german translation Sep 28, 2001: Ludwig Nussel - added Rune support - changed layout of game configuration screen Sep 28, 2001: Ludwig Nussel - added support for games using the gamespy protocol - added q3,ut,sof,nolf,rally masters,turok2 and shogo masters - made game names translatable - updated german translation - changed version to 0.9.7b Sep 27, 2001: Ludwig Nussel - more translatable strings marked - updated german translation Sep 27, 2001: Jordi Mallach - Updated Spanish translation - added gettext cruft to po/.cvsignore Sep 27, 2001: Ludwig Nussel - made q3_exec usable for Wofenstein, removed wo_exec - identify q3/rtcw servers by their version string - use common option struct for all games with q3 engine - add configuration options for Wolfenstein to q3 tab - pass server and rconpasswords on the command line - fix q3 rcon_password -> rconpassword - changed default q3 command: linuxquake3 -> quake3 - made string for tooltip for server&playerfilter translatable - split about dialog string into smaller chunks for easier translation - update for german translation Sept 24,2001: Alex Burger - Changed version to 0.9.7a Sept 24,2001: Alex Burger - Added wo_exec function to properly launch Wolf. Tested with Wolfmptest 0.7.16-1 Sept 19, 2001: Alex Burger - Added Wolfenstein support. Currently uses q3_exec to launch the game, but will change when Wolf client for Linux is released. Uses qstat as if it is a Quake3 server Sept 14, 2001: Alex Burger - Added docs/xqfdocs.html - Added new NEWS file from Jordi Sept 10, 2001: Alex Burger - Added Jordi Mallach's man page - xqf.6 and modified Makefile.am - Added 'General' Preferences page and moved most of 'Appearance' to 'General' page. Sept 5, 2001: Alex Burger - Patch by Ludwig Nussel ludwig.nussel@gmx.de to add German translation and some code fixes. Aug 19, 2001: Bill Adams - Removed BUILD_INCLUDED_LIBINTL from intl/Makefile.pm and replaced it with USE_INCLUDED_LIBINTL as that is the only variable defined in gettext.m4 for gettext 0.10.35. - Patch by Ludwig Nussel ludwig.nussel@gmx.de to fix some of the q3a game types, options for setting fs_game on the command line and r3a hack for the vm_* settings. Aug 9, 2001: Alex Burger -Changed Quake3 protocol version to 66 to support latest Quake3 patch. Change located in game.c July 07, 2001, Bill Adams - Added "Game Type" filter. Now you can filter on CTF, TDM, etc. and the mod. - Merged Jordi's changes (see below). June 8, 2001, Jordi Mallach - Big internationalization patch for XQF. Adds intl/ and po/ subdirs, and adds the gettext marks to every .c that needs it. Modified configure.in and the Makefile.am's to support gettext. From now on, every string in the code should be wrapped inside gettext() calls, and .c's should add a if they don't have it already. Some issues with the current code remain (untranslatable strings), thats a work in progress. - Initial, incomplete Spanish translation (po/es.po). - changed configure.in so it barfs about qstat << 2.4c. June 5, 2001: Alex Burger -Tribes 2 games can now be launched. Created a t2_exec function. If a name is specified in Player Profile, it is used on the command line to log in. This would only work if you have saved your password in the game. Otherwise it launches and prompts for login. April 20, 2001: Alex Burger -Now requires qstat2.4c. Removed fixes to Tribes 2 code for qstat2.4b as qstat2.4c fixes the problems -Added t2_analyze_serverinfo function to decode Game and GameType columns for Tribes 2. April 19, 2001: Alex Burger -Changed version to 0.9.6g -Added Tribes 2 support. Tribes 2 support requires at least QSTAT 2.4b. As I do not even have Tribes 2 I can not test launching the game but it if it launches the same as Quake2, then it should work. More work will be done to ensure the player and server info is being decoded correctly etc. Feb 14, 2001: Bill Adams -Oh dear god, I think I fixed the core dumps related to the reference counting on the server structures. At least to the best of my ability, I cannot make the server references increase or decrease over time: i.e. the program always exits with a reference count of one on all server structures. I could not figure out why it was 1 and not zero but I will deal with that later. Feb 13, 2001: Bill Adams -Changed version to 0.9.6f, added announcement dir and announcement. Feb 07, 2001: Bill Adams -Fixed the core dumps (for the most part) for real. The only time I have seen a core dump at this point is when updating a master list where there are not any servers already in the list. However, once you have a list of servers, you should be able to update/refresh at will without any problems. -Lots of debugging code with the debug(...) call. If you want lots of output, use -d 3, to see the servers it is parsing use -d 4. For an insane amount of output use -d 7. Debug levels greater than three will will have so much output that it will most likely slow down the program. -Added a fair number of comments to the code. Jan 31, 2001: Bill Adams -Made it so OSP game types show up correctly. Jan 24, 2001: Bill Adams -Fixed the game.c hack. Bad bug. Jan 23, 2001: Bill Adams -Did BAD hack to game.c::q3_exec( ) so that when connecting to an arena (rocket arena 3) server, it will "+set sv_pure 0 +set vm_* 0" on the command line so arena will load properly. As a side note, one should use vm_* all at zero unless you have a really good reason to do otherwise. Jan 21, 2001: Bill Adams -Changed "Insert" behavior. Now Insert brings up the add server dialog while SHIFT+Insert adds a server from the server list to your favorites. I am not sure about this because one can also use CTRL+N to add another server via a dialog. But I am told the Insert == Dialog is how GameSpy works so there it is. -q3_exec now adds +set fs_game SSSS for either the fs_game or gamename. This should improve connecting as it will load the mod when Q3A starts. -Added a function in util.c to get the value for any server variable that shows up in the server info pane. This is a setup for arbitrary server filters and for... -q3_exec will now check for protoNN before it just runs . To use this feature you have to configure xqf to point to the FULL path to your q3 exec script. Then you can put scripts that are named with the "protoNN" on the end to have xqf automatically connect to the right server. See the instructions in the README. This allows you (if you have LOTS of disk space) to be able to connect to multiple point-releases. -added -d N command line option to get more debugging output. Added debug.c and debug.h to facilitate this new feature. Only a few code segments use the new debug() function. -added self to AUTHORS. -Version now 0.9.6e-beta. -Fixed config.in to have the correct version. Jan 7, 2001: Alex Burger -Renamed MOD column to GameType -Swapped Quake3 'Game' and 'Mod/GameType' columns -Swapped UT 'Game' and 'Mod/GameType' columns -Renamed all occurences of ->mod in source to ->gametype -Changed filter from 'the mod contains' to 'the game contains' -Changed all occurences of mod_contains to gametype_contains -Version changed to 0.9.6d-beta Jan 7, 2001: Ludwig Nussel -Added hl_analyze_serverinfo function to display gamedir and gamename in columns for Half-Life servers. For example: cstrike and Counter Strike -Added un_analyze_serverinfo function to display gametype and gamestyle in columns for Unreal Tournament servers. For example: game_unrealfortress and hardcore -Modified q2_analyze_serverinfo function to display gamename in columns for Quake2 servers. For example: Lithium II V1.23 Jan 2, 2001: Alex Burger -Change g_gametype of 8 to ' mod ' instead of TeamTournament which TeamArena uses in the in-game browser. Jan 1, 2001: Alex Burger -Now executes the file PreLaunch from the ~/.qf directory when launching a game for use with ICQ scripts etc. Toggle on / off using Preferences / Appearance Dec 28, 2000: Alex Burger -Modified game.c to query for protocol 48 Quake3 servers instead of the qstat default by using "-q3m,48" Dec 27, 2000: Bill Adams -Adding a server with the Insert key now gives feedback on the status bar. -Fixed the core dump. Perhaps? So I hope. (added server_ref to server.c::server_add( )). This will require verification on the reference count but it seemed to fix it for me. Dec 23, 2000: Alex Burger -Added new Quake3 game types to support Team Arena. Note: g_gametype values of 5 to 8 are now defined by id for Team Arena. Mod authors usually use 5. XQF will only show the new values if the game version is 1.27 until we find out what the mod authors are doing. -Changed game types to not use < > around the type in the Game column Dec 22, 2000: Bill Adams -New column in the server list to show if you need a password or not. If you do a lock icon appears. -If a Q3A server has all non private-client slots filled, a yellow man appears next to the map. The icon is slightly different for color blind people so don't tell me about it unless you are color blind and need the difference greater. -You can press "Insert" to add a server to the Favorites list while in anything but the Favorites list. Pressing "Delete" while in the Favorites list will remove it from Favorites. "Enter" or "Return" in any list will will connect you to the server. -Moved the filter selection to the "Server" menu pulldown. -It still dumps core. :(. There seems to be a reference counting bug with the server lists. If you want to watch it happen, set up a "mod contains wfa" filter, update the Q3A ID list, apply the filter, and press refresh repeatedly. Dec 20th 2000: Bill Adams --The filter name now appears in the status bar. --Version changed to 0.9.6b-beta --There are still core dumps :(. Dec 04th 2000: Bill Adams -Added the ability to have multiple filters. Right now the number is set at compile time to 10 (see xqf.h:MAX_SERVER_FILTERS if you want to change it). You can name the filters to whatever you want. The first filter "None" cannot be changed. It is there for a reason (future feature). The last filter selected is remembered each time you exit (if you use the menu File->exit). -Version changed to 0.9.6a-beta Nov 26th 2000: Bill Adams -Changed a few filter related files to make it easier to put in multiple server filters. Nov 24th 2000: Alex Burger -Version changed to XQF 0.9.5a-beta -Fixed UT launching. Now passes proper parameters to UT Nov 18th 2000: Alex Burger -Version changed to XQF 0.9.5 Nov 13th 2000: Alex Burger -Bug fix to prevent filter buttons from not staying 'pressed' after doing a refresh. Thanks to slashdev for the fix. -Now requires QStat 2.4a Nov 12th 2000: Alex Burger -Changed Copy+ menu to use double spaces instead of commas to separate fields. Added 'of' for current players / max players. Eg: 5 of 10 Nov 5th 2000: Alex Burger -Add call to clear list to end of function server_clist_build_filtered to prevent segfault on some computers due to server list that is emptied after a player filter is applied Oct 27th 2000: xqf-0.9.4f2 - Alex Burger -Added Copy+ menu option - copies the following server info to the clipboard: ping ip:port name map curplayers maxplayers -Now creates a LaunchInfo.txt in ~/.qf when launching a game for use with IRC scripts etc. Toggle on / off using Preferences / Appearance Oct 8th 2000: xqf-0.9.4f - Alex Burger -UnrealTournament master support using Gamespy style master via QStat 2.4a -Add Epic UT Master server to default master list -Remove Gamespy master server entry from default master list -Fixed master list bug Oct 4th 2000: xqf-0.9.4e - Alex Burger -Soldier of Fortune support -Gamespy style master server support when used with QStat 2.4a -Format of 'lists' file changed to record game type in master entry -Ability to add the same master to multiple games such as Gamespy's master xqf-0.9.4d - Bill Adams -When browsing Q3A games the mods (e.g. arena, osp, beryllium, etc.) show up in the "Game" column along with the game type (FFA, etc.). -The mod appears in its own column for Q3A games -You can filter by mod -You can filter by the version string xqf-1.0.5/clean.sh0000644002404400000620000000160010027276700010644 00000000000000#!/bin/sh rm -f \ Makefile \ config.status \ config.cache \ config.log \ configure \ Makefile.in \ aclocal.m4 \ config.guess \ config.sub \ install-sh \ mkinstalldirs \ missing \ depcomp \ */Makefile \ src/Makefile.in \ ltconfig \ ltmain.sh \ libtool \ compile \ config.h \ intl/libintl.h \ src/gnuconfig.h \ src/gnuconfig.h.in \ src/xpm/Makefile.in \ src/xpm/Makefile \ pixmaps/Makefile.in \ pixmaps/flags/Makefile.in \ po/Makefile.in \ po/Makefile.in.in \ po/POTFILES \ po/*.gmo \ INSTALL \ COPYING # gettextize rm -rf \ ABOUT-NLS \ config.rpath \ mkinstalldirs \ m4 \ po/Makefile.in \ po/Makevars.template \ po/Rules-quot \ po/boldquot.sed \ po/en@boldquot.header \ po/en@quot.header \ po/insert-header.sin \ po/quot.sed \ po/remove-potcdate.sin \ intl/*.* \ intl/ChangeLog \ intl/VERSION #intltool rm -rf \ intltool-*.in \ po/remove-potcdate.sed \ po/stamp-po rm -rf \ pixmaps/flags/*.png xqf-1.0.5/COPYING0000644002404400000620000004312210422550571010266 00000000000000 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 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.