+ /*
+ Now, having sought to the desired starting spot, if a /FIND:
+ target was specified, look for it now.
+ */
+ if (seek_target) {
+ int flag = 0, ispat = 0, matchresult = 0;
+ while (!flag) {
+ y = z_in(n,line,LINBUFSIZ,LINBUFSIZ-1,0);
+ if (y < 0) {
+ y = 0;
+ break;
+ }
+ if (ispattern(seek_target)) {
+ matchresult = ckmatch(seek_target,line,inpcas[cmdlvl],1+4);
+ } else {
+ /* This is faster */
+ matchresult = ckindex(seek_target,line,0,0,inpcas[cmdlvl]);
+ }
+ if (matchresult) {
+ flag = 1;
+ break;
+ }
+ }
+ if (flag) {
+ debug(F111,"FSEEK HAVE MATCH",seek_target,z_getline(n));
+ /* Back up to beginning of line where target found */
+ if ((y = z_line(n,z_getline(n)-1)) < 0) {
+ if (rc == FX_EOF) return(success = 0);
+ printf("?SEEK /LINE failed - Channel %d: %s\n",
+ n,ckferror(rc));
+ return(-9);
+ }
+ debug(F101,"FSEEK LINE","",y);
+ }
+ }
+ return(success = (y < 0) ? 0 : 1);