summaryrefslogtreecommitdiff
path: root/sv_append_till
diff options
context:
space:
mode:
Diffstat (limited to 'sv_append_till')
-rw-r--r--sv_append_till39
1 files changed, 0 insertions, 39 deletions
diff --git a/sv_append_till b/sv_append_till
deleted file mode 100644
index c2299ea692..0000000000
--- a/sv_append_till
+++ /dev/null
@@ -1,39 +0,0 @@
-char *
-sv_append_till(sv,from,fromend,delim,keeplist)
-register SV *sv;
-register char *from;
-register char *fromend;
-register I32 delim;
-char *keeplist;
-{
- register char *to;
- register STRLEN len;
-
- if (SvREADONLY(sv))
- fatal(no_modify);
- if (!from)
- return Nullch;
- len = fromend - from;
- if (!SvUPGRADE(sv, SVt_PV))
- return 0;
- SvGROW(sv, SvCUR(sv) + len + 1);
- SvPOK_only(sv); /* validate pointer */
- to = SvPV(sv)+SvCUR(sv);
- for (; from < fromend; from++,to++) {
- if (*from == '\\' && from+1 < fromend && delim != '\\') {
- if (!keeplist)
- *to++ = *from++;
- else if (from[1] && index(keeplist,from[1]))
- *to++ = *from++;
- else
- from++;
- }
- else if (*from == delim)
- break;
- *to = *from;
- }
- *to = '\0';
- SvCUR_set(sv, to - SvPV(sv));
- return from;
-}
-