patch-FileNom_c 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. $OpenBSD: patch-FileNom_c,v 1.1 2001/04/17 13:13:26 naddy Exp $
  2. --- FileNom.c.orig Thu May 4 18:15:11 1995
  3. +++ FileNom.c Tue Apr 17 14:30:50 2001
  4. @@ -822,20 +822,20 @@ FillWindow(fnw)
  5. Dimension height, internalHeight, rowSpacing;
  6. int num, newNum, idx;
  7. struct dirent **namelist;
  8. - #ifndef HAVE_DIR
  9. +#ifndef HAVE_DIR
  10. DIR *dirp;
  11. struct dirent *direntp;
  12. int direntp_size;
  13. - #else
  14. +#else
  15. extern int alphasort();
  16. - #endif
  17. +#endif
  18. char buf[MAXPATHLEN], *bp;
  19. String name;
  20. struct stat fstats;
  21. unsigned int namlen;
  22. - #ifdef HAVE_DIR
  23. +#ifdef HAVE_DIR
  24. num = scandir(CurrentDir(fnw), &namelist, (int(*)())0, alphasort);
  25. - #else
  26. +#else
  27. /* Read the directory `CurrentDir(fnw)'
  28. and set the `dirent's in `namelist'. */
  29. dirp = opendir( CurrentDir(fnw) );
  30. @@ -860,7 +860,7 @@ FillWindow(fnw)
  31. /* Sort the directory entries in `namelist'. */
  32. qsort( namelist, num, sizeof(struct dirent*), direntpcmp );
  33. - #endif
  34. +#endif
  35. if (num <= 0)
  36. {