[Homeros] I: voiceman-1.5.0.3

Michael Pozhidaev msp на altlinux.ru
Пн Фев 25 08:45:50 MSK 2013


Дима, добрый день!

Все патчи залиты в ветку 1.5.1, но мне потребуется некоторое время,
чтобы всё осмыслить и решить, как с этим правильнее поступить. Так что
ещё отдельно напишу, когда появятся конкретные заключения.

Спасибо! :))

> Миша, извини за задержку. Хотел послать ответ с патчем, но процесс
> несколько затянулся. Посылаю патч с теми изменениями, о которых мы
> говорили в прошлое воскресенье, плюс незначительные изменения, которые я
> делал раньше. В основном .gitignore.
>
> Утилита tonegen.c отличается от прежней функции playTone форматом
> (s16_ne, 1 channel, 22050 Hz) и небольшим фейдингом около 2 мс в начале
> и конце. При помощи фейдинга я пытался победить потрескивание при
> проигрывании гудков. На старой карте потрескивание победить не удалось.
> На новой - это вроде помогло.
>
> -- 
> Дмитрий Падучих
>
> From d802c2fe5c2b9e5b309cd9400af06c70ca50555a Mon Sep 17 00:00:00 2001
> From: Dmitri Paduchikh <dpaduchikh на gmail.com>
> Date: Wed, 6 Feb 2013 05:31:10 +0600
> Subject: [PATCH] Rename to configure.ac.
>
> ---
>  configure.ac | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>  configure.in | 66 ------------------------------------------------------------
>  2 files changed, 66 insertions(+), 66 deletions(-)
>  create mode 100644 configure.ac
>  delete mode 100644 configure.in
>
> diff --git a/configure.ac b/configure.ac
> new file mode 100644
> index 0000000..55a4d42
> --- /dev/null
> +++ b/configure.ac
> @@ -0,0 +1,66 @@
> +
> +AC_INIT(voiceman, 1.5.0.2, msp на altlinux.org)
> +AC_CONFIG_MACRO_DIR([m4])
> +AM_INIT_AUTOMAKE([-Wall foreign])
> +
> +if test "x$CFLAGS" == 'x'; then
> +   CFLAGS='-O2'
> +fi
> +
> +if test "x$CXXFLAGS" == 'x'; then
> +   CXXFLAGS='-O2'
> +fi
> +
> +AC_PROG_CC
> +AC_PROG_CXX
> +AC_PROG_RANLIB
> +
> +# Define some parameters to adjust Voiceman's default settings
> +AC_ARG_VAR(default_socket, Default path to UNIX domain socket for all clients)
> +AC_ARG_VAR(default_port, Default port for TCP/IP connections)
> +AC_ARG_VAR(default_executor, Default port for TCP/IP connections)
> +
> +if test "x$default_socket" = x; then
> +default_socket="/tmp/voiceman.socket"
> +fi
> +
> +if test "x$default_port" = x; then
> +default_port="5511"
> +fi
> +
> +if test "x$default_executor" = x; then
> +default_executor="voiceman-executor"
> +fi
> +
> +# Find the path to libao and set AO_CFLAGS and AO_LIBS
> +#XIPH_PATH_AO
> +
> +AC_SUBST(VOICEMAN_INCLUDES, '-I$(top_srcdir)/utils -I$(top_srcdir)/executors')
> +AC_SUBST(VOICEMAN_DAEMON_INCLUDES, '$(VOICEMAN_INCLUDES) -I$(top_srcdir)/daemon')
> +
> +AC_SUBST(VOICEMAN_CFLAGS, '-Wall -pedantic -fpic -DVOICEMAN_DATADIR=\"$(pkgdatadir)\" -DVOICEMAN_DEFAULT_EXECUTOR=\"$(bindir)/$(default_executor)\" -DVOICEMAN_DEFAULT_SOCKET=\"$(default_socket)\" -DVOICEMAN_DEFAULT_PORT=$(default_port)')
> +AC_SUBST(VOICEMAN_CXXFLAGS, '-Wall -pedantic -fpic -fno-rtti  -DVOICEMAN_DATADIR=\"$(pkgdatadir)\" -DVOICEMAN_DEFAULT_EXECUTOR=\"$(bindir)/$(default_executor)\" -DVOICEMAN_DEFAULT_SOCKET=\"$(default_socket)\" -DVOICEMAN_DEFAULT_PORT=$(default_port)')
> +
> +AC_SUBST(VOICEMAN_DAEMON_CFLAGS, '$(VOICEMAN_CFLAGS) -DVOICEMAN_DEFAULT_CONFIG=\"$(sysconfdir)/voiceman.conf\"')
> +AC_SUBST(VOICEMAN_DAEMON_CXXFLAGS, '$(VOICEMAN_CXXFLAGS) -DVOICEMAN_DEFAULT_CONFIG=\"$(sysconfdir)/voiceman.conf\"')
> +
> +AC_CONFIG_FILES([
> +  makefile
> +  utils/makefile
> +
> +  daemon/makefile
> +  daemon/config_file/makefile
> +  daemon/core/makefile
> +  daemon/langs/makefile
> +  daemon/main/makefile
> +  daemon/system/makefile
> +
> +  executors/makefile
> +
> +  libvmclient/makefile
> +  shell/makefile
> +  emacspeak/makefile
> +  tools/makefile
> +])
> +
> +AC_OUTPUT(voiceman.conf)
> diff --git a/configure.in b/configure.in
> deleted file mode 100644
> index 55a4d42..0000000
> --- a/configure.in
> +++ /dev/null
> @@ -1,66 +0,0 @@
> -
> -AC_INIT(voiceman, 1.5.0.2, msp на altlinux.org)
> -AC_CONFIG_MACRO_DIR([m4])
> -AM_INIT_AUTOMAKE([-Wall foreign])
> -
> -if test "x$CFLAGS" == 'x'; then
> -   CFLAGS='-O2'
> -fi
> -
> -if test "x$CXXFLAGS" == 'x'; then
> -   CXXFLAGS='-O2'
> -fi
> -
> -AC_PROG_CC
> -AC_PROG_CXX
> -AC_PROG_RANLIB
> -
> -# Define some parameters to adjust Voiceman's default settings
> -AC_ARG_VAR(default_socket, Default path to UNIX domain socket for all clients)
> -AC_ARG_VAR(default_port, Default port for TCP/IP connections)
> -AC_ARG_VAR(default_executor, Default port for TCP/IP connections)
> -
> -if test "x$default_socket" = x; then
> -default_socket="/tmp/voiceman.socket"
> -fi
> -
> -if test "x$default_port" = x; then
> -default_port="5511"
> -fi
> -
> -if test "x$default_executor" = x; then
> -default_executor="voiceman-executor"
> -fi
> -
> -# Find the path to libao and set AO_CFLAGS and AO_LIBS
> -#XIPH_PATH_AO
> -
> -AC_SUBST(VOICEMAN_INCLUDES, '-I$(top_srcdir)/utils -I$(top_srcdir)/executors')
> -AC_SUBST(VOICEMAN_DAEMON_INCLUDES, '$(VOICEMAN_INCLUDES) -I$(top_srcdir)/daemon')
> -
> -AC_SUBST(VOICEMAN_CFLAGS, '-Wall -pedantic -fpic -DVOICEMAN_DATADIR=\"$(pkgdatadir)\" -DVOICEMAN_DEFAULT_EXECUTOR=\"$(bindir)/$(default_executor)\" -DVOICEMAN_DEFAULT_SOCKET=\"$(default_socket)\" -DVOICEMAN_DEFAULT_PORT=$(default_port)')
> -AC_SUBST(VOICEMAN_CXXFLAGS, '-Wall -pedantic -fpic -fno-rtti  -DVOICEMAN_DATADIR=\"$(pkgdatadir)\" -DVOICEMAN_DEFAULT_EXECUTOR=\"$(bindir)/$(default_executor)\" -DVOICEMAN_DEFAULT_SOCKET=\"$(default_socket)\" -DVOICEMAN_DEFAULT_PORT=$(default_port)')
> -
> -AC_SUBST(VOICEMAN_DAEMON_CFLAGS, '$(VOICEMAN_CFLAGS) -DVOICEMAN_DEFAULT_CONFIG=\"$(sysconfdir)/voiceman.conf\"')
> -AC_SUBST(VOICEMAN_DAEMON_CXXFLAGS, '$(VOICEMAN_CXXFLAGS) -DVOICEMAN_DEFAULT_CONFIG=\"$(sysconfdir)/voiceman.conf\"')
> -
> -AC_CONFIG_FILES([
> -  makefile
> -  utils/makefile
> -
> -  daemon/makefile
> -  daemon/config_file/makefile
> -  daemon/core/makefile
> -  daemon/langs/makefile
> -  daemon/main/makefile
> -  daemon/system/makefile
> -
> -  executors/makefile
> -
> -  libvmclient/makefile
> -  shell/makefile
> -  emacspeak/makefile
> -  tools/makefile
> -])
> -
> -AC_OUTPUT(voiceman.conf)
> -- 
> 1.8.1.4
>
>
> From f4b7bc75a0174d3fd164473c841778603de83eba Mon Sep 17 00:00:00 2001
> From: Dmitri Paduchikh <dpaduchikh на gmail.com>
> Date: Wed, 6 Feb 2013 05:41:54 +0600
> Subject: [PATCH] Added .gitignore.
>
> ---
>  .gitignore | 11 +++++++++++
>  1 file changed, 11 insertions(+)
>  create mode 100644 .gitignore
>
> diff --git a/.gitignore b/.gitignore
> new file mode 100644
> index 0000000..d239ca7
> --- /dev/null
> +++ b/.gitignore
> @@ -0,0 +1,11 @@
> +*.[oa]
> +*~
> +configure
> +[Mm]akefile
> +[Mm]akefile.in
> +/aclocal.m4
> +/ar-lib
> +/autom4te.cache/
> +/depcomp
> +/install-sh
> +/missing
> -- 
> 1.8.1.4
>
>
> From da8b160a38eea53832ce54f83b3811b6c5cb47f1 Mon Sep 17 00:00:00 2001
> From: Dmitri Paduchikh <dpaduchikh на gmail.com>
> Date: Wed, 6 Feb 2013 14:35:36 +0600
> Subject: [PATCH] Updated .gitignore.
>
> ---
>  .gitignore | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/.gitignore b/.gitignore
> index d239ca7..58d18c6 100644
> --- a/.gitignore
> +++ b/.gitignore
> @@ -9,3 +9,11 @@ configure
>  /depcomp
>  /install-sh
>  /missing
> +/config.log
> +/config.status
> +.deps/
> +/daemon/main/voicemand
> +/executors/voiceman-executor
> +/shell/voiceman
> +/tools/voiceman-trim
> +/voiceman.conf
> -- 
> 1.8.1.4
>
>
> From 256f4f2e322f91be35c0344004557d414460f852 Mon Sep 17 00:00:00 2001
> From: Dmitri Paduchikh <dpaduchikh на gmail.com>
> Date: Wed, 6 Feb 2013 14:38:35 +0600
> Subject: [PATCH] Added AM_PROG_AR to configure.ac.
>
> Since automake 1.13.1 kindly asked for it.
> ---
>  configure.ac | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/configure.ac b/configure.ac
> index 55a4d42..310484c 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -14,6 +14,7 @@ fi
>  AC_PROG_CC
>  AC_PROG_CXX
>  AC_PROG_RANLIB
> +AM_PROG_AR
>  
>  # Define some parameters to adjust Voiceman's default settings
>  AC_ARG_VAR(default_socket, Default path to UNIX domain socket for all clients)
> -- 
> 1.8.1.4
>
>
> From 4ead7909baf67f1899ff0e804f69ca79f1bad710 Mon Sep 17 00:00:00 2001
> From: Dmitri Paduchikh <dpaduchikh на gmail.com>
> Date: Mon, 11 Feb 2013 06:45:45 +0600
> Subject: [PATCH] Updated .gitignore for emacspeak/voiceman-emacspeak
>
> ---
>  .gitignore | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/.gitignore b/.gitignore
> index 58d18c6..9e153fb 100644
> --- a/.gitignore
> +++ b/.gitignore
> @@ -13,6 +13,7 @@ configure
>  /config.status
>  .deps/
>  /daemon/main/voicemand
> +/emacspeak/voiceman-emacspeak
>  /executors/voiceman-executor
>  /shell/voiceman
>  /tools/voiceman-trim
> -- 
> 1.8.1.4
>
>
> From 951b95c6f4ae3eeb098ac5f81527d246eaf2c728 Mon Sep 17 00:00:00 2001
> From: Dmitri Paduchikh <dpaduchikh на gmail.com>
> Date: Mon, 18 Feb 2013 16:04:26 +0600
> Subject: [PATCH] emacspeak: do not speak one-letter fragments as single
>  letters
>
> Previously this have been done to work arround Orca sending letters as
> one-letter fragments. But this does not play well with accelerated letters.
> ---
>  emacspeak/Connection.cpp | 5 -----
>  1 file changed, 5 deletions(-)
>
> diff --git a/emacspeak/Connection.cpp b/emacspeak/Connection.cpp
> index 69119d7..03aadbc 100644
> --- a/emacspeak/Connection.cpp
> +++ b/emacspeak/Connection.cpp
> @@ -32,11 +32,6 @@ void Connection::text(const std::string& t)
>  {
>    if (!connectionAvailable())
>      return;
> -  if (trim(IO2WString(t)).length() == 1)//Just for Orca hack!!!
> -    {
> -      letter(trim(t));
> -      return;
> -    }
>    const std::string s=encodeUTF8(IO2WString(t));
>    vm_text(m_con, (char*)s.c_str());
>  }
> -- 
> 1.8.1.4
>
>
> From dfabce26db813a1d2a2cff2ae89aee157f3b910c Mon Sep 17 00:00:00 2001
> From: Dmitri Paduchikh <dpaduchikh на gmail.com>
> Date: Mon, 18 Feb 2013 16:20:28 +0600
> Subject: [PATCH] emacspeak: clamp out-of-range pitch values to be in 50..350
>
> ---
>  emacspeak/LineParser.cpp | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/emacspeak/LineParser.cpp b/emacspeak/LineParser.cpp
> index ae6af64..b45d27a 100644
> --- a/emacspeak/LineParser.cpp
> +++ b/emacspeak/LineParser.cpp
> @@ -61,9 +61,11 @@ void LineParser::processDectalkDefineVoice(StringDelimitedIterator<std::string>&
>  	  waitingAverPitch = 0;
>  	  if (!checkTypeUnsignedInt(s))
>  	    continue;
> -	  const size_t value = parseAsUnsignedInt(s);
> -	  if (value < 50 || value > 350)
> -	    continue;
> +	  size_t value = parseAsUnsignedInt(s);
> +	  if (value < 50)
> +	    value = 50;
> +	  else if (value > 350)
> +	    value = 350;
>  	  pitch = (value - 50) / 3;
>  	} //if(waitingAverPitch);
>      } //while();
> -- 
> 1.8.1.4
>
>
> From aecf9c62afa760e48e465b69270374defea6eb53 Mon Sep 17 00:00:00 2001
> From: Dmitri Paduchikh <dpaduchikh на gmail.com>
> Date: Fri, 22 Feb 2013 22:08:27 +0600
> Subject: [PATCH] executor: play tones using separate process (script
>  voiceman-tone)
>
> ---
>  .gitignore                 |   2 +
>  configure.ac               |   3 --
>  executors/default.c        |  30 +++++++++---
>  executors/makefile.am      |  19 ++++++--
>  executors/tone.c           |  74 ----------------------------
>  executors/tonegen.c        | 119 +++++++++++++++++++++++++++++++++++++++++++++
>  executors/voiceman-tone.in |   2 +
>  m4/ao.m4                   | 112 ------------------------------------------
>  8 files changed, 162 insertions(+), 199 deletions(-)
>  delete mode 100644 executors/tone.c
>  create mode 100644 executors/tonegen.c
>  create mode 100644 executors/voiceman-tone.in
>  delete mode 100644 m4/ao.m4
>
> diff --git a/.gitignore b/.gitignore
> index 9e153fb..fb97c80 100644
> --- a/.gitignore
> +++ b/.gitignore
> @@ -18,3 +18,5 @@ configure
>  /shell/voiceman
>  /tools/voiceman-trim
>  /voiceman.conf
> +/executors/tonegen
> +/executors/voiceman-tone
> diff --git a/configure.ac b/configure.ac
> index 310484c..1b0298b 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -33,9 +33,6 @@ if test "x$default_executor" = x; then
>  default_executor="voiceman-executor"
>  fi
>  
> -# Find the path to libao and set AO_CFLAGS and AO_LIBS
> -#XIPH_PATH_AO
> -
>  AC_SUBST(VOICEMAN_INCLUDES, '-I$(top_srcdir)/utils -I$(top_srcdir)/executors')
>  AC_SUBST(VOICEMAN_DAEMON_INCLUDES, '$(VOICEMAN_INCLUDES) -I$(top_srcdir)/daemon')
>  
> diff --git a/executors/default.c b/executors/default.c
> index 7073fa6..8347722 100644
> --- a/executors/default.c
> +++ b/executors/default.c
> @@ -36,10 +36,6 @@
>  #define QUEUE_ITEM_TEXT 1
>  #define QUEUE_ITEM_TONE 2
>  
> -void toneInit();
> -void playTone(size_t freq, size_t lengthMs);
> -void toneClose();
> -
>  typedef struct QueueItem_  
>  {
>    int type;
> @@ -262,6 +258,30 @@ char isPlaying()
>    return pid != (pid_t)0 || playerPid != (pid_t)0;
>  }
>  
> +static void playTone(size_t freq, size_t ms)
> +{
> +  pid_t tonePid;
> +  char freqParam[11];
> +  char durParam[11];
> +  const char *toneprog = BINDIR "/voiceman-tone";
> +
> +  snprintf(durParam, sizeof(durParam), "%u", (unsigned)ms);
> +  snprintf(freqParam, sizeof(freqParam), "%u", (unsigned)freq);
> +
> +  tonePid = fork();
> +  if (tonePid == -1) {
> +    perror("fork()");
> +    fflush(stderr);
> +    return;
> +  }
> +  if (tonePid == 0) {
> +    execl(toneprog, toneprog, durParam, freqParam, (char*)NULL);
> +    _exit(EXIT_FAILURE);
> +  } else {
> +    playerPid = tonePid;
> +  }
> +}
> +
>  void execute(char* synthCommand, char* playerCommand, char* text)
>  {
>    int pp[2];
> @@ -597,8 +617,6 @@ int main(int argc, char* argv[])
>    sigemptyset(&blockedMask);
>    sigaddset(&blockedMask, SIGCHLD);
>    sigprocmask(SIG_BLOCK, &blockedMask, &origMask);
> -  toneInit();
>    exitCode = mainLoop(STDIN_FILENO, &origMask);
> -  toneClose();
>    return exitCode;
>  }
> diff --git a/executors/makefile.am b/executors/makefile.am
> index 4351d6e..89c0a59 100644
> --- a/executors/makefile.am
> +++ b/executors/makefile.am
> @@ -1,10 +1,21 @@
>  
> -AM_CFLAGS = $(VOICEMAN_CFLAGS) $(AO_CFLAGS) $(VOICEMAN_INCLUDES) -std=gnu99
> +AM_CFLAGS = $(VOICEMAN_CFLAGS) $(VOICEMAN_INCLUDES) -std=gnu99
> +AM_CPPFLAGS = -DBINDIR=\"$(bindir)\"
>  
>  bin_PROGRAMS=voiceman-executor
>  
> -voiceman_executor_LDADD = -lao -lm
> -
>  voiceman_executor_SOURCES = \
> -tone.c \
>  default.c 
> +
> +pkglibexec_PROGRAMS = tonegen
> +tonegen_SOURCES = tonegen.c
> +tonegen_LDADD = -lm
> +
> +dist_noinst_DATA = voiceman-tone.in
> +nodist_bin_SCRIPTS = voiceman-tone
> +voiceman-tone: voiceman-tone.in makefile
> +	sed 's#@dir@#$(pkglibexecdir)#g' $^ >$@.tmp
> +	mv -f $@.tmp $@
> +
> +clean-local:
> +	-rm -f voiceman-tone voiceman-tone.tmp
> diff --git a/executors/tone.c b/executors/tone.c
> deleted file mode 100644
> index 311defe..0000000
> --- a/executors/tone.c
> +++ /dev/null
> @@ -1,74 +0,0 @@
> -/*
> -	Copyright (c) 2000-2012 Michael Pozhidaev<msp на altlinux.org>
> -   This file is part of the VoiceMan speech service.
> -
> -   VoiceMan speech service 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 3 of the License, or (at your option) any later version.
> -
> -   VoiceMan speech service 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.
> -*/
> -
> -#include<assert.h>
> -#include<stdlib.h>
> -#include<math.h>
> -#include<strings.h>
> -#include<ao/ao.h>
> -
> -void toneInit()
> -{
> -  ao_initialize();
> -}
> -
> -void toneClose()
> -{
> -  ao_shutdown();
> -}
> -
> -void playTone(size_t fr, size_t lengthMs)
> -{
> -  ao_device *device = NULL;
> -  ao_sample_format format;
> -  int default_driver;
> -  float freq=fr;
> -  size_t bufSize = 0;
> -  char* buffer = NULL;
> -  size_t samplesToPlay = 0;
> -  size_t i;
> -  assert(fr >= 0 && lengthMs >= 10);
> -  bzero(&format, sizeof(ao_sample_format));
> -  default_driver = ao_default_driver_id();
> -  format.bits = 16;
> -  format.channels = 2;
> -  format.rate = 44100;
> -  format.byte_format = AO_FMT_LITTLE;
> -  samplesToPlay = format.rate*lengthMs/1000;
> -  device = ao_open_live(default_driver, &format, NULL);
> -  if (device == NULL) 
> -    {
> -      ao_shutdown();
> -      return;
> -    }
> -  bufSize = format.bits/8 * format.channels * samplesToPlay;
> -  buffer = (char*)calloc(bufSize, sizeof(char));
> -  if (buffer == NULL)
> -    {
> -      ao_close(device);
> -      ao_shutdown();
> -      return;
> -    }
> -  for (i = 0; i < samplesToPlay; i++) 
> -    {
> -      int sample = (int)(0.75 * 32768.0 *
> -			 sin(2 * M_PI * freq * ((float) i/format.rate)));
> -      buffer[4*i] = buffer[4*i+2] = sample & 0xff;
> -      buffer[4*i+1] = buffer[4*i+3] = (sample >> 8) & 0xff;
> -    }
> -  ao_play(device, buffer, bufSize);
> -  free(buffer);
> -  ao_close(device);
> -}
> diff --git a/executors/tonegen.c b/executors/tonegen.c
> new file mode 100644
> index 0000000..98ce919
> --- /dev/null
> +++ b/executors/tonegen.c
> @@ -0,0 +1,119 @@
> +/*
> +  Copyright (c) Dmitri Paduchikh <dpaduchikh на gmail.com>
> +
> +  This file is part of the VoiceMan speech service.
> +
> +  VoiceMan speech service 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 3 of the License, or (at your option) any later version.
> +
> +  VoiceMan speech service 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.
> +*/
> +
> +#include <stdlib.h>
> +#include <stdio.h>
> +#include <math.h>
> +#include <errno.h>
> +#include <unistd.h>
> +
> +int main(int argc, char *argv[])
> +{
> +  double dur;			/* duration in msecs */
> +  double freq;			/* pitch in Hz */
> +  /* sample rate is 22050, S16_LE */
> +  const double rate = 22050.0;
> +  if (argc != 3) {
> +    fprintf(stderr, "%s: usage: tonegen ms freq", argv[0]);
> +    exit(EXIT_FAILURE);
> +  }
> +  {
> +    char *endptr;
> +    dur = strtol(argv[1], &endptr, 0);
> +    if (*endptr != '\0') {
> +      fprintf(stderr, "%s: incorrect argument: %s\n", argv[0], argv[1]);
> +      exit(EXIT_FAILURE);
> +    }
> +    freq = strtol(argv[2], &endptr, 0);
> +    if (*endptr != '\0') {
> +      fprintf(stderr, "%s: incorrect argument: %s\n", argv[0], argv[2]);
> +      exit(EXIT_FAILURE);
> +    }
> +  }
> +
> +  {
> +    int16_t buf[1024];
> +    const int bufsize = sizeof(buf)/sizeof(buf[0]);
> +    int chunk, written;
> +    int i = 0;				/* number of samples to be computed */
> +    int samples = lround(0.001*dur*rate);
> +    double coeff = 2 * M_PI * freq / rate;
> +    int fade = lround(0.002*rate);
> +
> +    while (i < fade && i <= samples) {
> +      int j;
> +      chunk = samples-i+1 < bufsize? samples-i+1 : bufsize;
> +      chunk = fade-i < chunk? fade-i : chunk;
> +      for (j = 0; j < chunk; i++, j++)
> +	buf[j] = lround(24000.0 * ((double)i / (double)fade) * sin(coeff*i));
> +      written = 0;
> +      while (written < chunk*sizeof(buf[0])) {
> +	int rc = write(1, buf + written, chunk*sizeof(buf[0]) - written);
> +	if (rc == -1) {
> +	  if (errno == EINTR)
> +	    continue;
> +	  else {
> +	    perror("write");
> +	    exit(EXIT_FAILURE);
> +	  }
> +	}
> +	written += rc;
> +      }
> +    }
> +
> +    while (i < samples-fade) {
> +      int j;
> +      chunk = samples-fade-i < bufsize? samples-fade-i : bufsize;
> +      for (j = 0; j < chunk; i++, j++)
> +	buf[j] = lround(24000.0 * sin(coeff*i));
> +      written = 0;
> +      while (written < chunk*sizeof(buf[0])) {
> +	int rc = write(1, buf + written, chunk*sizeof(buf[0]) - written);
> +	if (rc == -1) {
> +	  if (errno == EINTR)
> +	    continue;
> +	  else {
> +	    perror("write");
> +	    exit(EXIT_FAILURE);
> +	  }
> +	}
> +	written += rc;
> +      }
> +    }
> +
> +    while (i <= samples) {
> +      int j;
> +      chunk = samples-i+1 < bufsize? samples-i+1 : bufsize;
> +      for (j = 0; j < chunk; i++, j++)
> +	buf[j] = lround(24000.0 * ((double)(samples-i) / (double)fade) * sin(coeff*i));
> +      written = 0;
> +      while (written < chunk*sizeof(buf[0])) {
> +	int rc = write(1, buf + written, chunk*sizeof(buf[0]) - written);
> +	if (rc == -1) {
> +	  if (errno == EINTR)
> +	    continue;
> +	  else {
> +	    perror("write");
> +	    exit(EXIT_FAILURE);
> +	  }
> +	}
> +	written += rc;
> +      }
> +    }
> +  }
> +  
> +  return 0;
> +}
> diff --git a/executors/voiceman-tone.in b/executors/voiceman-tone.in
> new file mode 100644
> index 0000000..f43333a
> --- /dev/null
> +++ b/executors/voiceman-tone.in
> @@ -0,0 +1,2 @@
> +#!/bin/sh
> + на dir@/tonegen "$@" | aplay -q -t raw -f S16_LE -r 22050 -c1
> diff --git a/m4/ao.m4 b/m4/ao.m4
> deleted file mode 100644
> index a852ad8..0000000
> --- a/m4/ao.m4
> +++ /dev/null
> @@ -1,112 +0,0 @@
> -# ao.m4
> -# Configure paths for libao
> -# Jack Moffitt <jack на icecast.org> 10-21-2000
> -# Shamelessly stolen from Owen Taylor and Manish Singh
> -
> -dnl XIPH_PATH_AO([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
> -dnl Test for libao, and define AO_CFLAGS and AO_LIBS
> -dnl
> -AC_DEFUN([XIPH_PATH_AO],
> -[dnl 
> -dnl Get the cflags and libraries
> -dnl
> -AC_ARG_WITH(ao,[  --with-ao=PFX   Prefix where libao is installed (optional)], ao_prefix="$withval", ao_prefix="")
> -AC_ARG_WITH(ao-libraries,[  --with-ao-libraries=DIR   Directory where libao library is installed (optional)], ao_libraries="$withval", ao_libraries="")
> -AC_ARG_WITH(ao-includes,[  --with-ao-includes=DIR   Directory where libao header files are installed (optional)], ao_includes="$withval", ao_includes="")
> -AC_ARG_ENABLE(aotest, [  --disable-aotest       Do not try to compile and run a test ao program],, enable_aotest=yes)
> -
> -
> -  if test "x$ao_libraries" != "x" ; then
> -    AO_LIBS="-L$ao_libraries"
> -  elif test "x$ao_prefix" != "x"; then
> -    AO_LIBS="-L$ao_prefix/lib"
> -  elif test "x$prefix" != "xNONE"; then
> -    AO_LIBS="-L$prefix/lib"
> -  fi
> -
> -  if test "x$ao_includes" != "x" ; then
> -    AO_CFLAGS="-I$ao_includes"
> -  elif test "x$ao_prefix" != "x"; then
> -    AO_CFLAGS="-I$ao_prefix/include"
> -  elif test "x$prefix" != "xNONE"; then
> -    AO_CFLAGS="-I$prefix/include"
> -  fi
> -
> -  # see where dl* and friends live
> -  AC_CHECK_FUNCS(dlopen, [AO_DL_LIBS=""], [
> -    AC_CHECK_LIB(dl, dlopen, [AO_DL_LIBS="-ldl"], [
> -      AC_MSG_WARN([could not find dlopen() needed by libao sound drivers
> -      your system may not be supported.])
> -    ])
> -  ])
> -
> -  AO_LIBS="$AO_LIBS -lao $AO_DL_LIBS"
> -
> -  AC_MSG_CHECKING(for ao)
> -  no_ao=""
> -
> -
> -  if test "x$enable_aotest" = "xyes" ; then
> -    ac_save_CFLAGS="$CFLAGS"
> -    ac_save_LIBS="$LIBS"
> -    CFLAGS="$CFLAGS $AO_CFLAGS"
> -    LIBS="$LIBS $AO_LIBS"
> -dnl
> -dnl Now check if the installed ao is sufficiently new.
> -dnl
> -      rm -f conf.aotest
> -      AC_TRY_RUN([
> -#include <stdio.h>
> -#include <stdlib.h>
> -#include <string.h>
> -#include <ao/ao.h>
> -
> -int main ()
> -{
> -  system("touch conf.aotest");
> -  return 0;
> -}
> -
> -],, no_ao=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
> -       CFLAGS="$ac_save_CFLAGS"
> -       LIBS="$ac_save_LIBS"
> -  fi
> -
> -  if test "x$no_ao" = "x" ; then
> -     AC_MSG_RESULT(yes)
> -     ifelse([$1], , :, [$1])     
> -  else
> -     AC_MSG_RESULT(no)
> -     if test -f conf.aotest ; then
> -       :
> -     else
> -       echo "*** Could not run ao test program, checking why..."
> -       CFLAGS="$CFLAGS $AO_CFLAGS"
> -       LIBS="$LIBS $AO_LIBS"
> -       AC_TRY_LINK([
> -#include <stdio.h>
> -#include <ao/ao.h>
> -],     [ return 0; ],
> -       [ echo "*** The test program compiled, but did not run. This usually means"
> -       echo "*** that the run-time linker is not finding ao or finding the wrong"
> -       echo "*** version of ao. If it is not finding ao, you'll need to set your"
> -       echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
> -       echo "*** to the installed location  Also, make sure you have run ldconfig if that"
> -       echo "*** is required on your system"
> -       echo "***"
> -       echo "*** If you have an old version installed, it is best to remove it, although"
> -       echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
> -       [ echo "*** The test program failed to compile or link. See the file config.log for the"
> -       echo "*** exact error that occured. This usually means ao was incorrectly installed"
> -       echo "*** or that you have moved ao since it was installed." ])
> -       CFLAGS="$ac_save_CFLAGS"
> -       LIBS="$ac_save_LIBS"
> -     fi
> -     AO_CFLAGS=""
> -     AO_LIBS=""
> -     ifelse([$2], , :, [$2])
> -  fi
> -  AC_SUBST(AO_CFLAGS)
> -  AC_SUBST(AO_LIBS)
> -  rm -f conf.aotest
> -])
> -- 
> 1.8.1.4
>
>
> From 68d17fc35c5b427fd827d5a5c158368ef7d7de22 Mon Sep 17 00:00:00 2001
> From: Dmitri Paduchikh <dpaduchikh на gmail.com>
> Date: Sat, 23 Feb 2013 09:47:37 +0600
> Subject: [PATCH] Fix some typos
>
> ---
>  daemon/core/TextProcessor.cpp | 2 +-
>  data/chars-table              | 6 +++---
>  data/replacements.all         | 2 +-
>  executors/default.c           | 4 ++--
>  utils/vmstrings.h             | 8 ++++----
>  5 files changed, 11 insertions(+), 11 deletions(-)
>
> diff --git a/daemon/core/TextProcessor.cpp b/daemon/core/TextProcessor.cpp
> index 21d0b5c..737957f 100644
> --- a/daemon/core/TextProcessor.cpp
> +++ b/daemon/core/TextProcessor.cpp
> @@ -74,7 +74,7 @@ void TextProcessor::processLetter(wchar_t c, TextParam volume, TextParam pitch,
>    WCharToLangIdMap::const_iterator it = m_charsTable.find(c);
>    if (it != m_charsTable.end())
>      {
> -      if (it->second == LANG_ID_NONE)//it is letter for defautl language;
> +      if (it->second == LANG_ID_NONE) // letter for default language
>      langId = m_defaultLangId; else
>  	langId = it->second;
>      } //there is entry in characters table;
> diff --git a/data/chars-table b/data/chars-table
> index ac16dae..5563a8d 100644
> --- a/data/chars-table
> +++ b/data/chars-table
> @@ -1,4 +1,4 @@
> -# Deigits:
> +# Digits:
>  0:zero
>  1:one
>  2:two
> @@ -12,7 +12,7 @@
>  
>  # Symbols:
>  .:dot
> -,:coma
> +,:comma
>  ;:semicolon
>  _:under line
>  -:dash
> @@ -30,7 +30,7 @@ _:under line
>  |:bar
>  ?:question
>  ~:tilde
> -`:groff
> +`:grave
>  !:exclaim
>  @:at
>  "#":sharp
> diff --git a/data/replacements.all b/data/replacements.all
> index b575549..047a7d3 100644
> --- a/data/replacements.all
> +++ b/data/replacements.all
> @@ -2,7 +2,7 @@
>  
>  # For english language:
>  eng:.:" dot "
> -eng:,:" coma "
> +eng:,:" comma "
>  eng:;:" semicolon "
>  eng:":":" colon "
>  eng:_:" under line "
> diff --git a/executors/default.c b/executors/default.c
> index 8347722..ab7148f 100644
> --- a/executors/default.c
> +++ b/executors/default.c
> @@ -445,7 +445,7 @@ void stop()
>    fflush(stdout);
>  }
>  
> -/*This function returnes zero if there is no more data and handle can be closed*/
> +/*This function returns zero if there is no more data and handle can be closed*/
>  char processInputCommand(int fd)
>  {
>    CommandHeader header;
> @@ -597,7 +597,7 @@ int mainLoop(int fd, sigset_t* sigMask)
>  	  onSystemCallError("pselect()", errorCode);
>  	} /*if (pselect() == -1)*/
>        assert(FD_ISSET(fd, &fds));
> -      if (!processInputCommand(fd))/*this function returnes zero if fd was closed*/
> +      if (!processInputCommand(fd)) /* function returns 0 if fd was closed */
>  	return 0;
>      } /*while(1)*/
>  }
> diff --git a/utils/vmstrings.h b/utils/vmstrings.h
> index b585edb..c051776 100644
> --- a/utils/vmstrings.h
> +++ b/utils/vmstrings.h
> @@ -662,10 +662,10 @@ T getDelimitedSubStr(const T& s, size_t index, char delimiter)
>  
>  /**\brief Enumerates sequences in string of characters from specified set
>   *
> - * This class takes two string at the construction: first string
> + * This class takes two strings at the construction: first string
>   * specifies string to look through, second string specifies set of
>   * characters to search in first one. During the enumeration this class
> - * returnes all substrings of maximum length with specified characters.
> + * returns all substrings of maximum length with specified characters.
>   *
>   * \sa StringDelimitedIterator
>   */
> @@ -776,10 +776,10 @@ private:
>  
>  /**\brief Enumerates sequences in string separated by characters from specified set
>   *
> - * This class takes two string at the construction: first string
> + * This class takes two strings at the construction: first string
>   * specifies string to look through, second string specifies set of
>   * characters to separate parts to enumerate. During the enumeration this class
> - * returnes all substrings of maximum length separated by specified characters.
> + * returns all substrings of maximum length separated by specified characters.
>   *
>   * \sa StringIterator
>   */
> -- 
> 1.8.1.4
>
>
> From 3b280ec49601c74ea3643b88209565ecc353b0b8 Mon Sep 17 00:00:00 2001
> From: Dmitri Paduchikh <dpaduchikh на gmail.com>
> Date: Sun, 24 Feb 2013 12:10:02 +0600
> Subject: [PATCH] emacspeak: exclude '[' from the Dectalk command
>
> ---
>  emacspeak/LineParser.cpp | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/emacspeak/LineParser.cpp b/emacspeak/LineParser.cpp
> index b45d27a..be1ed4d 100644
> --- a/emacspeak/LineParser.cpp
> +++ b/emacspeak/LineParser.cpp
> @@ -120,11 +120,13 @@ void LineParser::q(const std::string& s)
>  	addItem(TextItem(z, pitch, m_rate, m_volume));
>        if (i < s.length() && s[i] == '[')
>  	{
> +	  // We have Dectalk control sequence
>  	  z.erase();
> +	  i++;			// skip '['
>  	  while(i < s.length() && s[i] != ']')
>  	    z += s[i++];
>  	  processDectalkCommand(z, pitch);
> -	  i++;
> +	  i++;			// skip ']'
>  	} //dectalk commands processing;
>      } //while(s[i]);
>  }
> -- 
> 1.8.1.4
>
>
> From 0885221a43289996e15546aec99600bac6e23846 Mon Sep 17 00:00:00 2001
> From: Dmitri Paduchikh <dpaduchikh на gmail.com>
> Date: Sun, 24 Feb 2013 12:25:49 +0600
> Subject: [PATCH] emacspeak: restore speech parameters of server after `d'
>  command.
>
> ---
>  emacspeak/LineParser.cpp | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/emacspeak/LineParser.cpp b/emacspeak/LineParser.cpp
> index be1ed4d..bac8c9f 100644
> --- a/emacspeak/LineParser.cpp
> +++ b/emacspeak/LineParser.cpp
> @@ -142,6 +142,10 @@ void LineParser::d()
>        m_connection.volume(it->volume);
>        m_connection.text(it->text);
>      }
> +  // Restore current speech parameters
> +  m_connection.pitch(m_pitch);
> +  m_connection.rate(m_rate);
> +  m_connection.volume(m_volume);
>    m_items.clear();
>  }
>  
> -- 
> 1.8.1.4
>
>
> From 83dff9c4bb5369f492c06bc3ba3b0d3986cb0073 Mon Sep 17 00:00:00 2001
> From: Dmitri Paduchikh <dpaduchikh на gmail.com>
> Date: Sun, 24 Feb 2013 13:13:20 +0600
> Subject: [PATCH] emacspeak: handle more Dectalk commands - :np, :nh, :nu, :nb.
>
> ---
>  emacspeak/LineParser.cpp | 11 ++++++++++-
>  1 file changed, 10 insertions(+), 1 deletion(-)
>
> diff --git a/emacspeak/LineParser.cpp b/emacspeak/LineParser.cpp
> index bac8c9f..c6b6aaf 100644
> --- a/emacspeak/LineParser.cpp
> +++ b/emacspeak/LineParser.cpp
> @@ -76,11 +76,20 @@ void LineParser::processDectalkCommand(const std::string& s, size_t& pitch)
>    StringDelimitedIterator<std::string> it(s, " \t");
>    while(it.next())
>      {
> -      if (toLower(it.str()) == ":dv")
> +      const std::string token(toLower(it.str()));
> +      if (token == ":dv")
>  	{
>  	  processDectalkDefineVoice(it, pitch);
>  	  return;
>  	}
> +      else if (token == ":np")
> +	pitch = 50;
> +      else if (token == ":nh")
> +	pitch = 3;
> +      else if (token == ":nu")
> +	pitch = 90;
> +      else if (token == ":nb")
> +	pitch = 100;
>      }
>  }
>  
> -- 
> 1.8.1.4
>
>
> From 849599a72e6cee218374513492827e5e8f46a7a2 Mon Sep 17 00:00:00 2001
> From: Dmitri Paduchikh <dpaduchikh на gmail.com>
> Date: Sun, 24 Feb 2013 14:25:45 +0600
> Subject: [PATCH] Prefix incrementing of iterators is more preferable than
>  postfix one.
>
> ---
>  daemon/config_file/ConfigFile.cpp |  2 +-
>  daemon/core/MainLoop.cpp          |  2 +-
>  daemon/core/OutputSet.cpp         |  2 +-
>  daemon/langs/EngLang.cpp          |  4 ++--
>  daemon/langs/RusLang.cpp          |  2 +-
>  daemon/main/configuration.cpp     | 16 +++++++++-------
>  daemon/main/main.cpp              | 23 ++++++++++++++---------
>  emacspeak/LineParser.cpp          |  2 +-
>  8 files changed, 30 insertions(+), 23 deletions(-)
>
> diff --git a/daemon/config_file/ConfigFile.cpp b/daemon/config_file/ConfigFile.cpp
> index 25acf0b..9375fc6 100644
> --- a/daemon/config_file/ConfigFile.cpp
> +++ b/daemon/config_file/ConfigFile.cpp
> @@ -315,7 +315,7 @@ int ConfigFile::params(const std::string& section, const std::string& param) con
>  
>  void ConfigFile::checkParamsInSection(const ConfigFileSection& section) const
>  {
> -  for(ConfigFileSection::const_iterator it = section.begin();it != section.end();it++)
> +  for (ConfigFileSection::const_iterator it = section.begin(); it != section.end(); ++it)
>      {
>        int requiredType = params(section.getName(), it->first);
>        const std::string& value = it->second;
> diff --git a/daemon/core/MainLoop.cpp b/daemon/core/MainLoop.cpp
> index 20a086c..397cff2 100644
> --- a/daemon/core/MainLoop.cpp
> +++ b/daemon/core/MainLoop.cpp
> @@ -130,7 +130,7 @@ void MainLoop::run(const SocketList& sockets, sigset_t* sigMask)
>  	  m_clientDataHandler.processClientData(**clientIt, data);
>  	} // for (clients);
>      } // while(!m_terminationFlag);
> -  for(ClientList::iterator it = m_connectedClients.begin();it != m_connectedClients.end();it++)
> +  for (ClientList::iterator it = m_connectedClients.begin(); it != m_connectedClients.end(); ++it)
>      delete *it;
>    m_connectedClients.clear();
>  }
> diff --git a/daemon/core/OutputSet.cpp b/daemon/core/OutputSet.cpp
> index f0a0bdf..56db965 100644
> --- a/daemon/core/OutputSet.cpp
> +++ b/daemon/core/OutputSet.cpp
> @@ -23,7 +23,7 @@ void OutputSet::reinit(const OutputList& outputs)
>      return;
>    m_outputs.resize(outputs.size());
>    OutputVector::size_type index = 0;
> -  for(OutputList::const_iterator it = outputs.begin();it != outputs.end();it++)
> +  for (OutputList::const_iterator it = outputs.begin(); it != outputs.end(); ++it)
>      {
>        assert(index < m_outputs.size());
>        m_outputs[index] = *it;
> diff --git a/daemon/langs/EngLang.cpp b/daemon/langs/EngLang.cpp
> index fcd72c8..7129a81 100644
> --- a/daemon/langs/EngLang.cpp
> +++ b/daemon/langs/EngLang.cpp
> @@ -301,7 +301,7 @@ std::wstring EngLang::separate(const std::wstring& text) const
>  
>  bool EngLang::checkCapList(const std::wstring& str, std::wstring::size_type pos, std::wstring& result) const
>  {
> -  for(CapItemList::const_iterator i = m_capItems.begin();i != m_capItems.end();i++)
> +  for (CapItemList::const_iterator i = m_capItems.begin(); i != m_capItems.end(); ++i)
>      {
>        std::wstring s = toLower(i->str);
>        if (str.length() < s.length() + pos)//must be (str.length() - pos < s.length()), but it can cause sign problems;
> @@ -360,7 +360,7 @@ void EngLang::loadCaps(const std::string& fileName)
>    text = cutComments(text);
>    StringList lines;
>    splitTextFileLines(text, lines, 1, 1);// 1 and 1 means trim lines and skip empty;
> -  for(StringList::const_iterator it = lines.begin();it != lines.end();it++)
> +  for (StringList::const_iterator it = lines.begin(); it != lines.end(); ++it)
>      {
>        const std::string& s = *it;
>        std::string::size_type l, r;
> diff --git a/daemon/langs/RusLang.cpp b/daemon/langs/RusLang.cpp
> index 9be882d..0219156 100644
> --- a/daemon/langs/RusLang.cpp
> +++ b/daemon/langs/RusLang.cpp
> @@ -42,7 +42,7 @@ void RusLang::load(const std::string& fileName)
>    fileText = cutComments(fileText);
>    StringList lines;
>    splitTextFileLines(fileText, lines, 1, 1);//1 and 1 means trim lines and skip empty;
> -  for(StringList::const_iterator it = lines.begin();it != lines.end();it++)
> +  for (StringList::const_iterator it = lines.begin(); it != lines.end(); ++it)
>      {
>        std::string t = trim(::toLower(getDelimitedSubStr(*it, 0, ':')));
>        if (t.empty())
> diff --git a/daemon/main/configuration.cpp b/daemon/main/configuration.cpp
> index b33028c..6da25a8 100644
> --- a/daemon/main/configuration.cpp
> +++ b/daemon/main/configuration.cpp
> @@ -237,7 +237,7 @@ static void processFamiliesConfiguration(const LangManager& langs, const Voicema
>    if (config.hasSection("families"))
>      {
>        const ConfigFileSection& sec = config.findSection("families");
> -      for(ConfigFileSection::const_iterator it = sec.begin();it != sec.end();it++)
> +      for (ConfigFileSection::const_iterator it = sec.begin(); it != sec.end(); ++it)
>  	{
>  	  const std::string name = trim(toLower(it->first));
>  	  const std::string value = trim(toLower(it->second));
> @@ -278,7 +278,7 @@ static void processFamiliesConfiguration(const LangManager& langs, const Voicema
>    ////Checking if we have enough information to select default family;
>    StringList supportedLanguages;
>    langs.getSupportedLanguageNames(supportedLanguages);
> -  for(StringList::const_iterator it = supportedLanguages.begin();it != supportedLanguages.end();it++)
> +  for (StringList::const_iterator it = supportedLanguages.begin(); it != supportedLanguages.end(); ++it)
>      {
>        const LangId langId = langs.getLangId(*it);
>        assert(langId != LANG_ID_NONE);
> @@ -354,7 +354,7 @@ static void processCharactersSection(const LangManager& langs, const VoicemanCon
>    if (config.hasSection("characters"))
>      {
>        const ConfigFileSection& sec = config.findSection("characters");
> -      for(ConfigFileSection::const_iterator it = sec.begin();it != sec.end();it++)
> +      for (ConfigFileSection::const_iterator it = sec.begin(); it != sec.end(); ++it)
>  	{
>  	  const std::string langName = trim(toLower(it->first));
>  	  LangId langId = LANG_ID_NONE;
> @@ -508,7 +508,7 @@ static void printOutputsConfiguration(const LangManager& langs, const Configurat
>        if (!o.capList.empty())
>  	{
>  	  std::cout << "cap list = ";
> -	  for(WCharToWStringMap::const_iterator it = o.capList.begin();it != o.capList.end();it++)
> +	  for (WCharToWStringMap::const_iterator it = o.capList.begin(); it != o.capList.end(); ++it)
>  	    {
>  	      std::wstring s1;
>  	      s1 += it->first;
> @@ -581,7 +581,7 @@ void printConfiguration(const LangManager& langs, const Configuration& c)
>      {
>        std::cout << std::endl;
>        std::cout << "Characters map:" << std::endl;
> -      for(LangIdToWStringMap::const_iterator it = c.characters.begin();it != c.characters.end();it++)
> +      for (LangIdToWStringMap::const_iterator it = c.characters.begin(); it != c.characters.end(); ++it)
>  	std::cout << (it->first != LANG_ID_NONE?langs.getLangName(it->first):"default") << " = " << it->second << std::endl;
>      }
>    printOutputsConfiguration(langs, c);
> @@ -589,14 +589,16 @@ void printConfiguration(const LangManager& langs, const Configuration& c)
>      {
>        std::cout << std::endl;
>        std::cout << "Default families for languages:" << std::endl;
> -      for(LangIdToStringMap::const_iterator it = c.defaultFamilies.begin();it != c.defaultFamilies.end();it++)
> +      for (LangIdToStringMap::const_iterator it = c.defaultFamilies.begin();
> +	   it != c.defaultFamilies.end(); ++it)
>  	std::cout << langs.getLangName(it->first) << " = " << it->second << std::endl;
>      } //default families;
>    if (!c.characters.empty())
>      {
>        std::cout << std::endl;
>        std::cout << "Characters map:" << std::endl;
> -	for(LangIdToWStringMap::const_iterator it = c.characters.begin();it != c.characters.end();it++)
> +	for (LangIdToWStringMap::const_iterator it = c.characters.begin();
> +	     it != c.characters.end(); ++it)
>  	  std::cout << (it->first != LANG_ID_NONE?langs.getLangName(it->first):"default") << " = " << it->second << std::endl;
>      } //characters;
>  }
> diff --git a/daemon/main/main.cpp b/daemon/main/main.cpp
> index 3f97afc..fa9f568 100644
> --- a/daemon/main/main.cpp
> +++ b/daemon/main/main.cpp
> @@ -101,7 +101,8 @@ void fillOutputListByConfiguration(const OutputConfigurationVector& outputConfig
>  	      o.addReplacement(readUTF8(fromString), readUTF8(toString));
>  	    } //for(lines in replacements file);
>  	} //replacements reading;
> -      for(WCharToWStringMap::const_iterator it = oc.capList.begin();it != oc.capList.end();it++)
> +      for (WCharToWStringMap::const_iterator it = oc.capList.begin();
> +	   it != oc.capList.end(); ++it)
>  	o.addCapMapItem(it->first, it->second);
>        logMsg(LOG_DEBUG, "Adding output \'%s\' to output set", outputConfigurations[i].name.c_str());
>        outputList.push_back(o);
> @@ -190,7 +191,8 @@ public:
>      //OK, now we have the set of splitted items, but output information is omitted in it, only language specifications;
>      TextItemList preparedTextItems;
>      assignOutput(client, textItemList, preparedTextItems);
> -    for(TextItemList::const_iterator it = preparedTextItems.begin();it != preparedTextItems.end();it++)
> +    for (TextItemList::const_iterator it = preparedTextItems.begin();
> +	 it != preparedTextItems.end(); ++it)
>        m_executorInterface.sayOrEnqueue(*it);
>    }
>  
> @@ -216,7 +218,8 @@ public:
>      //OK, now we have the set of splitted items, but output information is omitted in it, only language specifications;
>      TextItemList preparedTextItems;
>      assignOutput(client, textItemList, preparedTextItems);
> -    for(TextItemList::const_iterator it = preparedTextItems.begin();it != preparedTextItems.end();it++)
> +    for (TextItemList::const_iterator it = preparedTextItems.begin();
> +	 it != preparedTextItems.end(); ++it)
>        m_executorInterface.sayOrEnqueue(*it);
>    }
>  
> @@ -346,7 +349,8 @@ public:
>      if (langId == LANG_ID_NONE)
>        {
>  	//Using m_defaultFamilies map to enumerate all available languages;
> -	for(LangIdToStringMap::const_iterator it = m_defaultFamilies.begin();it != m_defaultFamilies.end();it++)
> +	for (LangIdToStringMap::const_iterator it = m_defaultFamilies.begin();
> +	     it != m_defaultFamilies.end(); ++it)
>  	  {
>  	    if (!m_outputSet.isValidFamilyName(it->first, family))
>  	      continue;
> @@ -374,7 +378,7 @@ private:
>    void assignOutput(const Client& client, TextItemList& textItemList, TextItemList& preparedItems) const
>    {
>      preparedItems.clear();
> -    for(TextItemList::iterator it = textItemList.begin();it != textItemList.end();it++)
> +    for (TextItemList::iterator it = textItemList.begin(); it != textItemList.end(); ++it)
>        {
>  	const TextItem& ti = *it;
>  	//Now we must find  proper output to process;
> @@ -425,7 +429,7 @@ private:
>      //Using only really required languages;
>      for(OutputConfigurationVector::size_type i = 0;i < c.outputs.size();i++)
>        langIdSet.insert(c.outputs[i].langId);
> -    for(LangIdSet::const_iterator it = langIdSet.begin();it != langIdSet.end();it++)
> +    for (LangIdSet::const_iterator it = langIdSet.begin(); it != langIdSet.end(); ++it)
>        {
>  	logMsg(LOG_DEBUG, "Adding \'%s\' language support to text processor \'%s\'", langManager.getLangName(*it).c_str(), name.c_str());
>  	const Lang* lang = langManager.getLangById(*it);
> @@ -506,7 +510,8 @@ private:
>  
>    void destroyAllTextProcessors()
>    {
> -    for(StringToTextProcMap::iterator it = m_textProcessors.begin();it != m_textProcessors.end();it++)
> +    for (StringToTextProcMap::iterator it = m_textProcessors.begin();
> +	 it != m_textProcessors.end(); ++it)
>        delete it->second;
>      m_textProcessors.clear();
>    }
> @@ -586,7 +591,7 @@ public:
>  	m_outputSet.reinit(outputList);
>  	m_protocolHandler.reinit(c);
>  	logMsg(LOG_DEBUG, "resetting families preferences for %u clients", m_clients.size());
> -	for(ClientList::iterator it = m_clients.begin();it != m_clients.end();it++)
> +	for (ClientList::iterator it = m_clients.begin(); it != m_clients.end(); ++it)
>  	  (*it)->selectedFamilies.clear();
>  	logMsg(LOG_INFO, "New configuration was successfully reloaded!");
>        }
> @@ -791,7 +796,7 @@ private:
>  
>    void closeAllConnections()
>    {
> -    for (ClientList::iterator it = m_clients.begin();it != m_clients.end();it++)
> +    for (ClientList::iterator it = m_clients.begin(); it != m_clients.end(); ++it)
>        delete *it;//sockets will be closed automatically in destructor;
>      m_clients.clear();
>    }
> diff --git a/emacspeak/LineParser.cpp b/emacspeak/LineParser.cpp
> index c6b6aaf..9dd2ed1 100644
> --- a/emacspeak/LineParser.cpp
> +++ b/emacspeak/LineParser.cpp
> @@ -142,7 +142,7 @@ void LineParser::q(const std::string& s)
>  
>  void LineParser::d()
>  {
> -  for(TextItemList::const_iterator it = m_items.begin();it != m_items.end();it++)
> +  for (TextItemList::const_iterator it = m_items.begin(); it != m_items.end(); ++it)
>      {
>        if (m_pitchShift >= 0 || it->pitch > (size_t)(-1 * m_pitchShift))
>  	m_connection.pitch(it->pitch + m_pitchShift); else

-- 
Michael Pozhidaev. Tomsk, Russia.
Russian info page: http://www.marigostra.ru/


Подробная информация о списке рассылки Homeros