From 1ef58971fd13b7c2685d0a0ac6f29b459692222d Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 9 Mar 2004 11:48:32 -0600 Subject: Reword comment/help message. Fix comment typos. (Skipp -> Skip) --- extra/replace.c | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) (limited to 'extra') diff --git a/extra/replace.c b/extra/replace.c index 41312f5e3d4..792684918ea 100644 --- a/extra/replace.c +++ b/extra/replace.c @@ -15,6 +15,12 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* Replace strings in textfile + This program replaces strings in files or from stdin to stdout. + It accepts a list of from-string/to-string pairs and replaces + each occurrence of a from-string with the corresponding to-string. + The first occurrence of a found string is matched. If there is more + than one possibility for the string to replace, longer matches + are preferred before shorter matches. This program replace strings in a file or on stdin/stdout. It accepts a list of from-strings and to-strings and replaces all occurents of from-strings to to-strings. @@ -167,7 +173,7 @@ register char **argv[]; break; case '#': DBUG_PUSH (++pos); - pos= (char*) " "; /* Skipp rest of arguments */ + pos= (char*) " "; /* Skip rest of arguments */ break; case 'V': version=1; @@ -179,12 +185,13 @@ register char **argv[]; if (version) break; puts("This software comes with ABSOLUTELY NO WARRANTY. This is free software,\nand you are welcome to modify and redistribute it under the GPL license\n"); - puts("This program replace strings in a file or on stdin/stdout.\n" - "It accepts a list of from-strings and to-strings and replaces\n" - "all occurents of from-strings to to-strings.\n" - "The first occurents of a found string is matched. Longer matches\n" - "are prefered before shorter matches.\n\n" - "Special characters in from string:\n" + puts("This program replaces strings in files or from stdin to stdout.\n" + "It accepts a list of from-string/to-string pairs and replaces\n" + "each occurrence of a from-string with the corresponding to-string.\n" + "The first occurrence of a found string is matched. If there is\n" + "more than one possibility for the string to replace, longer\n" + "matches are preferred before shorter matches.\n\n" + "A from-string can contain these special characters:\n" " \\^ Match start of line.\n" " \\$ Match end of line.\n" " \\b Match space-character, start of line or end of line.\n" @@ -237,7 +244,7 @@ POINTER_ARRAY *from_array,*to_array; (*argv)++; } if (*argc) - { /* Skipp "--" argument */ + { /* Skip "--" argument */ (*argc)--; (*argv)++; } -- cgit v1.2.1 From a1d9e1eec4ff8e9e53567bb3606bc4605a952375 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 12 Mar 2004 01:10:22 +0200 Subject: Ensure that install_test_db.sh script works with both 'make install' and 'make_binary_distribution' layouts Abort if we can't allocate memory for table cache Fix bug with multi-update-tables and BDB tables. extra/replace.c: Fix comments mysql-test/install_test_db.sh: Change internal option from -bin to --bin Ensure that script works with both 'make install' and 'make_binary_distribution' layouts (Bug #3031) mysql-test/mysql-test-run.sh: Change internal option from -bin to --bin sql/ha_berkeley.cc: More debug sql/mysql_priv.h: Change table_cache_init to return error sql/mysqld.cc: Abort if we can't allocate memory for table cache. (Bug #3085) Enable warnings by default sql/sql_base.cc: Change table_cache_init to return error sql/sql_update.cc: Fix bug with multi-update-tables and BDB tables. Bug #3098 Problem was that we didn't initialize BDB for calls to rnd_pos() --- extra/replace.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'extra') diff --git a/extra/replace.c b/extra/replace.c index 792684918ea..422cfdbac36 100644 --- a/extra/replace.c +++ b/extra/replace.c @@ -14,18 +14,16 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* Replace strings in textfile +/* + Replace strings in textfile + This program replaces strings in files or from stdin to stdout. It accepts a list of from-string/to-string pairs and replaces each occurrence of a from-string with the corresponding to-string. The first occurrence of a found string is matched. If there is more than one possibility for the string to replace, longer matches are preferred before shorter matches. - This program replace strings in a file or on stdin/stdout. - It accepts a list of from-strings and to-strings and replaces all - occurents of from-strings to to-strings. - The first occurents of a found string is matched. If there are more than - one possibly replace the longer from-string is replaced. + Special characters in from string: \^ Match start of line. \$ Match end of line. @@ -956,9 +954,11 @@ static void free_buffer() } -/* Fill the buffer retaining the last n bytes at the beginning of the - newly filled buffer (for backward context). Returns the number of new - bytes read from disk. */ +/* + Fill the buffer retaining the last n bytes at the beginning of the + newly filled buffer (for backward context). Returns the number of new + bytes read from disk. +*/ static int fill_buffer_retaining(fd,n) File fd; -- cgit v1.2.1