/[man-db]/man-db/src/lexgrog.l
ViewVC logotype

Diff of /man-db/src/lexgrog.l

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

revision 1.34 by cjwatson, Fri Aug 15 17:05:57 2003 UTC revision 1.35 by cjwatson, Sat Aug 16 13:08:04 2003 UTC
# Line 381  int find_name (const char *file, const c Line 381  int find_name (const char *file, const c
381                  yyin = fdopen (dup (0), "r");                  yyin = fdopen (dup (0), "r");
382          } else {          } else {
383  #ifdef COMP_SRC  #ifdef COMP_SRC
384                    struct compression *comp;
385    #endif /* COMP_SRC */
386                    struct stat st;
387    
388                    if (stat (file, &st)) {
389                            error (0, errno, "%s", file);
390                            return 0;
391                    }
392    
393                    if (S_ISDIR (st.st_mode)) {
394                            error (0, EISDIR, "%s", file);
395                            return 0;
396                    }
397    
398    #ifdef COMP_SRC
399                  /* See if we need to decompress the file(s) first. */                  /* See if we need to decompress the file(s) first. */
400                  struct compression *comp = comp_info (file);                  comp = comp_info (file);
401                  if (comp) {                  if (comp) {
402                          file = decompress (file, comp);                          file = decompress (file, comp);
403                          if (!file)                          if (!file)
404                                  return 0;                                  return 0;
405                  }                  }
406  #endif  #endif /* COMP_SRC */
407                  drop_effective_privs ();                  drop_effective_privs ();
408                  yyin = fopen (file, "r");                  yyin = fopen (file, "r");
409                  regain_effective_privs ();                  regain_effective_privs ();
# Line 396  int find_name (const char *file, const c Line 411  int find_name (const char *file, const c
411                          error (0, errno, _("can't open %s"), file);                          error (0, errno, _("can't open %s"), file);
412  #ifdef COMP_SRC  #ifdef COMP_SRC
413                          remove_ztemp ();                          remove_ztemp ();
414  #endif  #endif /* COMP_SRC */
415                          return 0;                          return 0;
416                  }                  }
417          }          }

Legend:
Removed from v.1.34  
changed lines
  Added in v.1.35

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