Skip to content
Snippets Groups Projects
main.c 118 KiB
Newer Older
  • Learn to ignore specific revisions
  •   struct stat st_buf;
      char fname[PATH_MAX];
    
      strcpy (fname, file_name);
      base = basename (fname);
      if (((stat(base, &st_buf)) == 0) && (S_ISCHR(st_buf.st_mode))) {
        size_t blen = strlen (base);
    
        /* Prepend a '_'.  */
        memmove (base + 1, base, blen + 1);
        base[0] = '_';
        strcpy (file_name, fname);
      }
      return file_name;
    }
    
    #endif /* __DJGPP__ */