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

Diff for /src/usr.bin/patch/patch.c between version 1.71 and 1.72

version 1.71, 2022/08/03 07:30:37 version 1.72, 2023/07/12 11:26:13
Line 99 
Line 99 
 static void     spew_output(void);  static void     spew_output(void);
 static void     dump_line(LINENUM, bool);  static void     dump_line(LINENUM, bool);
 static bool     patch_match(LINENUM, LINENUM, LINENUM);  static bool     patch_match(LINENUM, LINENUM, LINENUM);
 static bool     similar(const char *, const char *, int);  static bool     similar(const char *, const char *, ssize_t);
 static __dead void usage(void);  static __dead void usage(void);
   
 /* true if -E was specified on command line.  */  /* true if -E was specified on command line.  */
Line 1012 
Line 1012 
         LINENUM         pat_lines = pch_ptrn_lines() - fuzz;          LINENUM         pat_lines = pch_ptrn_lines() - fuzz;
         const char      *ilineptr;          const char      *ilineptr;
         const char      *plineptr;          const char      *plineptr;
         short           plinelen;          ssize_t         plinelen;
   
         for (iline = base + offset + fuzz; pline <= pat_lines; pline++, iline++) {          for (iline = base + offset + fuzz; pline <= pat_lines; pline++, iline++) {
                 ilineptr = ifetch(iline, offset >= 0);                  ilineptr = ifetch(iline, offset >= 0);
Line 1048 
Line 1048 
  * Do two lines match with canonicalized white space?   * Do two lines match with canonicalized white space?
  */   */
 static bool  static bool
 similar(const char *a, const char *b, int len)  similar(const char *a, const char *b, ssize_t len)
 {  {
         while (len) {          while (len) {
                 if (isspace((unsigned char)*b)) { /* whitespace (or \n) to match? */                  if (isspace((unsigned char)*b)) { /* whitespace (or \n) to match? */

Legend:
Removed from v.1.71  
changed lines
  Added in v.1.72