/[mc]/mc/src/ext.c
ViewVC logotype

Diff of /mc/src/ext.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.56 by proskin, Sun Jun 22 09:17:46 2003 UTC revision 1.57 by proskin, Wed Jun 25 06:32:46 2003 UTC
# Line 56  flush_extension_file (void) Line 56  flush_extension_file (void)
56          g_free (data);          g_free (data);
57          data = NULL;          data = NULL;
58      }      }
   
59  }  }
60    
61  typedef char *(*quote_func_t) (const char *name, int i);  typedef char *(*quote_func_t) (const char *name, int i);
# Line 417  regex_check_type (char *filename, int fi Line 416  regex_check_type (char *filename, int fi
416              if ((pp = strchr (content_string, '\n')) != 0)              if ((pp = strchr (content_string, '\n')) != 0)
417                  *pp = 0;                  *pp = 0;
418    
419              if (islocal && !strncmp (content_string, filename, file_len)) {              if (islocal) {
420                  /* Skip "filename: " */                  if (!strncmp (content_string, filename, file_len)) {
421                  content_shift = file_len;                      /* Skip "filename: " */
422                  if (content_string[content_shift] == ':')                      content_shift = file_len;
423                      for (content_shift++;                      if (content_string[content_shift] == ':') {
424                            content_shift++;
425                            /* Solaris' file prints tab after ':' */
426                            for (content_shift++;
427                                 content_string[content_shift] == ' '
428                                 || content_string[content_shift] == '\t';
429                                 content_shift++);
430                        }
431                    }
432                } else {
433                    if (!strncmp (content_string, "standard input:", 15)) {
434                        /* Skip "standard input: " */
435                        for (content_shift = 15;
436                           content_string[content_shift] == ' ';                           content_string[content_shift] == ' ';
437                           content_shift++);                           content_shift++);
438              } else if (!islocal                  } else if (!strncmp (content_string, "/dev/stdin:", 11)) {
439                         && !strncmp (content_string, "standard input:",                      /* Skip "/dev/stdin: " */
440                                      15)) {                      for (content_shift = 11;
441                  /* Skip "standard input: " */                           content_string[content_shift] == ' ';
442                  for (content_shift = 15;                           content_shift++);
443                       content_string[content_shift] == ' ';                  }
                      content_shift++);  
             } else if (!islocal  
                        && !strncmp (content_string, "/dev/stdin:",  
                                     11)) {  
                 /* Skip "/dev/stdin: " */  
                 for (content_shift = 11;  
                      content_string[content_shift] == ' ';  
                      content_shift++);  
444              }              }
445          } else {          } else {
446              /* No data */              /* No data */
# Line 449  regex_check_type (char *filename, int fi Line 452  regex_check_type (char *filename, int fi
452          return -1;          return -1;
453      }      }
454    
455      if (content_string && content_string[0]      if (content_string[0]
456          && regexp_match (ptr, content_string + content_shift,          && regexp_match (ptr, content_string + content_shift, match_regex)) {
                          match_regex)) {  
457          found = 1;          found = 1;
458      }      }
459    

Legend:
Removed from v.1.56  
changed lines
  Added in v.1.57

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26