Ticket #2111: allow pause in copy/move/delete file operation.
[midnight-commander.git] / maint / headers.txt
blob2b73119c98422b77085fdf56484e7b12e5478148
1 This file documents some conventions for sorting system header files in
2 the #include section.
4 1. #include <config.h> unconditionally
6 2. if there are any headers containing "alloca" in the name, include
7    them here. Some systems need them as the first header.
9 3. #include the Standard C Library headers, sorted alphabetically
11    (assert, ctype, errno, float, limits, locale, math, setjmp, signal,
12    stdarg, stddef, stdio, stdlib, string, time)
14 4. #include the POSIX headers, in the following order
16    <sys/types.h>                Needed by many other headers.
17    <sys/*.h>
18    <*.h>
20    For every POSIX function you use, make sure that the order of the
21    headers is the same as in the according manpage.
22    
23 5. #include other external headers
25 6. #include "../src/global.h"
27    This file contains lots of compatibility stuff that is used
28    throughout the whole mc. All mc header files rely on this file to be
29    included before them.
31 7. #include Midnight Commander headers
33    Currently, not all headers can be ordered arbitrarily, so try it out.
36 ==== Headers that may be included unconditionally ====
38 All ISO C90 headers.
40 <sys/types.h>
41 <sys/stat.h>
42 <unistd.h>
43 <fcntl.h>
45 ==== Headers that need autoconf guards ====
47 <termios.h>
48 <sys/ioctl.h>