[BACK]Return to tags.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / mg

Diff for /src/usr.bin/mg/tags.c between version 1.14 and 1.15

version 1.14, 2016/09/01 10:01:53 version 1.15, 2017/05/30 07:05:22
Line 402 
Line 402 
  * Search through each line of buffer for pattern.   * Search through each line of buffer for pattern.
  */   */
 int  int
 searchpat(char *pat)  searchpat(char *s_pat)
 {  {
         struct line *lp;          struct line *lp;
         int dotline;          int dotline;
         size_t plen;          size_t plen;
   
         plen = strlen(pat);          plen = strlen(s_pat);
         dotline = 1;          dotline = 1;
         lp = lforw(curbp->b_headp);          lp = lforw(curbp->b_headp);
         while (lp != curbp->b_headp) {          while (lp != curbp->b_headp) {
                 if (ltext(lp) != NULL && plen <= llength(lp) &&                  if (ltext(lp) != NULL && plen <= llength(lp) &&
                     (strncmp(pat, ltext(lp), plen) == 0)) {                      (strncmp(s_pat, ltext(lp), plen) == 0)) {
                         curwp->w_doto = 0;                          curwp->w_doto = 0;
                         curwp->w_dotp = lp;                          curwp->w_dotp = lp;
                         curwp->w_dotline = dotline;                          curwp->w_dotline = dotline;

Legend:
Removed from v.1.14  
changed lines
  Added in v.1.15