11 Commits
Author SHA1 Message Date
David Seifert 7afa5c6242 Make C99 clean
* Clang 16 (and likely GCC 14) will enforce strict C99 semantics
  and break old K&R C declarations and require correct C89
  function prototypes.

Bug: https://bugs.gentoo.org/870952
Clang: https://discourse.llvm.org/t/configure-script-breakage-with-the-new-werror-implicit-function-declaration/65213/9
2022-10-27 11:08:49 -07:00
Orc db1d037afa Merge pull request #229 from oridb/master
notspecial: do a positive check. (fixes plan9, improves others)
2020-10-26 09:10:15 -07:00
Ori Bernstein 8320d8eb69 notspecial: do a positive check. (fixes plan9, improves others)
Currently, notspecial() checks for a list of special types of
file, instead of checking if the file is regular. It seems like
checking for what we want is likely to be more useful than
checking for things we want to avoid -- especially since the
list of special things is far more likely to grow.
2020-09-07 01:42:45 +00:00
david parsons 35aa1494b3 typoed the #if for notspecial; did a couple check for HAS_ISSOCK instead of HAS_ISFIFO && HAS_ISSOCK 2018-02-27 09:33:59 -08:00
david parsons 6fd16317fd check for the existance of S_ISSOCK, S_ISCHR, and S_ISFIFO before trying to use them in notspecial.c 2018-02-27 09:08:07 -08:00
david parsons 59cb62d7f5 Tweak the debug program inside notspecial so that it checks every filename passed on the command line. 2017-02-05 18:03:12 -08:00
david parsons 4d4c78f6e2 I'd forgotten how the whole business of the file type masks worked in the
stat structure, so I had to replace everything with calls to the S_ISxxx()
functions.   And I wrote debug scaffolding (compile with -DDEBUG to make
a little program that says whether its argument is special or not) so I could
figure out what's going on.
2017-02-05 01:17:41 -08:00
david parsons 0e94c0d422 Use st_mode, NOT st_flags 2017-02-05 00:49:39 -08:00
david parsons 0848a5cdbb Change the header comment to reflect what notspecial() actually does in a non-stat()ed environment. 2017-02-05 00:22:21 -08:00
david parsons dfa77baba7 (the return from notspecial() was reversed) 2017-02-04 23:56:46 -08:00
david parsons 903a76ef84 Utility function for theme & mkd2html -- check a filename to see if it's
a special file that doesn't need to be deleted or to have a .html suffix
added to it.   It only works on machines that have a stat() system call,
otherwise it thinks that nothing is special.
2017-02-04 23:55:35 -08:00