Commit 3e48fd3f authored by unknown's avatar unknown

Merge paul@bk-internal.mysql.com:/home/bk/mysql-4.0

into teton.kitebird.com:/home/paul/mysql-4.0

parents 65cc7890 1ef58971
...@@ -15,6 +15,12 @@ ...@@ -15,6 +15,12 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ 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. This program replace strings in a file or on stdin/stdout.
It accepts a list of from-strings and to-strings and replaces all It accepts a list of from-strings and to-strings and replaces all
occurents of from-strings to to-strings. occurents of from-strings to to-strings.
...@@ -167,7 +173,7 @@ register char **argv[]; ...@@ -167,7 +173,7 @@ register char **argv[];
break; break;
case '#': case '#':
DBUG_PUSH (++pos); DBUG_PUSH (++pos);
pos= (char*) " "; /* Skipp rest of arguments */ pos= (char*) " "; /* Skip rest of arguments */
break; break;
case 'V': case 'V':
version=1; version=1;
...@@ -179,12 +185,13 @@ register char **argv[]; ...@@ -179,12 +185,13 @@ register char **argv[];
if (version) if (version)
break; 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 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" puts("This program replaces strings in files or from stdin to stdout.\n"
"It accepts a list of from-strings and to-strings and replaces\n" "It accepts a list of from-string/to-string pairs and replaces\n"
"all occurents of from-strings to to-strings.\n" "each occurrence of a from-string with the corresponding to-string.\n"
"The first occurents of a found string is matched. Longer matches\n" "The first occurrence of a found string is matched. If there is\n"
"are prefered before shorter matches.\n\n" "more than one possibility for the string to replace, longer\n"
"Special characters in from string:\n" "matches are preferred before shorter matches.\n\n"
"A from-string can contain these special characters:\n"
" \\^ Match start of line.\n" " \\^ Match start of line.\n"
" \\$ Match end of line.\n" " \\$ Match end of line.\n"
" \\b Match space-character, start of line or 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; ...@@ -237,7 +244,7 @@ POINTER_ARRAY *from_array,*to_array;
(*argv)++; (*argv)++;
} }
if (*argc) if (*argc)
{ /* Skipp "--" argument */ { /* Skip "--" argument */
(*argc)--; (*argc)--;
(*argv)++; (*argv)++;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment