changeset 7117:373c39904877

[project @ 2007-11-07 18:48:00 by jwe]
author jwe
date Wed, 07 Nov 2007 18:48:01 +0000
parents c7992b210874
children d32f867e4dda
files ChangeLog configure.in scripts/ChangeLog scripts/audio/wavread.m scripts/audio/wavwrite.m src/ChangeLog src/DLD-FUNCTIONS/__gnuplot_raw__.l src/DLD-FUNCTIONS/regexp.cc
diffstat 8 files changed, 94 insertions(+), 21 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2007-11-07  John W. Eaton  <jwe@octave.org>
+
+	* configure.in: Also check for pcre/pcre.h.
+
 2007-11-01  John W. Eaton  <jwe@octave.org>
 
 	* configure.in: Delete BLAS library calling convention
--- a/configure.in
+++ b/configure.in
@@ -29,7 +29,7 @@
 EXTERN_CXXFLAGS="$CXXFLAGS"
 
 AC_INIT
-AC_REVISION($Revision: 1.590 $)
+AC_REVISION($Revision: 1.591 $)
 AC_PREREQ(2.57)
 AC_CONFIG_SRCDIR([src/octave.cc])
 AC_CONFIG_HEADER(config.h)
@@ -425,7 +425,7 @@
 ### Check for pcre/regex library.
 AC_SUBST(REGEX_LIBS)
 WITH_PCRE_CONFIG=no
-AC_CHECK_HEADER(pcre.h, WITH_PCRE=yes, WITH_PCRE=no)
+AC_CHECK_HEADERS([pcre/pcre.h pcre.h], WITH_PCRE=yes, WITH_PCRE=no)
 if test $WITH_PCRE = no ; then
   AC_CHECK_PROG(WITH_PCRE_CONFIG, pcre-config, yes, no)
   if test $WITH_PCRE_CONFIG = yes ; then
--- a/scripts/ChangeLog
+++ b/scripts/ChangeLog
@@ -1,3 +1,7 @@
+2007-11-07  Michael Zeising  <michael@michaels-website.de>
+
+	* audio/wavwrite.m, audio/wavwrite.m: Correct sample scaling.
+
 2007-11-07  John W. Eaton  <jwe@octave.org>
 
 	* plot/__go_draw_axes__.m: Also set have_data to false if any of
--- a/scripts/audio/wavread.m
+++ b/scripts/audio/wavread.m
@@ -38,7 +38,7 @@
 ## @seealso{wavwrite}
 ## @end deftypefn
 
-## Author: Michael Zeising <michael.zeising@stud.uni-erlangen.de>
+## Author: Michael Zeising <michael@michaels-website.de>
 ## Created: 06 December 2005
 
 function [y, samples_per_sec, bits_per_sample] = wavread (filename, param)
@@ -195,13 +195,13 @@
     ## normalize samples
     switch (bits_per_sample)
       case 8
-        yi = (yi - 127.5)/127.5;
+        yi = (yi - 128)/127;
       case 16
-        yi /= 32768;
+        yi /= 32767;
       case 24
-	yi /= 8388608;
+		yi /= 8388607;
       case 32
-        yi /= 2147483648;
+        yi /= 2147483647;
     endswitch
   endif
   
--- a/scripts/audio/wavwrite.m
+++ b/scripts/audio/wavwrite.m
@@ -27,7 +27,7 @@
 ## @seealso{wavread}
 ## @end deftypefn
 
-## Author: Michael Zeising <michael.zeising@stud.uni-erlangen.de>
+## Author: Michael Zeising <michael@michaels-website.de>
 ## Created: 06 December 2005
 
 function wavwrite (y, varargin)
@@ -147,11 +147,11 @@
   ## scale samples
   switch (bits_per_sample)
     case 8
-      yi = round (yi*128 + 128);
+      yi = round (yi*127 + 128);
     case 16
-      yi = round (yi*32768);
+      yi = round (yi*32767);
     case 32
-      yi = round (yi*2147483648);
+      yi = round (yi*2147483647);
   endswitch
   
   ## write to file
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,18 @@
+2007-11-07  John W. Eaton  <jwe@octave.org>
+
+	* DLD-FUNCTIONS/regexp.cc: Handle HAVE_PCRE_PCRE_H.  Check
+	HAVE_PCRE_H instead of HAVE_PCRE to decide whether to include pcre.h.
+
+	* DLD-FUNCTIONS/__gnuplot_raw__.l (Fgnuplot_command_plot,
+	Fgnuplot_command_replot, Fgnuplot_command_splot,
+	Fgnuplot_command_using, Fgnuplot_command_with,
+	Fgnuplot_command_axes, Fgnuplot_command_title,
+	Fgnuplot_command_end, Fgnuplot_use_title_option,
+	F__clear_plot_window__, Fcloseplot, Fpurge_tmp_files,
+	F__gnuplot_raw__, F__gnuplot_send_inline_data__, F__gnuplot_set__,
+	F__gnuplot_show__, F__gnuplot_plot__, F__gnuplot_splot__,
+	F__gnuplot_replot__): Note obsolescence in doc string.
+
 2007-11-06  Kai Habel  <kai.habel@gmx.de>
 
 	* graphics.h.in (class surface::properties): New properties, 
