debian/0000775000000000000000000000000012260316776007202 5ustar debian/compat0000664000000000000000000000000212230045346010365 0ustar 9 debian/changelog0000664000000000000000000000055112260316776011055 0ustar morse2ascii (0.2+dfsg-1ubuntu1) trusty; urgency=medium * debian/patches/makefile.patch: Move $(LIBS) to the end of the call. -- Michael Bienia Mon, 30 Dec 2013 17:23:21 +0100 morse2ascii (0.2+dfsg-1) unstable; urgency=low * Initial release (Closes: #726660) -- Dominik George Thu, 17 Oct 2013 22:42:01 +0200 debian/morse2ascii.10000664000000000000000000000231112230043544011464 0ustar .TH MORSE2ASCII "1" "October 2013" "morse2ascii 0.2" "User Commands" .SH NAME morse2ascii \- tool for decoding the morse codes from a PCM WAV file .SH SYNOPSIS .B morse2ascii [\fIoptions\fR] \fI\fR .SH DESCRIPTION .PP This tool employs a volume/peak based method to decode the morse codes from a PCM WAV file as well as from text and RAW PCM files. .PP It contains some options for parsing abbreviations, prosigns and qcodes. .SH OPTIONS \fB\-a\fR abbreviations and prosigns parsing .PP \fB\-q\fR q\-codes parsing .PP \fB\-r\fR F C B consider the file as raw headerless PCM data, you must specify the Frequency, Channels and Bits like \fB\-r\fR 44100 2 16 .PP \fB\-o\fR disable the automatic optimizations: DC bias adjust and normalize. Use this option only if your file is already clean and normalized .PP \fB\-m\fR morse notation output (like ...___... instead of SOS), debug .PP \fB\-w\fR FILE debug option for dumping the handled samples from the memory to FILE .PP \fB\-d\fR debug info (WAV input only) .PP Note: the input file can be a PCM WAV audio file or also a text file which uses the dotlinespace notation (._ or .\-), dit\-dah, binary and others use \- as file for reading a text stream from stdin debian/copyright0000664000000000000000000000524212230044505011121 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: morse2ascii Source: http://aluigi.altervista.org/mytoolz.htm Files: * Copyright: 2008-2012 Luigi Auriemma License: GPL-2+ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. . This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. . You should have received a copy of the GNU General Public License along with this program. If not, see . On Debian systems, the complete text of the GNU General Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". Files: debian/* Copyright: 2013 Dominik George License: GPL-2+ This package is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. . This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. . You should have received a copy of the GNU General Public License along with this program. If not, see . On Debian systems, the complete text of the GNU General Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". Files: debian/patches/fix-undefined-behaviour.patch Copyright: 2013 Thorsten Glaser License: GPL-2+ This package is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. . This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. . You should have received a copy of the GNU General Public License along with this program. If not, see . On Debian systems, the complete text of the GNU General Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". debian/rules0000775000000000000000000000146112230050262010242 0ustar #!/usr/bin/make -f DEB_VERSION:=$(shell dpkg-parsechangelog -n1 | sed -n '/^Version: /s///p') DEB_UPSTREAM_VERSION:=$(shell DEB_VERSION=${DEB_VERSION}; echo $${DEB_VERSION%-*}) %: dh $@ get-orig-source: rm -rf debian/tmp; \ mkdir -p debian/tmp/morse2ascii-$(DEB_UPSTREAM_VERSION).orig cd debian/tmp; \ wget http://aluigi.altervista.org/mytoolz/morse2ascii.zip cd debian/tmp; \ echo "5a9fe366f1de016ecaf37bea02237f22aacd365a968a28267c98fc626664918ca024bc8b56818fed2695036d5b8d7600ad9d1b5920178353dd46e5a49efa85bb *morse2ascii.zip" \ | sha512sum -c cd debian/tmp/morse2ascii-$(DEB_UPSTREAM_VERSION).orig; \ unzip ../morse2ascii.zip; rm morse2ascii.exe cd debian/tmp; \ tar cvJf ../../morse2ascii_$(DEB_UPSTREAM_VERSION).orig.tar.xz \ morse2ascii-$(DEB_UPSTREAM_VERSION).orig/ rm -rf debian/tmp debian/patches/0000775000000000000000000000000012260316647010626 5ustar debian/patches/makefile.patch0000664000000000000000000000140412260316646013422 0ustar Author: Dominik George Description: Makes the Makefile accept variables from outside Forwarded: no --- a/Makefile +++ b/Makefile @@ -1,17 +1,17 @@ EXE = morse2ascii -CFLAGS += -O2 -s -PREFIX = /usr/local -BINDIR = $(PREFIX)/bin +BINDIR = $(DESTDIR)/usr/bin LIBS = -lm all: - $(CC) $(CFLAGS) -c morse2ascii.c - $(CC) $(CFLAGS) -c resample2.c - $(CC) $(CFLAGS) -o $(EXE) $(LIBS) morse2ascii.o resample2.o + $(CC) $(CPPFLAGS) $(CFLAGS) -c morse2ascii.c + $(CC) $(CPPFLAGS) $(CFLAGS) -c resample2.c + $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $(EXE) morse2ascii.o resample2.o $(LIBS) install: install -m 755 -d $(BINDIR) install -m 755 $(EXE) $(BINDIR)/$(EXE) -.PHONY: - install +clean: + rm -f morse2ascii *.o + +.PHONY: install all clean debian/patches/series0000664000000000000000000000005512230037706012034 0ustar fix-undefined-behaviour.patch makefile.patch debian/patches/fix-undefined-behaviour.patch0000664000000000000000000007653212253121325016360 0ustar Author: Thorsten Glaser Origin: https://www.mirbsd.org/cvs.cgi/ports/audio/morse2ascii/patches/ Forwarded: no Description: Fixes some undefined behaviour reported by gcc with pedantic build flags and valgrind --- a/abbreviations.h +++ b/abbreviations.h @@ -1,6 +1,6 @@ typedef struct { - char *code; - char *str; + const char *code; + const char *str; } abbreviations_t; abbreviations_t abbreviations[] = { --- a/morse2ascii.c +++ b/morse2ascii.c @@ -66,8 +66,8 @@ int do_mono(i16 *smp, int samples, int c void do_dcbias(i16 *smp, int samples); void do_normalize(i16 *smp, int samples); int do_reduce(i16 *smp, int samples, int *freq); -void my_err(u8 *err); -void std_err(void); +void my_err(const u8 *err) __attribute__((__noreturn__)); +void std_err(void) __attribute__((__noreturn__)); @@ -229,6 +229,7 @@ int main(int argc, char *argv[]) { } beep = do_beeps(smp, samples, &beeps); + free(smp); goto_beep2morse: if(beeps < 0) { @@ -264,10 +265,10 @@ int morse_output(u8 *beep) { qa = 0; u8 old, *p, - *l, - *s, - *z, - *x; + *l; + const u8 *s; + const u8 *z; + const u8 *x; p = beep; while(*p) { @@ -642,13 +643,13 @@ u8 *do_beeps(i16 *smp, int samples, int while(i < beeps) { if(beep[i]) { for(tmp = 0; (i < beeps) && beep[i]; tmp++, i++); - if(tmp <= med_on) beep[j++] = DOT; - else if(tmp > med_on) beep[j++] = DASH; + if(tmp <= (u32)med_on) beep[j++] = DOT; + else if(tmp > (u32)med_on) beep[j++] = DASH; } else { for(tmp = 0; (i < beeps) && !beep[i]; tmp++, i++); - if(tmp <= med_off) beep[j++] = GAP; - else if(tmp >= max_off) beep[j++] = MEDIUMGAP; - else if(tmp > med_off) beep[j++] = SHORTGAP; + if(tmp <= (u32)med_off) beep[j++] = GAP; + else if(tmp >= (u32)max_off) beep[j++] = MEDIUMGAP; + else if(tmp > (u32)med_off) beep[j++] = SHORTGAP; } } beeps = j; @@ -830,7 +831,7 @@ int do_reduce(i16 *smp, int samples, int -void my_err(u8 *err) { +void my_err(const u8 *err) { fprintf(stderr, "\nError: %s\n", err); exit(1); } --- a/mywav.h +++ b/mywav.h @@ -51,6 +51,21 @@ typedef struct { } mywav_fmtchunk; +int mywav_fwi08(FILE *fd, int num); +int mywav_fwi16(FILE *fd, int num); +int mywav_fwi32(FILE *fd, int num); +int mywav_fwmem(FILE *fd, const uint8_t *mem, int size); +int mywav_fwchunk(FILE *fd, mywav_chunk *chunk); +int mywav_fwfmtchunk(FILE *fd, mywav_fmtchunk *fmtchunk); +int mywav_fri08(FILE *fd, uint8_t *num); +int mywav_fri16(FILE *fd, uint16_t *num); +int mywav_fri32(FILE *fd, uint32_t *num); +int mywav_frmem(FILE *fd, uint8_t *mem, int size); +int mywav_frchunk(FILE *fd, mywav_chunk *chunk); +int mywav_frfmtchunk(FILE *fd, mywav_fmtchunk *fmtchunk); +int mywav_seekchunk(FILE *fd, const uint8_t *find); +int mywav_data(FILE *fd, mywav_fmtchunk *fmt); +int mywav_writehead(FILE *fd, mywav_fmtchunk *fmt, uint32_t data_size, uint8_t *more, int morelen); /* FILE WRITING */ @@ -83,7 +98,7 @@ int mywav_fwi32(FILE *fd, int num) { // data -int mywav_fwmem(FILE *fd, uint8_t *mem, int size) { +int mywav_fwmem(FILE *fd, const uint8_t *mem, int size) { if(size) { if(fwrite(mem, size, 1, fd) != 1) return(-1); } @@ -185,7 +200,7 @@ int mywav_frfmtchunk(FILE *fd, mywav_fmt /* MYWAV MAIN FUNCTIONS */ -int mywav_seekchunk(FILE *fd, uint8_t *find) { +int mywav_seekchunk(FILE *fd, const uint8_t *find) { mywav_chunk chunk; if(fseek(fd, sizeof(mywav_chunk) + 4, SEEK_SET) < 0) return(-1); --- a/qcodes.h +++ b/qcodes.h @@ -1,11 +1,11 @@ // may exist some errors, sorry typedef struct { - char *code; - char *question; - char *question_choices; - char *answer; - char *answer_choices; + const char *code; + const char *question; + const char *question_choices; + const char *answer; + const char *answer_choices; } qcodes_t; qcodes_t qcodes[] = { @@ -37,7 +37,7 @@ qcodes_t qcodes[] = { { "QAZ", "Are you experiencing communication difficulties through flying in a storm?", NULL, "I am experiencing communication difficulties through flying in a storm", NULL }, // Note: Attention is invited to the possible supplementary use of signals QAR, QBE, QCS, QRM, QRN, QRX, QSZ or the signal CL to amplify the meaning associated with signal QAZ. { "QBA", "What is the horizontal visibility at...(place)?", NULL, "The horizontal visibility at... (place) at...hours is... (distance figures and units).", NULL }, { "QBB", "What is the amount, type and height above official aerodrome elevation of the base of the cloud (at...(place)?", NULL, "The amount, type and height above official aerodrome elevation of the base of the cloud at... (place) at...hours is: ...eighths (...type) at...(figures and units)* height above official aerodrome elevation.", NULL }, // NOTE: The cloud amount, type (if reported) and vertical distance information is reported in sequence if several cloud layers are present, the order of reporting being from low to high levels in accordance with the following cloud layer specifications: a) the lowest individual layer of any amount; b) the next higher individual layer the amount of which is three-eighths or more (to the nearest eighth); c) the next higher individual layer the amount of which is five-eighths or more (to the nearest eighth). EXAMPLE: = QBB CYUL 1300 2 300 FT 3 1500 FT 6 9000 FT = - { "QBC", "Report meteorological conditions as observed from your aircraft at... (position or zone) at...hours at...(figures and units) height above...(datum).", NULL, "The meteorological conditions as observed from my aircraft at... (position or zone) at...hours at...(figures and units) height above...(datum) are..." }, // Note: The information may be given in AIREP, or Q Code form. When given in Q Code, the following sequence of Q signal QBC answer (or advice) forms is used: QMX, QNY, QAO, QDF, QMI, QFT and QNI.", NULL }, + { "QBC", "Report meteorological conditions as observed from your aircraft at... (position or zone) at...hours at...(figures and units) height above...(datum).", NULL, "The meteorological conditions as observed from my aircraft at... (position or zone) at...hours at...(figures and units) height above...(datum) are...", NULL }, // Note: The information may be given in AIREP, or Q Code form. When given in Q Code, the following sequence of Q signal QBC answer (or advice) forms is used: QMX, QNY, QAO, QDF, QMI, QFT and QNI.", NULL }, { "QBD", "How much fuel have you remaining (expressed as hours and/or minutes of consumption)?", NULL, "Fuel remaining is...(hours and/or minutes of consumption).", NULL }, { "QBE", NULL, NULL, "I am about to wind in my aerial.", NULL }, { "QBF", "Are you flying in cloud?", NULL, "I am flying in cloud at... (figures and units) height above...(datum) (and I am ascending (descending) to...(figures and units) height above that datum).", NULL }, @@ -54,7 +54,7 @@ qcodes_t qcodes[] = { { "QBQ", NULL, NULL, NULL, NULL }, { "QBR", NULL, NULL, NULL, NULL }, { "QBS", NULL, NULL, "Ascend (or descend) to... (figures and units) height above...(datum) before encountering instrument meteorological conditions or if visibility falls below... (figures and units of distance) and advise.", NULL }, - { "QBT", "How far, along the runway, from the approach end, can the observer at the runway threshold see the runway lights which will be in operation for my landing (at...(place))?", NULL, "At...hours, the observer at the threshold of runway number... could see the runway lights in operation for your landing (at...(place)) for a distance of...(figures and units) from the approach end." }, // Note: If the station inquired of is not equipped to make the special observation requested, the reply to QBT IMI is given by the signal QNO.", NULL }, + { "QBT", "How far, along the runway, from the approach end, can the observer at the runway threshold see the runway lights which will be in operation for my landing (at...(place))?", NULL, "At...hours, the observer at the threshold of runway number... could see the runway lights in operation for your landing (at...(place)) for a distance of...(figures and units) from the approach end.", NULL }, // Note: If the station inquired of is not equipped to make the special observation requested, the reply to QBT IMI is given by the signal QNO.", NULL }, { "QBU", NULL, NULL, NULL, NULL }, { "QBV", "Have you reached the... (figures and units) height above...(datum) (or... (area or place))?", NULL, "I have reached the...(figures and units) height above...(datum) (or...(area or place)). or Report reaching the...(figures and units) height above... (datum) (or...(area or place)).", NULL }, { "QBW", NULL, NULL, NULL, NULL }, @@ -92,7 +92,7 @@ qcodes_t qcodes[] = { { "QDC", NULL, NULL, NULL, NULL }, { "QDD", NULL, NULL, NULL, NULL }, { "QDE", NULL, NULL, NULL, NULL }, - { "QDF", "What is your D-Value at...(position)?", /* "What is the D-Value at... (place or position) at...hours) for the...millibar level?" */ NULL, "My D-Value at...(position) at... (figures and units) height above the 1013.2 millibars datum is...(D-Value figures and units)... *(specify plus or minus)." }, // or The D-Value at...(place or position) at hours for the...millibar level is...(D-Value figures and units...*(specify plus or minus)." }, // Note: When the true altitude (radio altitude) is greater than the pressure altitude PS (plus) is used and when it is less MS (minus) is used." + { "QDF", "What is your D-Value at...(position)?", /* "What is the D-Value at... (place or position) at...hours) for the...millibar level?" */ NULL, "My D-Value at...(position) at... (figures and units) height above the 1013.2 millibars datum is...(D-Value figures and units)... *(specify plus or minus).", NULL }, // or The D-Value at...(place or position) at hours for the...millibar level is...(D-Value figures and units...*(specify plus or minus)." }, // Note: When the true altitude (radio altitude) is greater than the pressure altitude PS (plus) is used and when it is less MS (minus) is used." { "QDG", NULL, NULL, NULL, NULL }, { "QDH", NULL, NULL, NULL, NULL }, { "QDI", NULL, NULL, NULL, NULL }, @@ -125,7 +125,7 @@ qcodes_t qcodes[] = { { "QEJ", "May I/you assume position for take-off?", NULL, "Cleared to hold at take-off position for runway number... and am holding.", NULL }, { "QEK", "Are you ready for immediate take-off?", NULL, "I am ready for immediate take-off.", NULL }, { "QEL", "May I take-off (and make a... hand turn after take-off)?", NULL, "You are cleared to take-off (turn as follows after take-off...).", NULL }, - { "QEM", "What is the condition of the landing surface at...(place)?", NULL, "The condition of the landing surface at...(place) is..." }, // Note: The information is given by sending appropriate NOTAM Code groups." + { "QEM", "What is the condition of the landing surface at...(place)?", NULL, "The condition of the landing surface at...(place) is...", NULL }, // Note: The information is given by sending appropriate NOTAM Code groups." { "QEN", "Shall I hold my position?", NULL, "Hold your position.", NULL }, { "QEO", "Shall I/you clear the runway (or landing area)?", NULL, "Clear the runway (or landing area).", NULL }, { "QEP", NULL, NULL, NULL, NULL }, @@ -139,9 +139,9 @@ qcodes_t qcodes[] = { { "QEX", NULL, NULL, NULL, NULL }, { "QEY", NULL, NULL, NULL, NULL }, { "QEZ", NULL, NULL, NULL, NULL }, - { "QFA", "What is the meteorological forecast for...(flight, route, section of route or zone) for the period...hours until ...hours?", NULL, "The meteorological forecast for...(flight, route, section of route or zone) for the period...hours until hours….is… " }, // Note: When the forecast is given in Q Code the following sequence of Q signal answer (or advice) forms is to be given: QAO, QMX, QMI, QNY, QBA, QMW, QFT and QNI." + { "QFA", "What is the meteorological forecast for...(flight, route, section of route or zone) for the period...hours until ...hours?", NULL, "The meteorological forecast for...(flight, route, section of route or zone) for the period...hours until hours….is… ", NULL }, // Note: When the forecast is given in Q Code the following sequence of Q signal answer (or advice) forms is to be given: QAO, QMX, QMI, QNY, QBA, QMW, QFT and QNI." { "QFB", NULL, NULL, "The... % lights are out of order.", "1) approach 2) runway 3) approach and runway" }, - { "QFC", "What is the amount, the type and the height above...(datum) of the base of the cloud at...(place, position or zone)?", NULL, "At...(place, position or zone) the base of the cloud is... eighths...type at...(figures and units) height above... (datum)." }, // Note: If several cloud layers or masses are present, the lowest is reported first." + { "QFC", "What is the amount, the type and the height above...(datum) of the base of the cloud at...(place, position or zone)?", NULL, "At...(place, position or zone) the base of the cloud is... eighths...type at...(figures and units) height above... (datum).", NULL }, // Note: If several cloud layers or masses are present, the lowest is reported first." { "QFD", "%", "1) Is the...visual beacon(at...(place)) in operation? 2) Will you switch on the... visual beacon (at...(place))? 3) Will you extinguish the aerodrome visual beacon (at...(place)) until I have landed?", "%", "1) The...visual beacon (at... (place)) is in operation. 2) I will switch on the... visual beacon (at...(place)). 3) I will extinguish the aerodrome visual beacon (at... (place)) until your landing is completed." }, { "QFE", "(At...(place)) what is the present atmospheric pressure at official aerodrome elevation?", NULL, "At...(place) the atmospheric pressure at official aerodrome elevation is (or was observed at...hours to be) ...millibars.", NULL }, { "QFF", "(At...(place)) what is the present atmospheric pressure converted to mean sea level in accordance with meteorological practice?", NULL, "At...(place) the atmospheric pressure converted to mean sea level in accordance with meteorological practice is (or was determined at...hours to be) ...millibars.", NULL }, @@ -154,22 +154,22 @@ qcodes_t qcodes[] = { { "QFM", "What height above..(datum)... %", "1) should I maintain? 2) are you maintaining? 3) do you intend cruising at?", "%", "1) Maintain (or fly at)... (figures and units) height above...(datum). 2) I am maintaining...(figures and units) height above ...(datum). 3) I intend cruising at... (figures and units) height above...(datum)." }, { "QFN", NULL, NULL, NULL, NULL }, { "QFO", "May I land immediately?", NULL, "You may land immediately.", NULL }, - { "QFP", "Will you give me the latest information concerning... facility (at...(place))?", NULL, "The latest information concerning...facility (at... (place)) is as follows..." }, // Note: The information is given by sending appropriate NOTAM Code groups." + { "QFP", "Will you give me the latest information concerning... facility (at...(place))?", NULL, "The latest information concerning...facility (at... (place)) is as follows...", NULL }, // Note: The information is given by sending appropriate NOTAM Code groups." { "QFQ", "Are the approach and runway lights lit?", NULL, "The approach and runway lights are lit.", NULL }, { "QFR", "Does my landing gear appear damaged?", NULL, "Your landing gear appears damaged.", NULL }, { "QFS", "Is the...radio facility at...(place) in operation?", NULL, "The...radio facility at...(place) is in operation (or will be in operation in...hours).", NULL }, { "QFT", "Between what heights above...(datum) has ice formation been observed (at...(position or zone))?", NULL, "Ice formation has been observed at ...(position or zone) in the type of...and with an accretion rate of...between...(figures and units) and...(figures and units) heights above...(datum).", NULL }, - { "QFU", "What is the magnetic direction (or number) of the runway to be used?", NULL, "The magnetic direction (or number) of the runway to be used is..." }, // Note: The runway number is indicated by a two-figure group and the magnetic direction by a three-figure group." + { "QFU", "What is the magnetic direction (or number) of the runway to be used?", NULL, "The magnetic direction (or number) of the runway to be used is...", NULL }, // Note: The runway number is indicated by a two-figure group and the magnetic direction by a three-figure group." { "QFV", "Are the floodlights switched on?", NULL, "The floodlights are switched on.", NULL }, { "QFW", "What is the length of the runway in use in...(units)?", NULL, "The length of runway...now in use is...(figures and units).", NULL }, { "QFX", NULL, NULL, "I am working (or am going to work) on a fixed aerial.", NULL }, - { "QFY", "Please report the present meteorological landing conditions (at...(place)).", NULL, "The present meteorological landing conditions at...(place) are..." }, // Note: When given in Q Code the information is sent in the following sequence: QAN, QBA, QNY, QBB, QNH, and/or QFE and, if necessary, QMU, QNT, QBJ. It is not normally necessary to precede the QAN, QBA, QNY and QBB information by these Q signals but this may be done if considered desirable." - { "QFZ", "What is the aerodrome meteorological forecast for...(place) for the period...hours until...hours?", NULL, "The aerodrome meteorological forecast for...(place) for the period...hours until...hours is..." }, // Note: When given in Q Code the following sequence of Q signal answer (or advice) forms is to be used: QAN, QBA, QNY, QBB and, if necessary, QMU, QNT and QBJ. + { "QFY", "Please report the present meteorological landing conditions (at...(place)).", NULL, "The present meteorological landing conditions at...(place) are...", NULL }, // Note: When given in Q Code the information is sent in the following sequence: QAN, QBA, QNY, QBB, QNH, and/or QFE and, if necessary, QMU, QNT, QBJ. It is not normally necessary to precede the QAN, QBA, QNY and QBB information by these Q signals but this may be done if considered desirable." + { "QFZ", "What is the aerodrome meteorological forecast for...(place) for the period...hours until...hours?", NULL, "The aerodrome meteorological forecast for...(place) for the period...hours until...hours is...", NULL }, // Note: When given in Q Code the following sequence of Q signal answer (or advice) forms is to be used: QAN, QBA, QNY, QBB and, if necessary, QMU, QNT and QBJ. { "QGA", NULL, NULL, NULL, NULL }, { "QGB", NULL, NULL, NULL, NULL }, { "QGC", NULL, NULL, "There are obstructions to the... of runway...", NULL }, { "QGD", "Are there on my track any obstructions whose elevation equals or exceeds my altitude?", NULL, "There are obstructions on your track ...(figures and units) height above...(datum).", NULL }, - { "QGE", "What is my distance to your station (or to...)?", NULL, "Your distance to my station (or to...) is...(distance figures and units)." }, // Note: This signal is normally used in conjunction with one of the signals QDM, QDR, QTE or QUJ. + { "QGE", "What is my distance to your station (or to...)?", NULL, "Your distance to my station (or to...) is...(distance figures and units).", NULL }, // Note: This signal is normally used in conjunction with one of the signals QDM, QDR, QTE or QUJ. { "QGF", NULL, NULL, NULL, NULL }, { "QGG", NULL, NULL, NULL, NULL }, { "QGH", "May I land using... (procedure or facility)?", NULL, "You may land using...(procedure or facility).", NULL }, @@ -343,7 +343,7 @@ qcodes_t qcodes[] = { { "QMU", "What is the surface temperature at...(place) and what is the dew point temperature at that place?", NULL, "The surface temperature at...(place) at ... hours is...degrees and the dew point temperature at that time and place is...degrees.", NULL }, { "QMV", NULL, NULL, NULL, NULL }, { "QMW", "At...(position or zone) what is (are) the height(s) above...(datum) of the zero Celsius isotherm(s)?", NULL, "At...(position or zone) the zero Celsius isotherm(s) is (are) at...(figures and units) height(s) above ...(datum).", NULL }, - { "QMX", "What is the air temperature (at... (position or zone)) (at...hours) at the... (figures and units) height above... (datum)?", NULL, "At...(position or zone) at... hours the air temperature is...(degrees and units) at... (figures and units) height above...(datum)." }, // Note: Aircraft reporting QMX information will transmit the temperature figures as corrected for airspeed. + { "QMX", "What is the air temperature (at... (position or zone)) (at...hours) at the... (figures and units) height above... (datum)?", NULL, "At...(position or zone) at... hours the air temperature is...(degrees and units) at... (figures and units) height above...(datum).", NULL }, // Note: Aircraft reporting QMX information will transmit the temperature figures as corrected for airspeed. { "QMY", NULL, NULL, NULL, NULL }, { "QMZ", "Have you any amendments to the flight forecast in respect of section of route yet to be traversed?", NULL, "The following amendment(s) should be made to the flight forecast... (If no amendments, signal QMZ NIL.)", NULL }, { "QNA", NULL, NULL, NULL, NULL }, @@ -370,7 +370,7 @@ qcodes_t qcodes[] = { { "QNV", NULL, NULL, NULL, NULL }, { "QNW", NULL, NULL, NULL, NULL }, { "QNX", NULL, NULL, NULL, NULL }, - { "QNY", "What is the present weather and the intensity thereof at...(place, position or zone)?", NULL, "The present weather and intensity thereof at...(place, position or zone) at...hours is..." }, // (See Notes a) and b)). Notes: a) When present weather information is transmitted by a ground station, the information shall be selected from the present weather table (Table III) in PANSMET (Doc 7605- MET/526). If none of these conditions prevail the reply shall be QNY NIL. + { "QNY", "What is the present weather and the intensity thereof at...(place, position or zone)?", NULL, "The present weather and intensity thereof at...(place, position or zone) at...hours is...", NULL }, // (See Notes a) and b)). Notes: a) When present weather information is transmitted by a ground station, the information shall be selected from the present weather table (Table III) in PANSMET (Doc 7605- MET/526). If none of these conditions prevail the reply shall be QNY NIL. { "QNZ", NULL, NULL, NULL, NULL }, { "QOA", "Can you communicate by radiotelegraphy (500 kHz)?", NULL, "I can communicate by radiotelegraphy (500 kHz)." /*(MARITIME USE ONLY)*/, NULL }, { "QOB", "Can you communicate by radiotelephony (2182 kHz)?", NULL, "I can communicate by radiotelephony (2182 kHz)." /*(MARITIME USE ONLY)*/, NULL }, @@ -479,7 +479,7 @@ qcodes_t qcodes[] = { { "QUK", "Can you tell me the condition of the sea observed at... (place or coordinates)?", NULL, "The sea at...(place or coordinates) is...", NULL }, // Aeronautical Note: Stations of the international aeronautical telecommunication service will complete the answer, information or advice form by the use of a numbered alternative as given hereunder, selected according to the average wave height as obtained from the larger well formed waves of the wave system being observed. If observed height coincides with one of the limits, report the lower numbered alternative, e.g. waves with a mean maximum height of 4 meters are to be reported as "5". Number Height Meters Feet (approx.) 0 Calm-glassy 0 0 1 Calm- rippled 0 - 0.1 0 - 1/3 2 Smooth Wavelets 0.1 - 0.5 1/3 - 1 2/3 3 Slight 0.5 - 1.25 1 2/3 - 4 4 Moderate 1.25 - 2.5 4 - 8 5 Rough 2.5 - 4 8 - 13 6 Very Rough 4 - 6 13 - 20 7 High 6 - 9 20 - 30 8 Very High 9 - 14 30 - 45 9 Phenomenal Over 14 Over 45", NULL }, { "QUL", "Can you tell me the swell observed at...(place or coordinates)?", NULL, "The swell at...(place or coordinates) is...", NULL }, // Aeronautical Note: Stations of the international aeronautical telecommunication service will complete the answer, information or advice form by the use of the following numbered alternatives: Number Length of Swell Height Number Length of Swell Height 0 - - 5 Long Moderate 1 Short or Average Low 6 Short Heavy 2 Long Low 7 Average Heavy 3 Short Moderate 8 Long Heavy 4 Average Moderate 9 Confused - Additionally, stations of the international aeronautical telecommunication service may indicate the direction of swell by the use of the appropriate cardinal or quandrantal point abbreviation N, NE, E, SE, etc. following the numbered alternate for indicating swell condition. The descriptions in the above numbered alternatives are as follows: Length of Swell Meters Feet (Approx.) Short 0 - 100 0- 300 Average 100 - 200 300 - 600 Long Over 200 Over 600 Height of Swell Meters Feet (Approx.) Low 0 - 2 0 - 7 Moderate 2 - 4 7 - 13 Heavy Over 4 Over 13 When there is no swell, the numbered alternative "0" is used; when the swell is such that the length and height of the swell waves cannot be determined, the numbered alternative "9" is used.", NULL }, { "QUM", "May I resume normal working?", NULL, "Normal working may be resumed.", NULL }, - { "QUN", "Will vessels in my immediate vicinity (or in the vicinity of...latitude ...longitude(or of...)) please indicate their position, TRUE course and speed?", NULL, "My position, TRUE course and speed are..." }, + { "QUN", "Will vessels in my immediate vicinity (or in the vicinity of...latitude ...longitude(or of...)) please indicate their position, TRUE course and speed?", NULL, "My position, TRUE course and speed are...", NULL }, { "QUO", "Shall I search for... % in the vicinity of... latitude...longitude (or according to any other indication)?", "1) aircraft, 2) ship, 3) survival craft", "Please search for... % in the vicinity of...latitude... longitude (or according to any other indication).", "1) aircraft, 2) ship, 3) survival craft" }, { "QUP", "Will you indicate your position by... %", "1) searchlight? 2) black smoke trail? 3) pyrotechnic lights?", "My position is indicated by... %.", "1) searchlight. 2) black smoke trail. 3) pyrotechnic lights." }, { "QUQ", "Shall I train my searchlight nearly vertical on a cloud, occulting if possible and, if your aircraft is seen or heard, deflect the beam up wind and on the water (or land) to facilitate your landing?", NULL, "Please train your searchlight on a cloud, occulting if possible and, if my aircraft is seen or heard, deflect the beam up wind and on the water (or land) to facilitate my landing.", NULL }, --- a/resample2.c +++ b/resample2.c @@ -36,7 +36,6 @@ #define FFSIGN(a) ((a) > 0 ? 1 : -1) #define FFMAX(a,b) ((a) > (b) ? (a) : (b)) #define FFMIN(a,b) ((a) > (b) ? (b) : (a)) -#define av_mallocz malloc #define av_freep free #ifndef CONFIG_RESAMPLE_HP @@ -81,6 +80,12 @@ typedef struct AVResampleContext{ int linear; }AVResampleContext; +void av_build_filter(FELEM *filter, double factor, int tap_count, int phase_count, int scale, int type); +AVResampleContext *av_resample_init(int out_rate, int in_rate, int filter_size, int phase_shift, int linear, double cutoff); +void av_resample_close(AVResampleContext *c); +void av_resample_compensate(AVResampleContext *c, int sample_delta, int compensation_distance); +int av_resample(AVResampleContext *c, short *dst, short *src, int *consumed, int src_size, int dst_size, int update_ctx); + /** * 0th order modified bessel function of the first kind. */ @@ -198,7 +203,7 @@ void av_build_filter(FELEM *filter, doub * Note, if either rate is not an integer then simply scale both rates up so they are. */ AVResampleContext *av_resample_init(int out_rate, int in_rate, int filter_size, int phase_shift, int linear, double cutoff){ - AVResampleContext *c= av_mallocz(sizeof(AVResampleContext)); + AVResampleContext *c= calloc(sizeof(AVResampleContext), 1); double factor= FFMIN(out_rate * cutoff / in_rate, 1.0); int phase_count= 1<phase_mask= phase_count-1; c->linear= linear; - c->filter_length= FFMAX((int)ceil(filter_size/factor), 1); - c->filter_bank= av_mallocz(c->filter_length*(phase_count+1)*sizeof(FELEM)); + c->filter_length = ceil(filter_size / factor); + c->filter_length = FFMAX(c->filter_length, 1); + c->filter_bank= calloc(c->filter_length*(phase_count+1), sizeof(FELEM)); av_build_filter(c->filter_bank, factor, c->filter_length, phase_count, 1<filter_bank[c->filter_length*phase_count+1], c->filter_bank, (c->filter_length-1)*sizeof(FELEM)); c->filter_bank[c->filter_length*phase_count]= c->filter_bank[c->filter_length - 1]; @@ -255,29 +261,29 @@ void av_resample_compensate(AVResampleCo */ int av_resample(AVResampleContext *c, short *dst, short *src, int *consumed, int src_size, int dst_size, int update_ctx){ int dst_index, i; - int index= c->index; + int indexv= c->index; int frac= c->frac; int dst_incr_frac= c->dst_incr % c->src_incr; int dst_incr= c->dst_incr / c->src_incr; int compensation_distance= c->compensation_distance; if(compensation_distance == 0 && c->filter_length == 1 && c->phase_shift==0){ - int64_t index2= ((int64_t)index)<<32; + int64_t index2= ((int64_t)indexv)<<32; int64_t incr= (1LL<<32) * c->dst_incr / c->src_incr; - dst_size= FFMIN(dst_size, (src_size-1-index) * (int64_t)c->src_incr / c->dst_incr); + dst_size= FFMIN(dst_size, (src_size-1-indexv) * (int64_t)c->src_incr / c->dst_incr); for(dst_index=0; dst_index < dst_size; dst_index++){ dst[dst_index] = src[index2>>32]; index2 += incr; } frac += dst_index * dst_incr_frac; - index += dst_index * dst_incr; - index += frac / c->src_incr; + indexv += dst_index * dst_incr; + indexv += frac / c->src_incr; frac %= c->src_incr; }else{ for(dst_index=0; dst_index < dst_size; dst_index++){ - FELEM *filter= c->filter_bank + c->filter_length*(index & c->phase_mask); - int sample_index= index >> c->phase_shift; + FELEM *filter= c->filter_bank + c->filter_length*(indexv & c->phase_mask); + int sample_index= indexv >> c->phase_shift; FELEM2 val=0; if(sample_index < 0){ @@ -306,10 +312,10 @@ int av_resample(AVResampleContext *c, sh #endif frac += dst_incr_frac; - index += dst_incr; + indexv += dst_incr; if(frac >= c->src_incr){ frac -= c->src_incr; - index++; + indexv++; } if(dst_index + 1 == compensation_distance){ @@ -319,8 +325,8 @@ int av_resample(AVResampleContext *c, sh } } } - *consumed= FFMAX(index, 0) >> c->phase_shift; - if(index>=0) index &= c->phase_mask; + *consumed= FFMAX(indexv, 0) >> c->phase_shift; + if(indexv>=0) indexv &= c->phase_mask; if(compensation_distance){ compensation_distance -= dst_index; @@ -328,7 +334,7 @@ int av_resample(AVResampleContext *c, sh } if(update_ctx){ c->frac= frac; - c->index= index; + c->index= indexv; c->dst_incr= dst_incr_frac + c->src_incr*dst_incr; c->compensation_distance= compensation_distance; } debian/control0000664000000000000000000000122512260317007010571 0ustar Source: morse2ascii Section: hamradio Priority: optional Maintainer: Ubuntu Developers XSBC-Original-Maintainer: Dominik George Build-Depends: debhelper (>= 9.0.0) Standards-Version: 3.9.4 Homepage: http://aluigi.altervista.org/mytoolz.htm Package: morse2ascii Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Description: tool for decoding the morse codes from a PCM WAV file This tool employs a volume/peak based method to decode the morse codes from a PCM WAV file as well as from text and RAW PCM files. . It contains some options for parsing abbreviations, prosigns and qcodes. debian/manpages0000664000000000000000000000002512230042521010672 0ustar debian/morse2ascii.1 debian/source/0000775000000000000000000000000012230033170010457 5ustar debian/source/format0000664000000000000000000000001412230033170011665 0ustar 3.0 (quilt)