music123-16.3.orig/0000755000175000017500000000000011653110446013327 5ustar xavierxaviermusic123-16.3.orig/po/0000755000175000017500000000000011653110446013745 5ustar xavierxaviermusic123-16.3.orig/po/de.po0000644000175000017500000000443111653110446014677 0ustar xavierxavier# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR Free Software Foundation, Inc. # FIRST AUTHOR , YEAR. # msgid "" msgstr "" "Project-Id-Version: music123 8\n" "POT-Creation-Date: 2002-05-20 00:14-0500\n" "PO-Revision-Date: 2754-12-11 19:24+0500\n" "Last-Translator: Michael Bramer \n" "Language-Team: Deutsch \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=iso-8859-1\n" "Content-Transfer-Encoding: 8bit\n" # music123.adb msgid "music123 version %d by David Starner" msgstr "music123 Version %d von David Starner" # music123.adb msgid "No arguments found." msgstr "Keine Argumente gefunden" # music123.adb # changed by dvdeug msgid "Bad argument for -d." msgstr "Falsches Argument für -d." # music123.adb # changed by dvdeug msgid "Missing argument for -d." msgstr "Fehlendes Argument für -d." # music123.adb msgid "Missing argument for -@." msgstr "Fehlendes Argument für -@." # music123.adb msgid "Unknown argument found." msgstr "Unbekanntes Argument gefunden" # support_routines.adb msgid "music123: " msgstr "music123: " # support_routines.adb msgid "usage: music123 [-hqrvz] files ..." msgstr "usage: music123 [-hqrvz] files ..." # support_routines.adb msgid "-h This help" msgstr "-h Diese Hilfe" # support_routines.adb msgid "-q Run quiet" msgstr "-q Programmablauf ohne Ausgabe" # support_routines.adb msgid "-r Recurse over directories" msgstr "-r rekursiv durch die Verzeichnisse" # support_routines.adb msgid "-v Print the version and exit" msgstr "-v gibt die Version aus" # support_routines.adb msgid "-z Randomize the filelist" msgstr "-z mischt die Dateiliste" # support_routines.adb msgid "See the manpage for more options." msgstr "Für weitere Optionen siehe Man-Page" # support_routines.adb msgid "Neither /etc/music123rc or ~/.music123rc found. Exiting." msgstr "Weder /etc/music123rc noch ~/.music123rc wurden gefunden. Abbruch" # support_routines.adb msgid "The config file (~/.music123rc or /etc/music123rc) is corrupt." msgstr "Die Konfigdatei (~/.music123rc oder /etc/music123rc) sind beschädigt" # support_routines.adb msgid "No valid filenames found." msgstr "Kein gültiger Dateiname gefunden" # support_routines.adb msgid "Playlist file not found." msgstr "Playlist Datei nicht gefunden" music123-16.3.orig/po/music123.pot0000644000175000017500000000351311653110446016041 0ustar xavierxavier# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR Free Software Foundation, Inc. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: music123 version 8\n" "POT-Creation-Date: 2002-05-20 00:14-0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" #: music123.adb msgid "music123 version %d by David Starner" msgstr "" #: music123.adb msgid "No arguments found." msgstr "" #: music123.adb msgid "Bad argument for -d." msgstr "" #: music123.adb msgid "Missing argument for -d." msgstr "" #: music123.adb msgid "Missing argument for -@." msgstr "" #: music123.adb msgid "Unknown argument found." msgstr "" #: support_routines.adb msgid "music123: " msgstr "" #: support_routines.adb msgid "usage: music123 [-hqrvz] files ..." msgstr "" #: support_routines.adb msgid "-h This help" msgstr "" #: support_routines.adb msgid "-q Run quiet" msgstr "" #: support_routines.adb msgid "-i Ignore extension case" msgstr "" #: support_routines.adb msgid "-L List files and exit" msgstr "" #: support_routines.adb msgid "-r Recurse over directories" msgstr "" #: support_routines.adb msgid "-v Print the version and exit" msgstr "" #: support_routines.adb msgid "-z Randomize the filelist" msgstr "" #: support_routines.adb msgid "See the manpage for more options." msgstr "" #: support_routines.adb msgid "Neither /etc/music123rc or ~/.music123 found. Exiting." msgstr "" #: support_routines.adb msgid "The config file (~/.music123 or /etc/music123rc) is corrupt." msgstr "" #: support_routines.adb msgid "No valid filenames found." msgstr "" #: support_routines.adb msgid "Playlist file not found." msgstr "" music123-16.3.orig/po/pt_BR.po0000644000175000017500000000446611653110446015325 0ustar xavierxavier# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR Free Software Foundation, Inc. # FIRST AUTHOR , YEAR. # msgid "" msgstr "" "Project-Id-Version: music123\n" "POT-Creation-Date: 2002-05-20 00:14-0500\n" "PO-Revision-Date: \n" "Last-Translator: Gustavo Noronha Silva \n" "Language-Team: Debian-BR \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=iso-8859-1\n" "Content-Transfer-Encoding: 8bit\n" # music123.adb msgid "music123 version %d by David Starner" msgstr "music123 versăo %d, por David Starner" # music123.adb msgid "No arguments found." msgstr "Argumentos năo encontrados." # music123.adb msgid "Bad argument for -d." msgstr "Argumento incorreto para -@." # music123.adb msgid "Missing argument for -d." msgstr "Argumento faltando para -d." # music123.adb msgid "Missing argument for -@." msgstr "Argumento faltando para -@." # music123.adb msgid "Unknown argument found." msgstr "Argumento desconhecido encontrado." # support_routines.adb msgid "music123: " msgstr "music123: " # support_routines.adb msgid "usage: music123 [-hqrvz] files ..." msgstr "uso: music123 [-hqrvz] arquivos ..." # support_routines.adb msgid "-h This help" msgstr "-h Esta ajuda" # support_routines.adb msgid "-q Run quiet" msgstr "-q Rodar quieto" # support_routines.adb msgid "-r Recurse over directories" msgstr "-r Entrar nos subdiretórios" # support_routines.adb msgid "-v Print the version and exit" msgstr "-v Imprime a versăo e sai" # support_routines.adb msgid "-z Randomize the filelist" msgstr "-z Torna a lista de arquivos aleatória." # support_routines.adb msgid "See the manpage for more options." msgstr "Veja a página de manual para mais opçőes." # support_routines.adb msgid "Neither /etc/music123rc or ~/.music123rc found. Exiting." msgstr "Nem o /etc/music123rc nem o ~/.music123rc foram encontrados. Saindo." # support_routines.adb msgid "The config file (~/.music123rc or /etc/music123rc) is corrupt." msgstr "" "O arquivo de configuraçăo (~/.music123rc ou /etc/music123rc) está corrompido." # support_routines.adb msgid "No valid filenames found." msgstr "Năo foram encontrados nomes de arquivos válidos." # support_routines.adb msgid "Playlist file not found." msgstr "Arquivo de playlist năo encontrado." music123-16.3.orig/po/eo.po0000644000175000017500000000434211653110446014713 0ustar xavierxavier# Mesařoj por music123 de David Starner. # Edmund GRIMLEY EVANS , 2001. # msgid "" msgstr "" "Project-Id-Version: music123 5\n" "POT-Creation-Date: 2002-05-20 00:14-0500\n" "PO-Revision-Date: 2001-12-12 09:00+0000\n" "Last-Translator: Edmund GRIMLEY EVANS \n" "Language-Team: eo \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=iso-8859-3\n" "Content-Transfer-Encoding: 8bit\n" # music123.adb msgid "music123 version %d by David Starner" msgstr "music123 versio %d de David Starner" # music123.adb msgid "No arguments found." msgstr "Mankas argumentoj." # music123.adb # changed by dvdeug msgid "Bad argument for -d." msgstr "Malbona argumento por -d." # music123.adb # changed by dvdeug msgid "Missing argument for -d." msgstr "Mankas argumento por -d." # music123.adb msgid "Missing argument for -@." msgstr "Mankas argumento por -@." # music123.adb msgid "Unknown argument found." msgstr "Nekonata argumento." # support_routines.adb msgid "music123: " msgstr "music123: " # support_routines.adb msgid "usage: music123 [-hqrvz] files ..." msgstr "uzado: music123 [-hqrvz] dosieroj ..." # support_routines.adb msgid "-h This help" msgstr "-h Ći tiu helpo" # support_routines.adb msgid "-q Run quiet" msgstr "-q Ruli silente" # support_routines.adb msgid "-r Recurse over directories" msgstr "-r Trakti dosierujojn rekurse" # support_routines.adb msgid "-v Print the version and exit" msgstr "-v Montri la version kaj eliri" # support_routines.adb msgid "-z Randomize the filelist" msgstr "-z Hazarde reordigi la dosierliston" # support_routines.adb msgid "See the manpage for more options." msgstr "Vidu la manpařon por pli da opcioj." # support_routines.adb msgid "Neither /etc/music123rc or ~/.music123rc found. Exiting." msgstr "Nek /etc/music123rc nek ~/.music123rc estas trovita. Eliras." # support_routines.adb msgid "The config file (~/.music123rc or /etc/music123rc) is corrupt." msgstr "La agordodosiero (~/.music123rc aý /etc/music123rc) estas fuţita." # support_routines.adb msgid "No valid filenames found." msgstr "Mankas validaj dosiernomoj." # support_routines.adb msgid "Playlist file not found." msgstr "Dosiero kun ludolisto ne trovita." music123-16.3.orig/po/nl.po0000644000175000017500000000454411653110446014725 0ustar xavierxavier# Dutch messages for music123 # Copyright (C) 2001, 2002 Free Software Foundation, Inc. # Joost van Baal , 2001, 2002 # msgid "" msgstr "" "Project-Id-Version: music123 VERSION\n" "POT-Creation-Date: 2002-05-20 00:14-0500\n" "PO-Revision-Date: 2002-05-21 10:42 +0100\n" "Last-Translator: Joost van Baal \n" "Language-Team: Dutch \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=iso-8859-1\n" "Content-Transfer-Encoding: 8bit\n" # music123.adb msgid "music123 version %d by David Starner" msgstr "music123 versie %d door David Starner" # music123.adb msgid "No arguments found." msgstr "Geen argumenten gevonden." # music123.adb #, fuzzy msgid "Bad argument for -d." msgstr "Ontbrekend argument bij -d." # music123.adb #, fuzzy msgid "Missing argument for -d." msgstr "Ontbrekend argument bij -d." # music123.adb msgid "Missing argument for -@." msgstr "Ontbrekend argument bij -@." # music123.adb msgid "Unknown argument found." msgstr "Ongeldig argument gevonden." # support_routines.adb msgid "music123: " msgstr "music123: " # support_routines.adb msgid "usage: music123 [-hqrvz] files ..." msgstr "gebruik: music123 [-hqrvz] bestanden ..." # support_routines.adb msgid "-h This help" msgstr "-h Deze hulp" # support_routines.adb msgid "-q Run quiet" msgstr "-q Draai stil" # support_routines.adb msgid "-r Recurse over directories" msgstr "-r Loop recursief door directories" # support_routines.adb msgid "-v Print the version and exit" msgstr "-v Toon het versienummer en beëindig programma" # support_routines.adb msgid "-z Randomize the filelist" msgstr "-z Maak de volgorde van de bestandslijst willekeurig" # support_routines.adb msgid "See the manpage for more options." msgstr "Zie de manpage voor meer opties." # support_routines.adb msgid "Neither /etc/music123rc or ~/.music123rc found. Exiting." msgstr "/etc/music123rc noch ~/.music123rc gevonden. Programma beëindigd." # support_routines.adb msgid "The config file (~/.music123rc or /etc/music123rc) is corrupt." msgstr "Het configuratiebestand (~/.music123rc of /etc/music123rc) bevat fouten." # support_routines.adb msgid "No valid filenames found." msgstr "Geen valide bestandsnamen gevonden." # support_routines.adb msgid "Playlist file not found." msgstr "De playlist is niet gevonden." music123-16.3.orig/po/pl.po0000644000175000017500000000451311653110446014723 0ustar xavierxavier# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR Free Software Foundation, Inc. # FIRST AUTHOR , YEAR. # msgid "" msgstr "" "Project-Id-Version: music123 8\n" "POT-Creation-Date: 2002-07-26 04:36+0200\n" "Last-Translator: Grzegorz Kuśnierz \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=iso-8859-2\n" "Content-Transfer-Encoding: 8bit\n" # music123.adb msgid "music123 version %d by David Starner" msgstr "music123 wersja %d autorstwa David'a Starner'a" # music123.adb msgid "No arguments found." msgstr "Nie znaleziono argumentów." # music123.adb # changed by dvdeug msgid "Bad argument for -d." msgstr "Zły argument dla -d." # music123.adb # changed by dvdeug msgid "Missing argument for -d." msgstr "Brakujący argument dla -d." # music123.adb msgid "Missing argument for -@." msgstr "Brakujący argument dla -@." # music123.adb msgid "Unknown argument found." msgstr "Nieznany argument." # support_routines.adb msgid "music123: " msgstr "music123: " # support_routines.adb msgid "usage: music123 [-hqrvz] files ..." msgstr "składnia: music123 [-hqrvz] files ..." # support_routines.adb msgid "-h This help" msgstr "-h Ta pomoc" # support_routines.adb msgid "-q Run quiet" msgstr "-q Uruchom w trybie cichym" # support_routines.adb msgid "-r Recurse over directories" msgstr "-r Zagłębiaj się w katalogi" # support_routines.adb msgid "-v Print the version and exit" msgstr "-v Wyświetl informację o wersji i wyjdź" # support_routines.adb msgid "-z Randomize the filelist" msgstr "-z Odtwarzaj listę losowo" # support_routines.adb msgid "See the manpage for more options." msgstr "Zobacz stronę man aby zapoznać się z pozostałymi opcjami." # support_routines.adb msgid "Neither /etc/music123rc or ~/.music123rc found. Exiting." msgstr "Nie znaleziono /etc/music123rc ani ~/.music123rc. Wychodzę." # support_routines.adb msgid "The config file (~/.music123rc or /etc/music123rc) is corrupt." msgstr "Plik konfigurcji (~/.music123rc lub /etc/music123rc) jest nieprawidłowy." # support_routines.adb msgid "No valid filenames found." msgstr "Nie odnaleziono żadnych prawidłowych nazw plików." # support_routines.adb msgid "Playlist file not found." msgstr "Nie odnaleziono pliku playlisty." music123-16.3.orig/po/fr.po0000644000175000017500000000531211653110446014715 0ustar xavierxavier# french po file for music123 # Copyright (C) 2001 Free Software Foundation, Inc. # Martin Quinson , 2001, 2002. # msgid "" msgstr "" "Project-Id-Version: music123\n" "POT-Creation-Date: 2002-05-20 00:14-0500\n" "PO-Revision-Date: 2001-12-12 10:55+0100\n" "Last-Translator: Martin Quinson \n" "Language-Team: dlf \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=ISO-8859-1\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" # music123.adb msgid "music123 version %d by David Starner" msgstr "music123 version %d par David Starner" # music123.adb msgid "No arguments found." msgstr "Arguments introuvables." # music123.adb msgid "Bad argument for -d." msgstr "Paramčtre pour -d invalide." # music123.adb msgid "Missing argument for -d." msgstr "Paramčtre pour -d manquant." # music123.adb msgid "Missing argument for -@." msgstr "Paramčtre pour -@ manquant." # music123.adb msgid "Unknown argument found." msgstr "Argument inconnu trouvé." # support_routines.adb msgid "music123: " msgstr "music123 : " # support_routines.adb msgid "usage: music123 [-hqrvz] files ..." msgstr "usage : music123 [-hqrvz] fichiers ..." # support_routines.adb msgid "-h This help" msgstr "-h Afficher cette aide" # support_routines.adb msgid "-q Run quiet" msgstr "-q Exécuter silencieusement" # support_routines.adb msgid "-i Ignore extension case" msgstr "-i Ignorer la casse des extensions de fichier" # support_routines.adb msgid "-L List files and exit" msgstr "-L Donner la liste des fichier et sortir" # support_routines.adb msgid "-r Recurse over directories" msgstr "-r Parcourir les sous-répertoires récursivement" # support_routines.adb msgid "-v Print the version and exit" msgstr "-v Afficher la version et terminer" # support_routines.adb msgid "-z Randomize the filelist" msgstr "-z Utiliser la liste de fichiers dans un ordre aléatoire" # support_routines.adb msgid "See the manpage for more options." msgstr "Voir la page de manuel pour découvrir d'autres d'options." # support_routines.adb msgid "Neither /etc/music123rc or ~/.music123rc found. Exiting." msgstr "/etc/music123rc et ~/.music123rc sont tous les deux introuvables. Arręt." # support_routines.adb msgid "The config file (~/.music123rc or /etc/music123rc) is corrupt." msgstr "" "Le fichier de configuration (~/.music123rc ou /etc/music123rc) est corrompu." # support_routines.adb msgid "No valid filenames found." msgstr "Aucun nom de fichier valide n'a été trouvé." # support_routines.adb msgid "Playlist file not found." msgstr "Le fichier contenant la liste ŕ jouer est introuvable." music123-16.3.orig/changelog0000644000175000017500000000023711653110446015203 0ustar xavierxavierChanges to the source of this package are stored in a version control system, publicly available at http://www.ada-france.org:8081/branch/changes/org.music123 music123-16.3.orig/music123.10000644000175000017500000000416611653110446014766 0ustar xavierxavier.TH music123 1 "July 24, 2002" .SH NAME music123 \- plays various sound files (usually including MP3, Ogg and Wav). .SH SYNOPSIS .B music123 [ .B -hqrvz ] .I file .B ... .SH DESCRIPTION .B music123 is a shell around various command line programs to play music files. It will descend directories trees with \-r, and randomize file lists with \-z. The programs used and the options given them are listed in /etc/music123rc or ~/.music123rc. .SH OPTIONS .IP -h Show command help and exit; .IP -q Quiet mode. No messages are displayed. .IP -r Recurse into directories, instead of ignoring them. .IP -v Display version information and exit. .IP -z Play files in random order. .IP -Z Play the files randomly and endlessly. .IP -l Loop. \-z \-l differs from \-Z in that \-z \-l will randomize, play through the song list (without repetition) in random order once, and repeat the songs in that order over and over; \-Z will randomly play the songs, without any order, and will possibly play a song right after itself. .IP -i Ignore extension case. .IP -L List files and exit. .IP -T Start a task that handle commands, only one command supported : quit, using q or Q will quit the application at the end of the current song. .IP -D Set music123 not to delay between songs. (May make music123 harder to kill). .IP -d Customize the time music123 delays between songs. \-d takes one argument, expressed in seconds, which may have a fractional part. .IP -@ Play the files listed in the mandatory argument of -@. Other files can be added on the command line, and this option can be given several times. Note that music123 doesn't yet play URLs. .IP -- End option list. .SH EXAMPLES Play three songs: .RS .B music123 test1.ogg test2.mp3 test3.wav .RE .PP Play a couple of directories and other songs at random: .RS .B music123 -z -r Rock/ test1.ogg Pop/ test4.wav .RE .PP .SH FILES .TP /etc/music123rc Describes which programs .B music123 uses, which files types it supports, and which options it passes those programs. .TP ~/.music123rc Per-user config file to override the system wide settings. .PP .SH AUTHORS .TP Authors: .br David Starner .br music123-16.3.orig/Makefile0000644000175000017500000000566511653110446015003 0ustar xavierxavier#!/usr/bin/make MAIN := music123 GNATMAKE := gnatmake CFLAGS := -g -O2 -gnatf -gnatwa -gnaty -gnatwe LDFLAGS := GZIP_FLAGS := --best --name STRIP_OPTION := MSGFMT_FLAGS := DESTDIR := / PREFIX := usr/local INSTALL_BIN := $(DESTDIR)/$(PREFIX)/bin INSTALL_DOC := $(DESTDIR)/$(PREFIX)/share/doc/$(MAIN) INSTALL_ETC := $(DESTDIR)/etc INSTALL_EXAMPLES := $(DESTDIR)/$(PREFIX)/share/doc/$(MAIN)/examples INSTALL_LOCALE := $(DESTDIR)/$(PREFIX)/share/locale INSTALL_MAN := $(DESTDIR)/$(PREFIX)/share/man # Default target. .PHONY: build build: # build prerequisites will be added later .PHONY: install install:: build # install rules will be added later .PHONY: clean clean:: find . -name "*~" -delete # clean rules will be added later ########################################################################### # Documentation, examples and system-wide configuration install:: install -D --mode 644 README $(INSTALL_DOC)/README install -D --mode 644 music123rc.conf $(INSTALL_ETC)/music123rc install -D --mode 644 wavgzplay.sh.1 $(INSTALL_EXAMPLES)/wavgzplay.sh.1 install -D --mode 755 wavgzplay.sh $(INSTALL_EXAMPLES)/wavgzplay.sh ########################################################################### # Main executable build: $(MAIN) .PHONY: $(MAIN) # allways call gnatmake $(MAIN): $(GNATMAKE) $@ -cargs $(CFLAGS) -largs $(LDFLAGS) install:: install $(STRIP_OPTION) -D --mode 755 $(MAIN) $(INSTALL_BIN)/$(MAIN) clean:: rm -f $(MAIN) b~$(MAIN)* *.o *.ali ########################################################################### # Manpage MANPAGE := $(MAIN).1.gz build: $(MAIN).1.gz $(MAIN).1.gz: $(MAIN).1 gzip $(GZIP_FLAGS) $< --stdout > $@ install:: install -D --mode 644 $(MAIN).1.gz $(INSTALL_MAN)/man1/$(MAIN).1.gz clean:: rm -f $(MAIN).1.gz ########################################################################### # Manpages translations MAN_TRANSLATIONS := $(wildcard $(MAIN).*.1) MAN_TRANSLATION_LOCALES := $(patsubst $(MAIN).%.1,%,$(MAN_TRANSLATIONS)) MAN_TRANSLATION_TARGETS := $(addsuffix .man,$(MAN_TRANSLATION_LOCALES)) build: $(MAN_TRANSLATION_TARGETS) $(MAN_TRANSLATION_TARGETS): %.man: $(MAIN).%.1 gzip $(GZIP_FLAGS) $< --stdout > $@ install:: for locale in $(MAN_TRANSLATION_LOCALES); do \ install -D --mode 644 $$locale.man $(INSTALL_MAN)/$$locale/man1/$(MAIN).1.gz; \ done clean:: rm -f $(MAN_TRANSLATION_TARGETS) ########################################################################### # Gettext PO_FILES := $(wildcard po/*.po) MO_LOCALES := $(patsubst po/%.po,%,$(PO_FILES)) MO_TARGETS := $(addsuffix .mo,$(MO_LOCALES)) build: $(MO_TARGETS) $(MO_TARGETS): %.mo: po/%.po msgfmt $(MSGFMT_FLAGS) $< -o $@ install:: for locale in $(MO_LOCALES); do \ install -D --mode 644 $$locale.mo $(INSTALL_LOCALE)/$$locale/LC_MESSAGES/$(MAIN).mo; \ done clean:: rm -f $(MO_TARGETS) music123-16.3.orig/support_routines.adb0000644000175000017500000003730111653110446017447 0ustar xavierxavierwith Ada.Text_IO; with Ada.Characters.Latin_1; with Ada.Environment_Variables; with Ada.Numerics.Float_Random; use Ada.Numerics.Float_Random; with Ada.Calendar; use Ada.Calendar; with Ada.Strings.Fixed; with Ada.Characters.Handling; with Ada.Directories; with Intl; use Intl; with Interfaces.C; with Commands; package body Support_Routines is -- local function and procedures declarations function Matched_Extension (Extension_List : in Tool_List.Vector; Filename : String; Option_Ignore_Extension_Case : Boolean) return Tool; function Is_Whitespace (C : Character) return Boolean; function Home_Directory return String; function Shell_Fix (File : String) return String; -- end of declarations function Format_String (Format : String; Insert : String) return String is begin for I in Format'First .. Format'Last - 1 loop if Format (I) = '%' and then Format (I + 1) = 'd' then return Format (Format'First .. I - 1) & Insert & Format (I + 2 .. Format'Last); end if; end loop; return Format; -- XXX Raise exception instead??? end Format_String; procedure Error (Error_String : String) is use Ada.Text_IO; begin Put (Standard_Error, N ("music123: ") & Error_String); New_Line (Standard_Error); Put (Standard_Error, To_String (Version)); New_Line (Standard_Error); Put (Standard_Error, N ("usage: music123 [-hqrvz] files ...")); New_Line (Standard_Error); Put (Standard_Error, N ("-h This help")); New_Line (Standard_Error); Put (Standard_Error, N ("-q Run quiet")); New_Line (Standard_Error); Put (Standard_Error, N ("-i Ignore extension case")); New_Line (Standard_Error); Put (Standard_Error, N ("-L List files and exit")); New_Line (Standard_Error); Put (Standard_Error, N ("-r Recurse over directories")); New_Line (Standard_Error); Put (Standard_Error, N ("-v Print the version and exit")); New_Line (Standard_Error); Put (Standard_Error, N ("-z Randomize the filelist")); New_Line (Standard_Error); New_Line (Standard_Error); Put (Standard_Error, N ("See the manpage for more options.")); New_Line (Standard_Error); end Error; No_Home_Directory : exception; function Home_Directory return String is use Ada.Environment_Variables; begin if Exists ("HOME") then return Value ("HOME"); else raise No_Home_Directory; end if; end Home_Directory; function Is_Whitespace (C : Character) return Boolean is begin return (C = ' ') or else (C = Ada.Characters.Latin_1.HT); end Is_Whitespace; procedure Import_Conffile (Program_List : in out Tool_List.Vector) is use Ada.Text_IO; Error_String : constant String := N ("Neither /etc/music123rc or ~/.music123rc found. Exiting."); Conf_File : File_Type; Pointer_Start, Pointer_End : Natural; begin Program_List.Clear; begin Open (Conf_File, In_File, Home_Directory & "/.music123rc"); exception when others => begin Open (Conf_File, In_File, "/etc/music123rc"); exception when others => Error (Error_String); raise Noted_Error; end; end; while (not End_Of_File (Conf_File)) loop declare Line : constant String := Get_Line (Conf_File); This_Tool : Tool; begin if Line'Length > 4 and then Line (Line'First .. Line'First + 3) = "tool" then Pointer_Start := Line'First + 4; while Is_Whitespace (Line (Pointer_Start)) loop Pointer_Start := Pointer_Start + 1; end loop; Pointer_End := Pointer_Start; while not Is_Whitespace (Line (Pointer_End + 1)) loop Pointer_End := Pointer_End + 1; end loop; This_Tool.Program := To_Unbounded_String (Line (Pointer_Start .. Pointer_End)); Pointer_Start := Pointer_End + 1; while Is_Whitespace (Line (Pointer_Start)) loop Pointer_Start := Pointer_Start + 1; end loop; Pointer_End := Pointer_Start; while not Is_Whitespace (Line (Pointer_End + 1)) loop Pointer_End := Pointer_End + 1; end loop; This_Tool.Extension_List := To_Unbounded_String (Line (Pointer_Start .. Pointer_End)); Pointer_Start := Pointer_End + 1; while Line (Pointer_Start) /= '"' loop Pointer_Start := Pointer_Start + 1; end loop; Pointer_Start := Pointer_Start + 1; Pointer_End := Pointer_Start; while (Line (Pointer_End) /= '"') loop -- " -- Once again! Pointer_End := Pointer_End + 1; end loop; Pointer_End := Pointer_End - 1; This_Tool.Options := To_Unbounded_String (Line (Pointer_Start .. Pointer_End)); Program_List.Append (This_Tool); end if; end; end loop; Close (Conf_File); end Import_Conffile; Null_Tool : constant Tool := (To_Unbounded_String ("/dev/null"), Null_Unbounded_String, Null_Unbounded_String); function Matched_Extension (Extension_List : in Tool_List.Vector; Filename : String; Option_Ignore_Extension_Case : Boolean) return Tool is Pointer_Start, Pointer_End : Natural; begin for I in Extension_List.First_Index .. Extension_List.Last_Index loop declare Ext_List : constant String := To_String (Extension_List.Element (I).Extension_List); begin Pointer_Start := Ext_List'First; Pointer_End := Ext_List'First; while Pointer_End < Ext_List'Last loop while Pointer_End /= Ext_List'Last and then Ext_List (Pointer_End + 1) /= ',' loop Pointer_End := Pointer_End + 1; end loop; declare Extension_String : constant String := "." & Ext_List (Pointer_Start .. Pointer_End); begin if Filename'Length > Pointer_End - Pointer_Start + 1 then declare End_File_Name : constant String := Filename (Filename'Last + Pointer_Start - Pointer_End - 1 .. Filename'Last); use Ada.Characters.Handling; begin if End_File_Name = Extension_String then return Extension_List.Element (I); end if; if Option_Ignore_Extension_Case then if To_Lower (End_File_Name) = To_Lower (Extension_String) then return Extension_List.Element (I); end if; end if; end; end if; end; Pointer_Start := Pointer_End + 2; Pointer_End := Pointer_Start; end loop; end; end loop; return Null_Tool; end Matched_Extension; function Check_Filename (Full_Name : String; Extension_List : Tool_List.Vector; Option_Ignore_Extension_Case : Boolean) return Boolean is use Ada.Directories; begin return Exists (Full_Name) and then (Kind (Full_Name) = Directory or else Matched_Extension (Extension_List, Full_Name, Option_Ignore_Extension_Case) /= Null_Tool); end Check_Filename; procedure Expand_And_Check_Filenames (File_List : in out UString_List.Vector; Option_Recurse : in Boolean; Extension_List : in Tool_List.Vector; Option_Ignore_Extension_Case : in Boolean ) is use Ada.Directories; Temporary_File_List : UString_List.Vector; procedure Check_And_Append (Directory_Entry : in Directory_Entry_Type); procedure Check_And_Append (Directory_Entry : in Directory_Entry_Type) is -- Adding, then removing the file was -- creating a O(N^2) result. Check it first. Simple : constant String := Simple_Name (Directory_Entry); Full_Path : constant String := Full_Name (Directory_Entry); begin if Simple /= "." and then Simple /= ".." and then Check_Filename (Full_Path, Extension_List, Option_Ignore_Extension_Case) then Temporary_File_List.Append (Full_Path); end if; end Check_And_Append; I : Integer; Error_String : constant String := N ("The config file (~/.music123rc or /etc/music123rc) is corrupt."); begin if Extension_List.Is_Empty then Error (Error_String); raise Noted_Error; end if; I := File_List.First_Index; while I <= File_List.Last_Index loop declare Current_File : constant String := File_List.Element (I); begin if not Exists (Current_File) then File_List.Delete (I); elsif Kind (Current_File) = Directory then File_List.Delete (I); if Option_Recurse then begin Temporary_File_List.Clear; Search (Directory => Current_File, Pattern => "", Process => Check_And_Append'Access); File_Sorting.Sort (Temporary_File_List); File_List.Append (Temporary_File_List); Temporary_File_List.Clear; exception -- Name_Error should not happen here when Use_Error => null; -- no recurse after all end; end if; else I := I + 1; end if; end; end loop; if File_List.Is_Empty then Error (N ("No valid filenames found.")); raise Noted_Error; end if; end Expand_And_Check_Filenames; procedure Randomize_Names (File_List : in out UString_List.Vector) is J : Positive; Gen : Generator; begin Reset (Gen, Integer (Seconds (Clock) * 10.0)); -- From Knuth, TAOCP vol. 2, edition 3, page 146, 3.4.2, algorithm P for I in reverse File_List.First_Index + 1 .. File_List.Last_Index loop J := Integer (Float'Floor (Random (Gen) * Float (I + File_List.First_Index - 1))) + File_List.First_Index; File_List.Swap (I, J); end loop; end Randomize_Names; function Shell_Fix (File : String) return String is begin if File'Length = 1 then if File = "'" then return "'""'""'"; else return File; end if; elsif File (File'First) = ''' then return "'""'""'" & Shell_Fix (File (File'First + 1 .. File'Last)); else return File (File'First) & Shell_Fix (File (File'First + 1 .. File'Last)); end if; end Shell_Fix; procedure Display_Songs (File_List : in UString_List.Vector) is procedure Display_Song (Cursor : UString_List.Cursor); procedure Display_Song (Cursor : UString_List.Cursor) is begin Ada.Text_IO.Put_Line (UString_List.Element (Cursor)); end Display_Song; begin UString_List.Iterate (File_List, Display_Song'Access); end Display_Songs; procedure Play_Songs (File_List : in out UString_List.Vector; Program_List : in Tool_List.Vector; Delay_Length : in Duration; Option_Quiet : in Boolean; Option_Loop : in Boolean; Option_Random : in Boolean; Option_Eternal_Random : in Boolean; Option_Ignore_Extension_Case : in Boolean ) is use Interfaces.C; function System (Command : char_array) return Integer; pragma Import (C, System, "system"); procedure Play_A_Song (File_Name : in String; Option_Quiet : in Boolean); procedure Play_A_Song (File_Name : in String; Option_Quiet : in Boolean) is pragma Warnings (Off); System_Result : Integer; pragma Warnings (On); This_Program : Tool; begin This_Program := Matched_Extension (Program_List, File_Name, Option_Ignore_Extension_Case); if Option_Quiet then declare System_String : constant String := To_String (This_Program.Program & " " & This_Program.Options & " '" & Shell_Fix (File_Name) & "'" & ">/dev/null 2>/dev/null"); begin System_Result := System (To_C (System_String)); end; else declare System_String : constant String := To_String (This_Program.Program & " " & This_Program.Options & " '" & Shell_Fix (File_Name) & "'"); begin System_Result := System (To_C (System_String)); end; end if; end Play_A_Song; Gen : Generator; begin if Option_Eternal_Random then Reset (Gen, Integer (Seconds (Clock) * 10.0)); declare Len : constant Natural := File_List.Last_Index - File_List.First_Index + 1; Song_Number : Positive; begin loop Song_Number := Integer (Float'Floor (Random (Gen) * Float (Len))) + 1; exit when Commands.Repository.Have_To_Quit; Play_A_Song (File_List.Element (Song_Number), Option_Quiet); end loop; end; end if; if Option_Random then Randomize_Names (File_List); end if; loop for I in File_List.First_Index .. File_List.Last_Index loop exit when Commands.Repository.Have_To_Quit; Play_A_Song (File_List.Element (I), Option_Quiet); delay (Delay_Length); end loop; exit when Commands.Repository.Have_To_Quit; exit when not Option_Loop; end loop; end Play_Songs; procedure Read_Playlist (Full_Name : String; File_List : in out UString_List.Vector) is use Ada.Text_IO; Playlist : File_Type; begin begin Open (Playlist, In_File, Full_Name); exception when others => Error (N ("Playlist file not found.")); raise Noted_Error; end; while (not End_Of_File (Playlist)) loop declare Line : constant String := Ada.Strings.Fixed.Trim (Get_Line (Playlist), Ada.Strings.Both); begin if Line /= "" and then Line (1) /= '#' then File_List.Append (Line); end if; end; end loop; Close (Playlist); end Read_Playlist; end Support_Routines; music123-16.3.orig/commands.ads0000644000175000017500000000043411653110446015622 0ustar xavierxavierpackage Commands is task type Handler_Task is entry Start; entry Stop; end Handler_Task; protected Repository is procedure Quit; function Have_To_Quit return Boolean; private Quit_Pressed : Boolean := False; end Repository; end Commands; music123-16.3.orig/wavgzplay.sh0000644000175000017500000000013411653110446015705 0ustar xavierxavier#!/bin/sh FILENAME=`tempfile -s .wav` zcat "$1" > $FILENAME music123 $FILENAME rm $FILENAME music123-16.3.orig/music123.pl.10000644000175000017500000000465511653110446015403 0ustar xavierxavier.TH music123 1 "25 lipiec 2002" .SH NAZWA music123 \- odtwarza różne pliki dźwiękowe (w tym MP3, Ogg i Wav). .SH SKŁADNIA .B music123 [ .B -hqrvz ] .I plik .B ... .SH OPIS .B music123 jest powłoką wokół różnych programów służących do odtwarzania plików muzycznych. Może zagłębiać się w strukturę katalogów przy pomocy \-r oraz losowo odtwarzać utwory przy pomozy \-z. Używane programy i opcje im przekazywane są zawarte w plikach /etc/music123rc lub ~/.music123rc. .SH OPCJE .IP -h Pokaż pomoc do polecenia i zakończ działanie. .IP -q Tryb cichy. Żadne komunikaty nie są wyświetlane. .IP -r Rekurencyjnie zagłębiaj się w katalogi, zamiast je ignorować. .IP -v Pokaż informację o wersji programu i zakończ działanie. .IP -z Odtwarzaj pliki w losowej kolejności. .IP -Z Odtwarzaj pliki w losowej kolejności i bez końca. .IP -l Pętla. \-z \-l różni się od \-Z tym, że \-z \-l najpierw wylosuje kolejność, a następnie będzie odtwarzał pliki w tejże kolejności raz po raz; \-Z zaś odtwarza piosenki w losowej kolejności pozbawionej jakiegokolwiek porządku, w zwiazku z czym istnieje możliwość odtworzenia tego samego pliku dwa (lub więcej) razy pod rząd. .IP -i Ignore extension case. .IP -L List files and exit. .IP -T Start a task that handle commands, only one command supported : quit, using q or Q will quit the application at the end of the current song. .IP -D Nie rób przerw między piosenkami (może uczynić music123 trudniejszym do zabicia) .IP -d Ustawia długość przerw między piosenkami. \-d przyjmuje jeden argument, wyrażony w sekundach. Czas może zawierać część ułamkową. .IP -@ Odtwarzaj pliki wymienione w obowiązkowym argumencie do -@. Inne pliki mogą być dodane z linii poleceń. Ta opcja może być podana kilkakrotnie. Zauważ, że music123 jeszcze nie odtwarza URLi. .IP -- Koniec listy opcji. .SH PRZYKŁADY Odtwórz trzy piosenki: .RS .B music123 test1.ogg test2.mp3 test3.wav .RE .PP Odtwórz losowo parę katalogów i piosenek: .RS .B music123 -z -r Rock/ test1.ogg Pop/ test4.wav .RE .PP .SH PLIKI .TP /etc/music123rc Opisuje których programów .B music123 ma użyć, jakie typy plików obsługuje i jakie opcje przekazuje tymże programom. .TP ~/.music123rc Indywidualne ustawienia danego użytkownika. .PP .SH AUTORZY .TP Autorzy: .br David Starner .br .SH TŁUMACZENIE .TP Tłumacze: .br Grzegorz Kuśnierz .br music123-16.3.orig/wavgzplay.sh.10000644000175000017500000000134411653110446016050 0ustar xavierxavier.\" Hey, EMACS: -*- nroff -*- .TH wavgzplay.sh 1 "August 3, 2001" .SH NAME wavgzplay.sh \- a wav.gz player using music123 .SH SYNOPSIS .B wavgzplay.sh file.wav.gz .SH DESCRIPTION This manual page documents briefly the .B wavgzplay.sh command. .PP \fBwavgzplay.sh\fP is a gzipped wave file player. It unzips a wav.gz file and feeds the wav file to music123. A terribly simple script. .SH OPTIONS There are no options. .SH BUGS Certain file names with ' " ` and probably other characters in them won't work, and you can probably run arbitrary code with the right filenames. That's why this is in examples rather than /usr/bin. .SH AUTHOR This manual page was written by David Starner . music123-16.3.orig/music123.adb0000644000175000017500000001113311653110446015344 0ustar xavierxavier-- music123 by David Starner -- See debian/copyright with Ada.Command_Line; use Ada.Command_Line; with Ada.Strings.Unbounded; use Ada.Strings.Unbounded; with Ada.Text_IO; with Support_Routines; use Support_Routines; with Intl; use Intl; with Commands; procedure Music123 is Arg_Num : Positive; Option_Task : Boolean := False; Option_Quiet : Boolean := False; Option_Recurse : Boolean := False; Option_Random : Boolean := False; Option_Loop : Boolean := False; Option_Eternal_Random : Boolean := False; Option_Ignore_Extension_Case : Boolean := False; Option_List_Files_Only : Boolean := False; Delay_Length : Duration := 0.5; File_List : UString_List.Vector; Program_List : Tool_List.Vector; Command_Task : Commands.Handler_Task; function N (Msg : String) return String renames Gettext; begin Set_Locale; Text_Domain ("music123"); Bind_Text_Domain ("music123", "/usr/share/locale"); Version := To_Unbounded_String (Format_String (N ("music123 version %d by David Starner"), "16")); -- Import conffile first Import_Conffile (Program_List); -- Read command-line arguments if Argument_Count = 0 then Error (N ("No arguments found.")); raise Noted_Error; end if; Arg_Num := 1; while Arg_Num <= Argument_Count loop if Argument (Arg_Num) = "-h" then Error (""); Set_Exit_Status (Success); return; elsif Argument (Arg_Num) = "-q" then Option_Quiet := True; elsif Argument (Arg_Num) = "-z" then Option_Random := True; elsif Argument (Arg_Num) = "-Z" then Option_Eternal_Random := True; elsif Argument (Arg_Num) = "-l" then Option_Loop := True; elsif Argument (Arg_Num) = "-r" then Option_Recurse := True; elsif Argument (Arg_Num) = "-i" then Option_Ignore_Extension_Case := True; elsif Argument (Arg_Num) = "-v" then Ada.Text_IO.Put (To_String (Version)); Ada.Text_IO.New_Line; Set_Exit_Status (Success); return; elsif Argument (Arg_Num) = "-D" then Delay_Length := 0.0; elsif Argument (Arg_Num) = "-d" then if Arg_Num < Argument_Count then begin Delay_Length := Duration'Value (Argument (Arg_Num + 1)); Arg_Num := Arg_Num + 1; exception when others => Error (N ("Bad argument for -d.")); raise Noted_Error; end; else Error (N ("Missing argument for -d.")); raise Noted_Error; end if; elsif Argument (Arg_Num) = "-@" then if Arg_Num < Argument_Count then Read_Playlist (Argument (Arg_Num + 1), File_List); Arg_Num := Arg_Num + 1; else Error (N ("Missing argument for -@.")); raise Noted_Error; end if; elsif Argument (Arg_Num) = "-L" then Option_List_Files_Only := True; elsif Argument (Arg_Num) = "-T" then Option_Task := True; elsif Argument (Arg_Num) = "--" then for I in Arg_Num + 1 .. Argument_Count loop if Check_Filename (Argument (I), Program_List, Option_Ignore_Extension_Case) then File_List.Append (Argument (I)); end if; end loop; Arg_Num := Argument_Count + 1; elsif Argument (Arg_Num) (1) = '-' then Error (N ("Unknown argument found.")); raise Noted_Error; else if Check_Filename (Argument (Arg_Num), Program_List, Option_Ignore_Extension_Case) then File_List.Append (Argument (Arg_Num)); end if; end if; Arg_Num := Arg_Num + 1; end loop; Expand_And_Check_Filenames (File_List, Option_Recurse, Program_List, Option_Ignore_Extension_Case); if Option_List_Files_Only then Display_Songs (File_List); return; end if; if Option_Task then Command_Task.Start; end if; Play_Songs (File_List, Program_List, Delay_Length => Delay_Length, Option_Quiet => Option_Quiet, Option_Loop => Option_Loop, Option_Random => Option_Random, Option_Eternal_Random => Option_Eternal_Random, Option_Ignore_Extension_Case => Option_Ignore_Extension_Case); if Option_Task then Command_Task.Stop; end if; exception when Noted_Error => Set_Exit_Status (Failure); end Music123; music123-16.3.orig/intl.adb0000644000175000017500000001037011653110446014746 0ustar xavierxavier----------------------------------------------------------------------- -- GtkAda - Ada95 binding for the Gimp Toolkit -- -- -- -- Copyright (C) 2000 -- -- Emmanuel Briot, Joel Brobecker and Arnaud Charlet -- -- -- -- This library 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 library 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 library; if not, write to the -- -- Free Software Foundation, Inc., 59 Temple Place - Suite 330, -- -- Boston, MA 02111-1307, USA. -- -- -- -- As a special exception, if other files instantiate generics from -- -- this unit, or you link this unit with other files to produce an -- -- executable, this unit does not by itself cause the resulting -- -- executable to be covered by the GNU General Public License. This -- -- exception does not however invalidate any other reasons why the -- -- executable file might be covered by the GNU Public License. -- ----------------------------------------------------------------------- with System; with Interfaces.C.Strings; use Interfaces.C.Strings; package body Intl is ------------- -- Gettext -- ------------- function Gettext (Msg : String) return String is function Internal (Msg : String) return chars_ptr; pragma Import (C, Internal, "gettext"); begin return Value (Internal (Msg & ASCII.NUL)); end Gettext; -------------- -- Dgettext -- -------------- function Dgettext (Domain : String; Msg : String) return String is function Internal (Domain, Msg : String) return chars_ptr; pragma Import (C, Internal, "dgettext"); begin return Value (Internal (Domain & ASCII.NUL, Msg & ASCII.NUL)); end Dgettext; --------------- -- Dcgettext -- --------------- function Dcgettext (Domain : String; Msg : String; Category : Integer) return String is function Internal (Domain, Msg : String; Category : Integer) return chars_ptr; pragma Import (C, Internal, "dcgettext"); begin return Value (Internal (Domain & ASCII.NUL, Msg & ASCII.NUL, Category)); end Dcgettext; ------------------------- -- Default_Text_Domain -- ------------------------- function Default_Text_Domain return String is function Internal (Domain : System.Address) return chars_ptr; pragma Import (C, Internal, "textdomain"); begin return Value (Internal (System.Null_Address)); end Default_Text_Domain; ----------------- -- Text_Domain -- ----------------- procedure Text_Domain (Domain : String := "") is procedure Internal (Domain : String); pragma Import (C, Internal, "textdomain"); begin Internal (Domain & ASCII.NUL); end Text_Domain; ---------------------- -- Bind_Text_Domain -- ---------------------- procedure Bind_Text_Domain (Domain : String; Dirname : String) is procedure Internal (Domain, Dirname : String); pragma Import (C, Internal, "bindtextdomain"); begin Internal (Domain & ASCII.NUL, Dirname & ASCII.NUL); end Bind_Text_Domain; procedure Set_Locale is procedure Internal (Category : Integer; Locale : String); pragma Import (C, Internal, "setlocale"); LC_ALL : constant := 6; begin Internal (LC_ALL, "" & ASCII.NUL); end Set_Locale; end Intl; music123-16.3.orig/commands.adb0000644000175000017500000000233711653110446015605 0ustar xavierxavierwith Ada.Text_IO; package body Commands is ------------------ -- Handler_Task -- ------------------ task body Handler_Task is Available : Boolean; C : Character; begin select accept Start; or terminate; end select; loop Ada.Text_IO.Get_Immediate (C, Available); if Available then case C is when 'q' | 'Q' => Repository.Quit; select accept Stop; exit; or terminate; end select; when others => null; end case; end if; select accept Stop; exit; or delay 0.5; end select; end loop; end Handler_Task; protected body Repository is procedure Quit is begin Quit_Pressed := True; Ada.Text_IO.New_Line; Ada.Text_IO.Put_Line ("music213 will end at the end of this song"); end Quit; function Have_To_Quit return Boolean is begin return Quit_Pressed; end Have_To_Quit; end Repository; end Commands; music123-16.3.orig/support_routines.ads0000644000175000017500000000356611653110446017476 0ustar xavierxavierwith Ada.Containers.Vectors; with Ada.Containers.Indefinite_Vectors; with Ada.Strings.Unbounded; use Ada.Strings.Unbounded; with Intl; package Support_Routines is package UString_List is new Ada.Containers.Indefinite_Vectors (Positive, String); package File_Sorting is new UString_List.Generic_Sorting ("<"); function N (Msg : String) return String renames Intl.Gettext; Version : Unbounded_String; Noted_Error : exception; type Tool is record Program : Unbounded_String; Extension_List : Unbounded_String; Options : Unbounded_String; end record; package Tool_List is new Ada.Containers.Vectors (Positive, Tool); function Format_String (Format : String; Insert : String) return String; procedure Error (Error_String : String); procedure Import_Conffile (Program_List : in out Tool_List.Vector); procedure Expand_And_Check_Filenames (File_List : in out UString_List.Vector; Option_Recurse : in Boolean; Extension_List : in Tool_List.Vector; Option_Ignore_Extension_Case : in Boolean); procedure Display_Songs (File_List : in UString_List.Vector); procedure Play_Songs (File_List : in out UString_List.Vector; Program_List : in Tool_List.Vector; Delay_Length : in Duration; Option_Quiet : in Boolean; Option_Loop : in Boolean; Option_Random : in Boolean; Option_Eternal_Random : in Boolean; Option_Ignore_Extension_Case : in Boolean); procedure Randomize_Names (File_List : in out UString_List.Vector); procedure Read_Playlist (Full_Name : String; File_List : in out UString_List.Vector); function Check_Filename (Full_Name : String; Extension_List : Tool_List.Vector; Option_Ignore_Extension_Case : Boolean) return Boolean; end Support_Routines; music123-16.3.orig/intl.ads0000644000175000017500000001362211653110446014772 0ustar xavierxavier----------------------------------------------------------------------- -- GtkAda - Ada95 binding for the Gimp Toolkit -- -- -- -- Copyright (C) 2000 -- -- Emmanuel Briot, Joel Brobecker and Arnaud Charlet -- -- -- -- This library 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 library 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 library; if not, write to the -- -- Free Software Foundation, Inc., 59 Temple Place - Suite 330, -- -- Boston, MA 02111-1307, USA. -- -- -- -- As a special exception, if other files instantiate generics from -- -- this unit, or you link this unit with other files to produce an -- -- executable, this unit does not by itself cause the resulting -- -- executable to be covered by the GNU General Public License. This -- -- exception does not however invalidate any other reasons why the -- -- executable file might be covered by the GNU Public License. -- ----------------------------------------------------------------------- -- -- -- This package provides support for string internationalization using the -- libintl library. -- -- To change the current locale setting, use on the environment variables -- "LANG" or "LC_MESSAGES". For example, to switch to the french locale using -- bash: -- -- $ export LANG=fr -- -- Depending on the specific implementation of gettext, the following -- environment variables may be set to change the default settings of locale -- parameters: -- -- - LANG Specifies locale name. -- -- - LC_MESSAGES -- Specifies messaging locale, and if present overrides -- LANG for messages. -- -- - TEXTDOMAIN -- Specifies the text domain name, which is identical to -- the message object filename without .mo suffix. -- -- - TEXTDOMAINDIR -- Specifies the pathname to the message database, and if -- present replaces the default (e.g /usr/lib/locale on Solaris, -- /usr/share/locale on Linux). -- -- See the gettext documentation of your specific OS for more details. -- -- The recommended way to use the gettext capability in your application is -- to use Dgettext with your own domain, and define the following shortcut: -- -- function "-" (Msg : String) return String; -- -- Convenient shortcut to the Gettext function. -- -- function "-" (Msg : String) return String is -- begin -- return Dgettext ("my_domain", Msg); -- end "-"; -- -- Do not forget to call Bind_Text_Domain ("my_domain", "my locale prefix") -- at the beginning of your program. For example, if the prefix of your -- application is /usr, the standard location of the locale would -- be /usr/share/locale, e.g: -- Bind_Text_Domain ("GtkAda", "/usr/share/locale"); -- -- Under this locale directory, the functions provided by this package -- will look for the directory $LANG/LC_MESSAGES, -- /usr/share/locale/fr/LC_MESSAGES in our example; and in this directory, -- the file .mo will be used, e.g -- /usr/share/locale/fr/LC_MESSAGES/GtkAda.mo -- -- The .mo files can be generated using the GNU tool msgfmt that takes a -- text file containing for each string the original and the translation. -- See msgfmt documentation for more details. -- Here is a sample translation file that can be used as an input for msgfmt: -- -- # gtkada-fr.po -- msgid "Help" -- msgstr "Aide" -- -- msgid "Yes" -- msgstr "Oui" -- -- $ msgfmt gtkada-fr.po -o gtkada-fr.gmo -- $ cp gtkada-fr.gmo /usr/share/locale/fr/LC_MESSAGES/GtkAda.mo -- -- Then, to enable the string translation in your application, use the "-" -- function defined above, e.g: -- -- Gtk_New (Label, -"Help"); -- Gtk_New (Label, -("Help ?") & ASCII.LF & -("Yes")); -- -- -- Rather than mess around with depending on gtkada, and hoping I'd -- never get in a situtation where I had to link in gtkada and gtk -- and xlibs, I just copied the code here. package Intl is pragma Preelaborate; function Gettext (Msg : String) return String; -- Look up Msg in the current default message catalog. -- Use the current locale as specified by LC_MESSAGES. If not found, return -- Msg itself (the default text). function Dgettext (Domain : String; Msg : String) return String; -- Look up Msg in the Domain message catalog for the current locale. function Dcgettext (Domain : String; Msg : String; Category : Integer) return String; -- Look up Msg in the Domain message catalog for the Category locale. function Default_Text_Domain return String; -- Return the current default message catalog. procedure Text_Domain (Domain : String := ""); -- Set the current default message catalog to Domain. -- If Domain is "", reset to the default of "messages". procedure Bind_Text_Domain (Domain : String; Dirname : String); -- Specify that the Domain message catalog will be found in Dirname. -- This overrides the default system locale data base. procedure Set_Locale; end Intl; music123-16.3.orig/README0000644000175000017500000000446311653110446014216 0ustar xavierxavierThis is music123 version 16.3 (new versioning policy to include minor changes and bug fixes) music123's goal in life is simple. With just mpg123 or ogg123, there was no way to randomly play a mixed batch of ogg's and mp3's. If you fed the wrong file to the wrong player, it would crash. xmms could randomly play mixed ogg's and mp3's, but I'm frequently not in X. I'm sure there's some ncurses solution out there, but I like the mpg123/ogg123 interface - I just want something that can handle mixed collections of files. So I wrote music123. music123 has a similar interface to mpg123 and ogg123. It'll play any type of file listed in its config file, the first found of ~/.music123rc or /etc/music123rc. The default config file includes lines for mp3, ogg, and wav. With older versions of vorbis-tools, only Ogg Vorbis files would play, but newer ones also handle Ogg Flac and Ogg Speex. ogg123, by default, has the default device set to /dev/null. Since music123 normally uses the default device of ogg123, it won't play ogg files if you haven't changed that option. Fixes include editing /etc/libao.conf to change the default device of ogg123, or change the ogg123 line in /etc/music123rc to include a device option for ogg123 in the quotes. This is a very simple shell; if the music doesn't play under your sound system, check the programs that music123 calls. In specific, both ogg123 and mpg321 use libao, so they can be set to use arts by setting "default_driver=arts" in /etc/libao.conf or ~/.libao, or by changing tool ogg123 ogg,Ogg,OGG "" to tool ogg123 ogg,Ogg,OGG "-d arts" in /etc/music123. (I generally recommend the first approach.) aplay, which plays wave files, is a Linux-only program; I, unfortunately, don't know a more general replacement. The half-second pause between songs is deliberate, so music123 can be killed by Control-C. Note that it can be removed with the -D option, or changed by -d. If anyone has added stuff to /etc/music123rc, I'd like to see it so I can add it into the master file (probably commented out). Note that it expects the exact same case for the extension as listed in that file. -- David Starner - dvdeug@debian.org Last change on December 16, 2756 AUC (2003 AD). -- Xavier Grave - xavier.grave@ipno.in2p3.fr Minor modification on March, 2010 music123-16.3.orig/music123rc.conf0000644000175000017500000000122611653110446016072 0ustar xavierxavier# This is the configuration file for music123 # A list of music playing programs follow for music123 to use # Format is # tool name_of_program extension1,extension2,... "options to be given before the file name" tool ogg123 ogg,Ogg,OGG "" tool ogg123 oga,Oga,OGA "" tool ogg123 spx,Spx,SPX "" tool mpg123 mp3,MP3,Mp3 "" #tool esdplay wav,Wav,WAV "" tool aplay wav,Wav,WAV "" # wavgzplay.sh depends on music123 being able to play wav files. # it's in examples because of known problems #tool wavgzplay.sh wav.gz "" # mplayer is a little heavy-weight; you might want to add -q to the options #tool mplayer ra,wmv "" music123-16.3.orig/TODO0000644000175000017500000000016111653110446014015 0ustar xavierxavier* TRANSLATION - -i message to translate - -L message to translate - remove english test from music123.pl.1