--- a/src/DLD-FUNCTIONS/__gnuplot_raw__.l
+++ b/src/DLD-FUNCTIONS/__gnuplot_raw__.l
@@ -1567,6 +1567,8 @@
   "-*- texinfo -*-\n\
 @deftypefn {Loadable Function} {@var{val} = } gnuplot_command_plot ()\n\
 @deftypefnx {Loadable Function} {@var{old_val} = } gnuplot_command_plot (@var{new_val})\n\
+@strong{This function is obsolete and will be removed from a future version\n\
+of Octave.}\n\
 @end deftypefn")
 {
   return SET_INTERNAL_VARIABLE (gnuplot_command_plot);
@@ -1576,6 +1578,8 @@
   "-*- texinfo -*-\n\
 @deftypefn {Loadable Function} {@var{val} =} gnuplot_command_replot ()\n\
 @deftypefnx {Loadable Function} {@var{old_val} =} gnuplot_command_replot (@var{new_val})\n\
+@strong{This function is obsolete and will be removed from a future version\n\
+of Octave.}\n\
 @end deftypefn")
 {
   return SET_INTERNAL_VARIABLE (gnuplot_command_replot);
@@ -1585,6 +1589,8 @@
   "-*- texinfo -*-\n\
 @deftypefn {Loadable Function} {@var{val} =} gnuplot_command_splot ()\n\
 @deftypefnx {Loadable Function} {@var{old_val} =} gnuplot_command_splot (@var{new_val})\n\
+@strong{This function is obsolete and will be removed from a future version\n\
+of Octave.}\n\
 @end deftypefn")
 {
   return SET_INTERNAL_VARIABLE (gnuplot_command_splot);
@@ -1594,6 +1600,8 @@
   "-*- texinfo -*-\n\
 @deftypefn {Loadable Function} {@var{val} =} gnuplot_command_using ()\n\
 @deftypefnx {Loadable Function} {@var{old_val} =} gnuplot_command_using (@var{new_val})\n\
+@strong{This function is obsolete and will be removed from a future version\n\
+of Octave.}\n\
 @end deftypefn")
 {
   return SET_INTERNAL_VARIABLE (gnuplot_command_using);
@@ -1603,6 +1611,7 @@
   "-*- texinfo -*-\n\
 @deftypefn {Loadable Function} {@var{val} =} gnuplot_command_with ()\n\
 @deftypefnx {Loadable Function} {@var{old_val} =} gnuplot_command_with (@var{new_val})\n\
+of Octave.}\n\
 @end deftypefn")
 {
   return SET_INTERNAL_VARIABLE (gnuplot_command_with);
@@ -1612,6 +1621,8 @@
   "-*- texinfo -*-\n\
 @deftypefn {Loadable Function} {@var{val} =} gnuplot_command_axes ()\n\
 @deftypefnx {Loadable Function} {@var{old_val} =} gnuplot_command_axes (@var{new_val})\n\
+@strong{This function is obsolete and will be removed from a future version\n\
+of Octave.}\n\
 @end deftypefn")
 {
   return SET_INTERNAL_VARIABLE (gnuplot_command_axes);
@@ -1621,6 +1632,8 @@
   "-*- texinfo -*-\n\
 @deftypefn {Loadable Function} {@var{val} =} gnuplot_command_title ()\n\
 @deftypefnx {Loadable Function} {@var{old_val} =} gnuplot_command_title (@var{new_val})\n\
+@strong{This function is obsolete and will be removed from a future version\n\
+of Octave.}\n\
 @end deftypefn")
 {
   return SET_INTERNAL_VARIABLE (gnuplot_command_title);
@@ -1630,6 +1643,9 @@
   "-*- texinfo -*-\n\
 @deftypefn {Loadable Function} {@var{val} =} gnuplot_command_end ()\n\
 @deftypefnx {Loadable Function} {@var{old_val} =} gnuplot_command_end (@var{new_val})\n\
+@strong{This function is obsolete and will be removed from a future version\n\
+of Octave.}\n\
+\n\
 @end deftypefn")
 {
   return SET_INTERNAL_VARIABLE (gnuplot_command_end);
@@ -1642,6 +1658,9 @@
 If enabled, append @samp{-title \"Figure NN\"} to the gnuplot command.\n\
 By default, this feature is enabled if the @code{DISPLAY} environment\n\
 variable is set when Octave starts.\n\
+\n\
+@strong{This function is obsolete and will be removed from a future version\n\
+of Octave.}\n\
 @end deftypefn")
 {
   return SET_INTERNAL_VARIABLE (gnuplot_use_title_option);
@@ -1652,6 +1671,9 @@
 @deftypefn {Loadable Function} {} clearplot\n\
 @deftypefnx {Loadable Function} {} clg\n\
 Clear the plot window and any titles or axis labels.\n\
+\n\
+@strong{This function is obsolete and will be removed from a future version\n\
+of Octave.}\n\
 @end deftypefn")
 {
   gnuplot::clear ();
@@ -1662,8 +1684,12 @@
 DEFUN_DLD (closeplot, , ,
   "-*- texinfo -*-\n\
 @deftypefn {Loadable Function} {} closeplot\n\
+@strong{This function is obsolete and will be removed from a future version\n\
+of Octave.}\n\
+\n\
 Close stream to the @code{gnuplot} subprocess.  If you are using X11,\n\
 this will close the plot window.\n\
+@seealso{close}\n\
 @end deftypefn")
 {
   gnuplot::close ();
@@ -1681,8 +1707,8 @@
 temporary files on exit, but if you are doing a lot of plotting you may\n\
 want to clean up in the middle of a session.\n\
 \n\
-A future version of Octave will eliminate the need to use temporary\n\
-files to hold the plot data.\n\
+@strong{This function is obsolete and will be removed from a future version\n\
+of Octave.}\n\
 @end deftypefn")
 {
   gnuplot::cleanup_tmp_files ();
@@ -1694,6 +1720,9 @@
   "-*- texinfo -*-\n\
 @deftypefn {Loadable Function} {} __gnuplot_raw__ (@var{string})\n\
 Send @var{string} directly to gnuplot subprocess.\n\
+\n\
+@strong{This function is obsolete and will be removed from a future version\n\
+of Octave.}\n\
 @end deftypefn")
 {
   if (args.length () == 1 && args(0).is_string ())
@@ -1712,6 +1741,9 @@
   "-*- texinfo -*-\n\
 @deftypefn {Loadable Function} {} __gnuplot_send_inline_data__ (@var{data}, @var{ndim}, @var{parametric})\n\
 Send @var{val} to gnuplot subprocess as inline data.\n\
+\n\
+@strong{This function is obsolete and will be removed from a future version\n\
+of Octave.}\n\
 @end deftypefn")
 {
   octave_value retval;
@@ -1747,6 +1779,9 @@
   "-*- texinfo -*-\n\
 @deffn {Loadable Function} __gnuplot_set__ options\n\
 Set plotting options for gnuplot\n\
+\n\
+@strong{This function is obsolete and will be removed from a future version\n\
+of Octave.}\n\
 @end deffn")
 {
   string_vector argv = args.make_argv ("set");
@@ -1761,6 +1796,9 @@
   "-*- texinfo -*-\n\
 @deffn {Loadable Function} __gnuplot_show__ options\n\
 Show plotting options.\n\
+\n\
+@strong{This function is obsolete and will be removed from a future version\n\
+of Octave.}\n\
 @end deffn")
 {
   string_vector argv = args.make_argv ("show");
@@ -1772,7 +1810,11 @@
 }
 
 DEFUN_DLD (__gnuplot_plot__, args, ,
-  "Plot with gnuplot.\n")
+  "-*- texinfo -*-\n\
+Plot with gnuplot.\n\
+\n\
+@strong{This function is obsolete and will be removed from a future version\n\
+of Octave.}")
 {
   string_vector argv = args.make_argv ("plot");
 
@@ -1783,7 +1825,11 @@
 }
 
 DEFUN_DLD (__gnuplot_splot__, args, ,
-  "Plot with gnuplot.\n")
+  "-*- texinfo -*-\n\
+Plot with gnuplot.\n\
+\n\
+@strong{This function is obsolete and will be removed from a future version\n\
+of Octave.}")
 {
   string_vector argv = args.make_argv ("splot");
 
@@ -1794,7 +1840,11 @@
 }
 
 DEFUN_DLD (__gnuplot_replot__, args, ,
-  "Plot with gnuplot.\n")
+  "-*- texinfo -*-\n\
+Plot with gnuplot.\n\
+\n\
+@strong{This function is obsolete and will be removed from a future version\n\
+of Octave.}")
 {
   string_vector argv = args.make_argv ("replot");
 
--- a/src/DLD-FUNCTIONS/regexp.cc
+++ b/src/DLD-FUNCTIONS/regexp.cc
@@ -40,16 +40,16 @@
 #include "quit.h"
 #include "parse.h"
 
-#ifdef HAVE_PCRE
+#if defined (HAVE_PCRE_PCRE_H)
+#include <pcre/pcre.h>
+#elif defined (HAVE_PCRE_H)
 #include <pcre.h>
-#else
-#ifdef HAVE_REGEX
-#ifdef __MINGW32__
+#elif defined (HAVE_REGEX)
+#if defined (__MINGW32__)
 #define __restrict
 #endif
 #include <regex.h>
 #endif
-#endif
 
 // The regexp is constructed as a linked list to avoid resizing the
 // return values in arrays at each new match.