- if (!any("htrqxe", c)) {
- if (gmodflag && c == '\n')
+ /* scan s// [eichin:19910926.0512EST] */
+ if (c == 's') {
+ int delimcnt = 2;
+ int delim = getC(0);
+ *np++ = delim;
+
+ if (!delim || letter(delim)
+ || Isdigit(delim) || any(" \t\n", delim)) {
+ seterror(ERR_BADSUBST);
+ break;
+ }
+ while ((c = getC(0)) != (-1)) {
+ *np++ = c;
+ if(c == delim) delimcnt--;
+ if(!delimcnt) break;
+ }
+ if(delimcnt) {
+ seterror(ERR_BADSUBST);
+ break;
+ }
+ c = 's';
+ }
+ if (!any("htrqxes", c)) {
+ if ((amodflag || gmodflag) && c == '\n')