Lines Matching refs:sptr

1747 	char *sptr, *pb, *q;  in sub()  local
1767 sptr = t; in sub()
1768 adjbuf(&buf, &bufsz, 1+patbeg-sptr, recsize, 0, "sub"); in sub()
1770 while (sptr < patbeg) in sub()
1771 *pb++ = *sptr++; in sub()
1772 sptr = getsval(y); in sub()
1773 while (*sptr != 0) { in sub()
1775 if (*sptr == '\\') { in sub()
1776 backsub(&pb, &sptr); in sub()
1777 } else if (*sptr == '&') { in sub()
1778 sptr++; in sub()
1783 *pb++ = *sptr++; in sub()
1788 sptr = patbeg + patlen; in sub()
1789 if ((patlen == 0 && *patbeg) || (patlen && *(sptr-1))) { in sub()
1790 adjbuf(&buf, &bufsz, 1+strlen(sptr)+pb-buf, 0, &pb, "sub"); in sub()
1791 while ((*pb++ = *sptr++) != 0) in sub()
1808 char *rptr, *sptr, *t, *pb, *q; in gsub() local
1837 sptr = rptr; in gsub()
1838 while (*sptr != 0) { in gsub()
1840 if (*sptr == '\\') { in gsub()
1841 backsub(&pb, &sptr); in gsub()
1842 } else if (*sptr == '&') { in gsub()
1843 sptr++; in gsub()
1848 *pb++ = *sptr++; in gsub()
1861 sptr = t; in gsub()
1862 adjbuf(&buf, &bufsz, 1+(patbeg-sptr)+pb-buf, recsize, &pb, "gsub"); in gsub()
1863 while (sptr < patbeg) in gsub()
1864 *pb++ = *sptr++; in gsub()
1865 sptr = rptr; in gsub()
1866 while (*sptr != 0) { in gsub()
1868 if (*sptr == '\\') { in gsub()
1869 backsub(&pb, &sptr); in gsub()
1870 } else if (*sptr == '&') { in gsub()
1871 sptr++; in gsub()
1876 *pb++ = *sptr++; in gsub()
1886 sptr = t; in gsub()
1887 adjbuf(&buf, &bufsz, 1+strlen(sptr)+pb-buf, 0, &pb, "gsub"); in gsub()
1888 while ((*pb++ = *sptr++) != 0) in gsub()
1907 char *pb = *pb_ptr, *sptr = *sptr_ptr; in backsub() local
1909 if (sptr[1] == '\\') { in backsub()
1910 if (sptr[2] == '\\' && sptr[3] == '&') { /* \\\& -> \& */ in backsub()
1913 sptr += 4; in backsub()
1914 } else if (sptr[2] == '&') { /* \\& -> \ + matched */ in backsub()
1916 sptr += 2; in backsub()
1918 *pb++ = *sptr++; in backsub()
1919 *pb++ = *sptr++; in backsub()
1921 } else if (sptr[1] == '&') { /* literal & */ in backsub()
1922 sptr++; in backsub()
1923 *pb++ = *sptr++; in backsub()
1925 *pb++ = *sptr++; in backsub()
1928 *sptr_ptr = sptr; in backsub()