projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7ddaf7c
)
Applied patch from Erik Habbinga to fix a problem with an uninitialized
author
Mark Whitley
<markw@lineo.com>
Wed, 14 Mar 2001 21:11:49 +0000
(21:11 -0000)
committer
Mark Whitley
<markw@lineo.com>
Wed, 14 Mar 2001 21:11:49 +0000
(21:11 -0000)
substitution delimiter.
editors/sed.c
patch
|
blob
|
history
sed.c
patch
|
blob
|
history
diff --git
a/editors/sed.c
b/editors/sed.c
index 0f0f4a28d19829907293ab7335e1fe544aee2ad8..a18f6e5222033abe76c542d23b9b3db7e28f4db7 100644
(file)
--- a/
editors/sed.c
+++ b/
editors/sed.c
@@
-154,6
+154,9
@@
static int get_address(struct sed_cmd *sed_cmd, const char *str, int *line, rege
{
char *my_str = strdup(str);
int idx = 0;
+ char olddelimiter;
+ olddelimiter = sed_cmd->delimiter;
+ sed_cmd->delimiter = '/';
if (isdigit(my_str[idx])) {
do {
@@
-182,6
+185,7
@@
static int get_address(struct sed_cmd *sed_cmd, const char *str, int *line, rege
}
free(my_str);
+ sed_cmd->delimiter = olddelimiter;
return idx;
}
diff --git
a/sed.c
b/sed.c
index 0f0f4a28d19829907293ab7335e1fe544aee2ad8..a18f6e5222033abe76c542d23b9b3db7e28f4db7 100644
(file)
--- a/
sed.c
+++ b/
sed.c
@@
-154,6
+154,9
@@
static int get_address(struct sed_cmd *sed_cmd, const char *str, int *line, rege
{
char *my_str = strdup(str);
int idx = 0;
+ char olddelimiter;
+ olddelimiter = sed_cmd->delimiter;
+ sed_cmd->delimiter = '/';
if (isdigit(my_str[idx])) {
do {
@@
-182,6
+185,7
@@
static int get_address(struct sed_cmd *sed_cmd, const char *str, int *line, rege
}
free(my_str);
+ sed_cmd->delimiter = olddelimiter;
return idx;
}