aboutsummaryrefslogtreecommitdiff
path: root/editors
diff options
context:
space:
mode:
Diffstat (limited to 'editors')
-rw-r--r--editors/sed.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/editors/sed.c b/editors/sed.c
index 637a6851b..ca9ab2054 100644
--- a/editors/sed.c
+++ b/editors/sed.c
@@ -337,7 +337,7 @@ static int get_address(const char *my_str, int *linenum, regex_t ** regex)
337 337
338 if (isdigit(*my_str)) { 338 if (isdigit(*my_str)) {
339 *linenum = strtol(my_str, (char**)&pos, 10); 339 *linenum = strtol(my_str, (char**)&pos, 10);
340 /* endstr shouldnt ever equal NULL */ 340 /* endstr shouldn't ever equal NULL */
341 } else if (*my_str == '$') { 341 } else if (*my_str == '$') {
342 *linenum = -1; 342 *linenum = -1;
343 pos++; 343 pos++;
@@ -444,7 +444,7 @@ static int parse_subst_cmd(sed_cmd_t *sed_cmd, const char *substr)
444 free(fname); 444 free(fname);
445 break; 445 break;
446 } 446 }
447 /* Ignore case (gnu exension) */ 447 /* Ignore case (gnu extension) */
448 case 'i': 448 case 'i':
449 case 'I': 449 case 'I':
450 cflags |= REG_ICASE; 450 cflags |= REG_ICASE;
@@ -587,7 +587,7 @@ static const char *parse_cmd_args(sed_cmd_t *sed_cmd, const char *cmdstr)
587 free(match); 587 free(match);
588 free(replace); 588 free(replace);
589 } 589 }
590 /* if it wasnt a single-letter command that takes no arguments 590 /* if it wasn't a single-letter command that takes no arguments
591 * then it must be an invalid command. 591 * then it must be an invalid command.
592 */ 592 */
593 else if (idx >= IDX_nul) { /* not d,D,g,G,h,H,l,n,N,p,P,q,x,=,{,} */ 593 else if (idx >= IDX_nul) { /* not d,D,g,G,h,H,l,n,N,p,P,q,x,=,{,} */
@@ -751,7 +751,7 @@ static void do_subst_w_backrefs(char *line, char *replace)
751 continue; 751 continue;
752 } 752 }
753 /* I _think_ it is impossible to get '\' to be 753 /* I _think_ it is impossible to get '\' to be
754 * the last char in replace string. Thus we dont check 754 * the last char in replace string. Thus we don't check
755 * for replace[i] == NUL. (counterexample anyone?) */ 755 * for replace[i] == NUL. (counterexample anyone?) */
756 /* if we find a backslash escaped character, print the character */ 756 /* if we find a backslash escaped character, print the character */
757 pipe_putc(replace[i]); 757 pipe_putc(replace[i]);