diff options
-rw-r--r-- | Makefile | 11 | ||||
-rw-r--r-- | control | 2 | ||||
-rwxr-xr-x | deheader | 220 |
3 files changed, 118 insertions, 115 deletions
@@ -14,16 +14,19 @@ deheader.html: deheader.xml xmlto html-nochunks deheader.xml clean: - rm -f *~ *.1 *.html test/*.o test/*~ MANIFEST SHIPPER.* + rm -f *~ *.1 *.html test/*.o test/*~ MANIFEST regress: cd test; make --quiet regress makeregress: cd test; make --quiet makeregress -PYLINTOPTS = --rcfile=/dev/null --reports=n --include-ids=y --disable="C0103,C0111,C0301,C0302,C0323,R0903,R0912,R0913,R0914,R0915,W0141,W0611,W0621" +PYLINTOPTS = --rcfile=/dev/null --reports=n \ + --msg-template="{path}:{line}: [{msg_id}({symbol}), {obj}] {msg}" \ + --dummy-variables-rgx='^_' +SUPPRESSIONS = --disable="C0103,C0111,C0301,C0302,C0323,C1001,R0903,R0912,R0913,R0914,R0915,W0110,W0141,W0611,W0621" pylint: - @pylint --output-format=parseable $(PYLINTOPTS) deheader + @pylint $(PYLINTOPTS) $(SUPPRESSIONS) deheader version: @echo $(VERS) @@ -38,4 +41,4 @@ deheader-$(VERS).tar.gz: $(SOURCES) dist: deheader-$(VERS).tar.gz release: deheader-$(VERS).tar.gz deheader.html - shipper -u -m -t; make clean + shipper version=$(VERS) | sh -e -x @@ -13,7 +13,7 @@ XBS-Destinations: freecode Homepage: http://www.catb.org/~esr/deheader -XBS-HTML-Targetindex.html +XBS-HTML-Target: index.html Gitorious-URL: https://gitorious.org/deheader @@ -43,18 +43,18 @@ version = "0.8" # because they're required in order to satify dependencies on other platforms. requirements = ( # Headers mandated by SuS Version 2 System Interfaces. - # a64l, l64a - convert between a 32-bit integer and a radix-64 ASCII string + # a64l, l64a - convert between a 32-bit integer and a radix-64 ASCII string (r"a64l()", ["<stdlib.h>"]), (r"l64a()", ["<stdlib.h>"]), - # abort - generate an abnormal process abort + # abort - generate an abnormal process abort (r"abort()", ["<stdlib.h>"]), - # abs - return an integer absolute value + # abs - return an integer absolute value (r"abs()", ["<stdlib.h>"]), # access - determine accessibility of a file (r"access()", ["<unistd.h>"]), - # acos - arc cosine function + # acos - arc cosine function (r"acos()", ["<math.h>"]), - # acosh, asinh, atanh - inverse hyperbolic functions + # acosh, asinh, atanh - inverse hyperbolic functions (r"acosh()", ["<math.h>"]), (r"asinh()", ["<math.h>"]), (r"atanh()", ["<math.h>"]), @@ -71,55 +71,55 @@ requirements = ( (r"lio_listio()", ["<aio.h>"]), # alarm - schedule an alarm signal (r"alarm()", ["<unistd.h>"]), - # asctime, asctime_r - convert date and time to a string + # asctime, asctime_r - convert date and time to a string (r"asctime()", ["<time.h>"]), (r"asctime_r()", ["<time.h>"]), - # asin - arc sine function + # asin - arc sine function (r"asin()", ["<math.h>"]), - # atan - arc tangent function + # atan - arc tangent function (r"atan()", ["<math.h>"]), - # atan2 - arc tangent function + # atan2 - arc tangent function (r"atanh()", ["<math.h>"]), # atanh - hyperbolic arc tangent (r"atan2()", ["<math.h>"]), # atexit - register a function to run at process termination (r"atexit()", ["<stdlib.h>"]), - # atof - convert a string to double-precision number + # atof - convert a string to double-precision number (r"atof()", ["<stdlib.h>"]), - # atoi - convert a string to integer + # atoi - convert a string to integer (r"atol()", ["<stdlib.h>"]), # atol - convert a string to long integer (r"atol()", ["<stdlib.h>"]), - # basename - return the last component of a pathname + # basename - return the last component of a pathname (r"basename()", ["<libgen.h>"]), - # bcmp - memory operations + # bcmp - memory operations (r"bcmp()", ["<strings.h>"]), - # bcopy - memory operations + # bcopy - memory operations (r"bcopy()", ["<strings.h>"]), - # brk, sbrk - change space allocation (LEGACY) + # brk, sbrk - change space allocation (LEGACY) (r"brk()", ["<unistd.h>"]), (r"sbrk()", ["<unistd.h>"]), - # bsearch - binary search a sorted table + # bsearch - binary search a sorted table (r"bsort()", ["<stdlib.h>"]), - # btowc - single-byte to wide-character conversion + # btowc - single-byte to wide-character conversion (r"btowc()", ["<stdio.h>", "<wchar.h>"]), - # bzero - memory operations + # bzero - memory operations (r"bzero()", ["<strings.h>"]), # calloc - a memory allocator (r"calloc()", ["<stdlib.h>"]), - # catclose - close a message catalogue descriptor + # catclose - close a message catalogue descriptor (r"catclose()", ["<nl_types.h>"]), - # catgets - read a program message + # catgets - read a program message (r"catgets()", ["<nl_types.h>"]), - # catopen - open a message catalogue + # catopen - open a message catalogue (r"catopen()", ["<nl_types.h>"]), - # cbrt - cube root function + # cbrt - cube root function (r"cbrt()", ["<math.h>"]), # ceil - ceiling value function (r"ceil()", ["<math.h>"]), - # chdir - change working directory + # chdir - change working directory (r"chdir()", ["<unistd.h>"]), - # chmod - change mode of a file + # chmod - change mode of a file (r"chmod()", ["<sys/stat.h>", "<sys/types.h>"]), # chown - change owner and group of a file (r"chown()", ["<sys/types.h>", "<unistd.h>"]), @@ -127,30 +127,30 @@ requirements = ( (r"chroot()", ["<unistd.h>"]), # clearerr - clear indicators on a stream (r"clearerr()", ["<stdio.h>"]), - # clock - report CPU time used + # clock - report CPU time used (r"clock()", ["<time.h>"]), # clock_settime, clock_gettime, clock_getres - clock and timer functions (r"clock_settime()", ["<time.h>"]), (r"clock_gettime()", ["<time.h>"]), (r"clock_getres()", ["<time.h>"]), - # close - close a file descriptor + # close - close a file descriptor (r"close()", ["<unistd.h>"]), # closedir - close a directory stream (r"closedir()", ["<sys/types.h>", "<dirent.h>"]), - # closelog, openlog, setlogmask, syslog - control system log + # closelog, openlog, setlogmask, syslog - control system log (r"closelog()", ["<syslog.h>"]), (r"openlog()", ["<syslog.h>"]), (r"setlogmask()", ["<syslog.h>"]), (r"syslog()", ["<syslog.h>"]), # compile - produce a compiled regular expression (r"compile()", ["<regexp.h>"]), - # confstr - get configurable variables + # confstr - get configurable variables (r"confstr()", ["<unistd.h>"]), - # cos - cosine function + # cos - cosine function (r"cos()", ["<math.h>"]), # cosh - hyperbolic cosine function (r"cosh()", ["<math.h>"]), - # creat - create a new file or rewrite an existing one + # creat - create a new file or rewrite an existing one (r"creat()", ["<sys/types.h>", "<sys/stat.h>", "<fcntl.h>"]), # crypt - string encoding function (r"crypt()", ["<unistd.h>"]), @@ -181,7 +181,7 @@ requirements = ( (r"cuserid()", ["<stdio.h>"]), # daylight - daylight savings time flag (r"extern\s+int\s+daylight;", ["<time.h>"]), - # dbm_clearerr, dbm_close, dbm_delete, dbm_error, dbm_fetch, dbm_firstkey, dbm_nextkey, dbm_open, dbm_store - database functions + # dbm_clearerr, dbm_close, dbm_delete, dbm_error, dbm_fetch, dbm_firstkey, dbm_nextkey, dbm_open, dbm_store - database functions (r"dbm_clearerr()", ["<ndbm.h>"]), (r"dbm_close()", ["<ndbm.h>"]), (r"dbm_delete()", ["<ndbm.h>"]), @@ -195,13 +195,13 @@ requirements = ( (r"difftime()", ["<time.h>"]), # dirname - report the parent directory name of a file pathname (r"dirname()", ["<libgen.h>"]), - # div - compute the quotient and remainder of an integer division + # div - compute the quotient and remainder of an integer division (r"div()", ["<stdio.h>"]), # dlclose - close a dlopen() object (r"dlclose()", ["<dlfcn.h>"]), # dlerror - get diagnostic information (r"dlerror()", ["<dlfcn.h>"]), - # dlsym - obtain the address of a symbol from a dlopen() object + # dlsym - obtain the address of a symbol from a dlopen() object (r"dlsym()", ["<dlfcn.h>"]), # drand48, erand48, jrand48, lcong48, lrand48, mrand48, nrand48, seed48, srand48 - generate uniformly distributed pseudo-random numbers (r"drand48()", ["<stdlib.h>"]), @@ -216,16 +216,16 @@ requirements = ( # dup, dup2 - duplicate an open file descriptor (r"dup()", ["<unistd.h>"]), (r"dup2()", ["<unistd.h>"]), - # exit, _exit - terminate a process - (r"exit()", ["<stdlib.h>"]), + # exit, _exit - terminate a process + (r"exit()", ["<stdlib.h>"]), (r"_exit()", ["<unistd.h>"]), # ecvt, fcvt, gcvt - convert a floating-point number to a string - (r"ecvt()", ["<stdlib.h>"]), - (r"fcvt()", ["<stdlib.h>"]), + (r"ecvt()", ["<stdlib.h>"]), + (r"fcvt()", ["<stdlib.h>"]), (r"gcvt()", ["<stdlib.h>"]), # encrypt - encoding function (r"encrypt()", ["<unistd.h>"]), - # endgrent, getgrent, setgrent - group database entry functions + # endgrent, getgrent, setgrent - group database entry functions (r"endgrent()", ["<grp.h>"]), (r"getgrent()", ["<grp.h>"]), (r"setgrent()", ["<grp.h>"]), @@ -241,7 +241,7 @@ requirements = ( (r"getpwuid()", ["<pwd.h>"]), (r"getpwnam_r()", ["<pwd.h>"]), (r"getpwuid_r()", ["<pwd.h>"]), - # endutxent, getutxent, getutxid, getutxline, pututxline, setutxent - user accounting database functions + # endutxent, getutxent, getutxid, getutxline, pututxline, setutxent - user accounting database functions (r"endutxent()", ["<utmpx.h>"]), (r"getutxent()", ["<utmpx.h>"]), (r"getutxid()", ["<utmpx.h>"]), @@ -261,7 +261,7 @@ requirements = ( (r"execvp()", ["<unistd.h>"]), # exp - exponential function (r"exp()", ["<math.h>"]), - # expm1 - compute exponential functions + # expm1 - compute exponential functions (r"expm1()", ["<math.h>"]), # FD_CLR - macros for synchronous I/O multiplexing (r"FD_CLR()", ["<sys/time.h>"]), @@ -270,9 +270,9 @@ requirements = ( (r"FD_ZERO()", ["<sys/time.h>"]), # fabs - absolute value function (r"fabs()", ["<math.h>"]), - # fattach - attach a STREAMS-based file descriptor to a file in the file system name space + # fattach - attach a STREAMS-based file descriptor to a file in the file system name space (r"fattach()", ["<stropts.h>"]), - # fchdir - change working directory + # fchdir - change working directory (r"fchdir()", ["<unistd.h>"]), # fchmod - change mode of a file (r"fchmod()", ["<sys/stat.h>"]), @@ -284,15 +284,15 @@ requirements = ( (r"fclose()", ["<stdio.h>"]), # fdatasync - synchronise the data of a file (r"fdatasync()", ["<unistd.h>"]), - # fdetach - detach a name from a STREAMS-based file descriptor + # fdetach - detach a name from a STREAMS-based file descriptor (r"fdetach()", ["<stropts.h>"]), - # fdopen - associate a stream with a file descriptor + # fdopen - associate a stream with a file descriptor (r"fdopen()", ["<stdio.h>"]), # ferror - test error indicator on a stream (r"ferror()", ["<stdio.h>"]), # feof - test end-of-file indicator on a stream (r"feof()", ["<stdio.h>"]), - # fflush - flush a stream + # fflush - flush a stream (r"fflush()", ["<stdio.h>"]), # ffs - find first set bit (r"ffs()", ["<strings.h>"]), @@ -304,15 +304,15 @@ requirements = ( (r"fgets()", ["<stdio.h>"]), # fgetwc - get a wide-character code from a stream (r"fgetwc()", ["<stdio.h>", "<wchar.h>"]), - # fgetws - get a wide-character string from a stream + # fgetws - get a wide-character string from a stream (r"fgetws()", ["<stdio.h>", "<wchar.h>"]), # fileno - map a stream pointer to a file descriptor (r"fileno()", ["<stdio.h>"]), - # flockfile, ftrylockfile, funlockfile - stdio locking functions + # flockfile, ftrylockfile, funlockfile - stdio locking functions (r"flockfile()", ["<stdio.h>"]), (r"ftrylockfile()", ["<stdio.h>"]), (r"funlockfile()", ["<stdio.h>"]), - # fmod - floating-point remainder value function + # fmod - floating-point remainder value function (r"fmod()", ["<math.h>"]), # fmtmsg.h - message display structures (r"fmtmsg()", ["<fmtmsg.h>"]), @@ -322,7 +322,7 @@ requirements = ( (r"fopen()", ["<stdio.h>"]), # fork - create a new process (r"fork()", ["<sys/types.h>", "<unistd.h>"]), - # fpathconf, pathconf - get configurable pathname variables + # fpathconf, pathconf - get configurable pathname variables (r"fpathconf()", ["<unistd.h>"]), (r"pathconf()", ["<unistd.h>"]), # fputc - put a byte on a stream @@ -362,12 +362,12 @@ requirements = ( (r"ftello()", ["<stdio.h>"]), # ftime - get date and time (r"ftime()", ["<sys/timeb.h>"]), - # ftok - generate an IPC key + # ftok - generate an IPC key (r"ftok()", ["<sys/ipc.h>"]), - # ftruncate, truncate - truncate a file to a specified length + # ftruncate, truncate - truncate a file to a specified length (r"truncate()", ["<unistd.h>"]), (r"ftruncate()", ["<unistd.h>"]), - # ftw - traverse (walk) a file tree + # ftw - traverse (walk) a file tree (r"ftw()", ["<ftw.h>"]), (r"nftw()", ["<ftw.h>"]), # fwide - set stream orientation @@ -386,7 +386,7 @@ requirements = ( (r"gamma()", ["<math.h>"]), # getc - get a byte from a stream (r"getc()", ["<stdio.h>"]), - # getc_unlocked, getchar_unlocked, putc_unlocked, putchar_unlocked - stdio with explicit client locking + # getc_unlocked, getchar_unlocked, putc_unlocked, putchar_unlocked - stdio with explicit client locking (r"getc_unlocked()", ["<stdio.h>"]), (r"getchar_unlocked()", ["<stdio.h>"]), (r"putc_unlocked()", ["<stdio.h>"]), @@ -396,7 +396,7 @@ requirements = ( # getcontext, setcontext - get and set current user context (r"getcontext()", ["<ucontext.h>"]), (r"setcontext()", ["<ucontext.h>"]), - # getcwd - get the pathname of the current working directory + # getcwd - get the pathname of the current working directory (r"getcwd()", ["<unistd.h>"]), # getdate - convert user format date and time (r"getdate()", ["<time.h>"]), @@ -404,7 +404,7 @@ requirements = ( (r"getdtablesize()", ["<unistd.h>"]), # getegid - get the effective group ID (r"getegid()", ["<unistd.h>", "<sys/types.h>"]), - # getenv - get value of an environment variable + # getenv - get value of an environment variable (r"getenv()", ["<stdlib.h>"]), # geteuid - get the effective user ID (r"geteuid()", ["<unistd.h>", "<sys/types.h>"]), @@ -413,7 +413,7 @@ requirements = ( # getgrgid, getgrgid_r - get group database entry for a group ID (r"getgrgid()", ["<sys/types.h>", "<grp.h>"]), (r"getgrgid_r()", ["<sys/types.h>", "<grp.h>"]), - # getgrnam, getgrnam_r - search group database for a name + # getgrnam, getgrnam_r - search group database for a name (r"getgrnam()", ["<sys/types.h>", "<pwd.h>"]), (r"getgrnam_r()", ["<sys/types.h>", "<pwd.h>"]), # getgroups - get supplementary group IDs @@ -426,7 +426,7 @@ requirements = ( # getlogin, getlogin_r - get login name (r"getlogin()", ["<unistd.h>"]), (r"getlogin_r()", ["<unistd.h>"]), - # getmsg, getpmsg - receive next message from a STREAMS file + # getmsg, getpmsg - receive next message from a STREAMS file (r"getmsg()", ["<stropts.h>"]), (r"getpmsg()", ["<stropts.h>"]), # getopt, optarg, optind, opterr, optopt - command option parsing @@ -444,7 +444,7 @@ requirements = ( (r"getpid()", ["<sys/types.h>", "<unistd.h>"]), # getppid - get the parent process ID (r"getppid()", ["<sys/types.h>", "<unistd.h>"]), - # getpriority, setpriority - get or set the nice value + # getpriority, setpriority - get or set the nice value (r"getpriority()", ["<sys/resource.h>"]), (r"setpriority()", ["<sys/resource.h>"]), # getpwnam, getpwnam_r - search user database for a name @@ -472,11 +472,11 @@ requirements = ( (r"getw()", ["<stdio.h>"]), # getwc - get a wide-character code from a stream (r"getwc()", ["<stdio.h>", "<wchar.h>"]), - # getws - get a wide-character string from a stream + # getws - get a wide-character string from a stream (r"getws()", ["<stdio.h>", "<wchar.h>"]), # getwchar - get a wide character from a stdin stream (r"getwchar()", ["<wchar.h>"]), - # getwd - get the current working directory pathname + # getwd - get the current working directory pathname (r"getwd()", ["<unistd.h>"]), # glob.h - pathname pattern-matching types (r"glob()", ["<glob.h>"]), @@ -484,7 +484,7 @@ requirements = ( # gmtime, gmtime_r - convert a time value to a broken-down UTC time (r"gmtime()", ["<time.h>"]), (r"gmtime_r()", ["<time.h>"]), - # grantpt - grant access to the slave pseudo-terminal device + # grantpt - grant access to the slave pseudo-terminal device (r"grantpt()", ["<stdlib.h>"]), # hcreate, hdestroy, hsearch - manage hash search table (r"hcreate()", ["<search.h>"]), @@ -513,7 +513,7 @@ requirements = ( (r"isastream()", ["<stropts.h>"]), # isnan - test for a NaN (r"isnan()", ["<math.h>"]), - # j0, j1, jn - Bessel functions of the first kind + # j0, j1, jn - Bessel functions of the first kind (r"j0()", ["<math.h>"]), (r"j1()", ["<math.h>"]), (r"jn()", ["<math.h>"]), @@ -541,7 +541,7 @@ requirements = ( (r"lockf()", ["<unistd.h>"]), # log - natural logarithm function (r"log()", ["<math.h>"]), - # log10 - base 10 logarithm function + # log10 - base 10 logarithm function (r"log10()", ["<math.h>"]), # log1p - compute a natural logarithm (r"log1p()", ["<math.h>"]), @@ -559,9 +559,9 @@ requirements = ( (r"swapcontext()", ["<ucontext.h>"]), # malloc - a memory allocator (r"malloc()", ["<stdlib.h>"]), - # mblen - get number of bytes in a character + # mblen - get number of bytes in a character (r"mblen()", ["<stdlib.h>"]), - # mbrlen - get number of bytes in a character (restartable) + # mbrlen - get number of bytes in a character (restartable) (r"mblren()", ["<wchar.h>"]), # mbrtowc - convert a character to a wide-character code (restartable) (r"mbrtowc()", ["<wchar.h>"]), @@ -571,9 +571,9 @@ requirements = ( (r"mbsrtowcs()", ["<wchar.h>"]), # mbstowcs - convert a character string to a wide-character string (r"mbstowcs()", ["<wchar.h>"]), - # mbtowc - convert a character to a wide-character code + # mbtowc - convert a character to a wide-character code (r"mbtowcs()", ["<stdlib.h>"]), - # mkdir - make a directory + # mkdir - make a directory (r"mkdir()", ["<sys/types.h>", "<sys/stat.h>"]), # mkfifo - make a FIFO special file (r"mkfifo()", ["<sys/types.h>", "<sys/stat.h>"]), @@ -585,7 +585,7 @@ requirements = ( (r"mktemp()", ["<stdlib.h>"]), # convert broken-down time into time since the Epoch (r"mktime()", ["<time.h>"]), - # sys/mman.h - memory management declarations + # sys/mman.h - memory management declarations (r"mlock()", ["<sys/mman.h>"]), (r"mlockall()", ["<sys/mman.h>"]), (r"mmap()", ["<sys/mman.h>"]), @@ -598,7 +598,7 @@ requirements = ( (r"shm_unlink()", ["<sys/mman.h>"]), # modf - decompose a floating-point number (r"modf()", ["<math.h>"]), - # monetary.h - monetary types + # monetary.h - monetary types (r"strfmon()", ["<monetary.h>"]), # mqueue.h - message queues (r"mq_close()", ["<mqueue.h>"]), @@ -628,15 +628,15 @@ requirements = ( (r"opendir()", ["<sys/types.h>", "<dirent.h>"]), # pause - suspend the thread until signal is received (r"pause()", ["<unistd.h>"]), - # pclose - close a pipe stream to or from a process + # pclose - close a pipe stream to or from a process (r"pclose()", ["<stdio.h>"]), # perror - write error messages to standard error (r"perror()", ["<stdio.h>"]), - # pipe - create an interprocess channel + # pipe - create an interprocess channel (r"pipe()", ["<unistd.h>"]), - # poll - input/output multiplexing + # poll - input/output multiplexing (r"poll()", ["<poll.h>"]), - # popen - initiate pipe streams to or from a process + # popen - initiate pipe streams to or from a process (r"popen()", ["<stdio.h>"]), # pow - power function (r"pow()", ["<math.h>"]), @@ -720,7 +720,7 @@ requirements = ( (r"pthread_setschedparam()", ["<pthread.h>"]), (r"pthread_setspecific()", ["<pthread.h>"]), (r"pthread_testcancel()", ["<pthread.h>"]), - # ptsname - get name of the slave pseudo-terminal device + # ptsname - get name of the slave pseudo-terminal device (r"ptsname()", ["<stdlib.h>"]), # putc - put a byte on a stream (r"putc()", ["<stdio.h>"]), @@ -732,7 +732,7 @@ requirements = ( (r"putchar_unlocked()", ["<stdio.h>"]), # putenv - change or add a value to environment (r"putenv()", ["<stdlib.h>"]), - # putmsg, putpmsg - send a message on a STREAM + # putmsg, putpmsg - send a message on a STREAM (r"putmsg()", ["<stropts.h>"]), (r"putpmsg()", ["<stropts.h>"]), # puts - put a string on standard output @@ -745,7 +745,7 @@ requirements = ( (r"putwchar()", ["<wchar.h>"]), # qsort - sort a table of data (r"qsort()", ["<stdlib.h>"]), - # raise - send a signal to the executing process + # raise - send a signal to the executing process (r"raise()", ["<signal.h>"]), # rand, rand_r - pseudo-random number generator (r"rand()", ["<stdlib.h>"]), @@ -759,10 +759,10 @@ requirements = ( # read, readv, pread - read from a file ("read()", ["<unistd.h>"]), ("readv()", ["<sys/uio.h>"]), - # readdir, readdir_r - read directory + # readdir, readdir_r - read directory (r"readdir()", ["<sys/types.h>", "<dirent.h>"]), (r"readdir_r()", ["<sys/types.h>", "<dirent.h>"]), - # readlink - read the contents of a symbolic link + # readlink - read the contents of a symbolic link ("readlink()", ["<unistd.h>"]), # realloc - memory reallocator ("realloc()", ["<unistd.h>"]), @@ -781,11 +781,11 @@ requirements = ( (r"rename()", ["<stdio.h>"]), # rewind - reset file position indicator in a stream (r"rewind()", ["<stdio.h>"]), - # rewinddir - reset position of directory stream to the beginning of a directory + # rewinddir - reset position of directory stream to the beginning of a directory (r"rewinddir()", ["<sys/types.h>", "<dirent.h>"]), # rindex - character string operations (r"rindex()", ["<strings.h>"]), - # rint - round-to-nearest integral value + # rint - round-to-nearest integral value (r"rint()", ["<math.h>"]), # rmdir - remove a directory ("rmdir()", ["<unistd.h>"]), @@ -834,7 +834,7 @@ requirements = ( (r"setpgrp()", ["<unistd.h>"]), # setregid - set real and effective group IDs (r"setregid()", ["<unistd.h>"]), - # setreuid - set real and effective user IDs + # setreuid - set real and effective user IDs (r"setreuid()", ["<unistd.h>"]), # setsid - create session and set process group ID (r"setsid()", ["<sys/types.h>", "<unistd.h>"]), @@ -887,7 +887,7 @@ requirements = ( (r"sin()", ["<math.h>"]), # sinh - hyperbolic sine function (r"sinh()", ["<math.h>"]), - # sleep - suspend execution for an interval of time + # sleep - suspend execution for an interval of time (r"sleep()", ["<unistd.h>"]), # fprintf, printf, snprintf, sprintf - print formatted output (r"fprintf()", ["<stdio.h>"]), @@ -896,7 +896,7 @@ requirements = ( (r"sprintf()", ["<stdio.h>"]), # sqrt - square root function (r"sqrt()", ["<math.h>"]), - # stat - get file status + # stat - get file status (r"stat()", ["<sys/types.h>", "<sys/stat.h>"]), # stdarg.h - handle variable argument list (r"va_start()", ["<stdarg.h>"]), @@ -906,10 +906,10 @@ requirements = ( (r"offsetof()", ["<stddef.h>"]), # step - pattern match with regular expressions (r"step()", ["<regexp.h>"]), - # strcasecmp, strncasecmp - case-insensitive string comparisons + # strcasecmp, strncasecmp - case-insensitive string comparisons (r"strcasecmp()", ["<strings.h>"]), (r"strncasecmp()", ["<strings.h>"]), - # string.h - string operations + # string.h - string operations (r"memccpy()", ["<string.h>"]), (r"memchr()", ["<string.h>"]), (r"memcmp()", ["<string.h>"]), @@ -960,7 +960,7 @@ requirements = ( (r"strptime()", ["<time.h>"]), # strtod - convert string to a double-precision number (r"strtod()", ["<stdlib.h>"]), - # strtol - convert string to a long integer + # strtol - convert string to a long integer (r"strtol()", ["<stdlib.h>"]), # strtoul - convert string to an unsigned long (r"strtoul()", ["<stdlib.h>"]), @@ -968,9 +968,9 @@ requirements = ( (r"swab()", ["<stdlib.h>"]), # symlink - make symbolic link to a file (r"symlink()", ["<stdlib.h>"]), - # sync - schedule filesystem updates + # sync - schedule filesystem updates (r"sync()", ["<stdlib.h>"]), - # sysconf - get configurable system variables + # sysconf - get configurable system variables (r"sysconf()", ["<stdlib.h>"]), # system - issue a command (r"system()", ["<stdlib.h>"]), @@ -992,11 +992,11 @@ requirements = ( (r"tanh()", ["<math.h>"]), # tcgetpgrp - get the foreground process group ID (r"tcgetpgrp()", ["<sys/types.h>", "<unistd.h>"]), - # tcsetpgrp - set the foreground process group ID + # tcsetpgrp - set the foreground process group ID (r"tcsetpgrp()", ["<sys/types.h>", "<unistd.h>"]), # tdelete - delete node from binary search tree (r"tdelete()", ["<search.h>"]), - # telldir - current location of a named directory stream + # telldir - current location of a named directory stream (r"telldir()", ["<dirent.h>"]), # tempnam - create a name for a temporary file (r"tempnam()", ["<stdio.h>"]), @@ -1012,7 +1012,7 @@ requirements = ( (r"tcgetsid()", ["<termios.h>"]), (r"tcsendbreak()", ["<termios.h>"]), (r"tcsetattr()", ["<termios.h>"]), - # tdelete, tfind, tsearch, twalk - manage a binary search tree + # tdelete, tfind, tsearch, twalk - manage a binary search tree (r"tsearch()", ["<termios.h>"]), (r"tfind()", ["<termios.h>"]), (r"tdelete()", ["<termios.h>"]), @@ -1029,18 +1029,18 @@ requirements = ( (r"timer_getoverrun()", ["<time.h>"]), # times - get process and waited-for child process times (r"times()", ["<sys/time.h>"]), - # tmpfile - create a temporary file + # tmpfile - create a temporary file (r"tmpfile()", ["<stdio.h>"]), # tmpnam - create a name for a temporary file (r"tmpnam()", ["<stdio.h>"]), # truncate - truncate a file to a specified length (r"truncate()", ["<stdio.h>"]), - # ttyname, ttyname_r - find pathname of a terminal + # ttyname, ttyname_r - find pathname of a terminal ("ttyname()", ["<unistd.h>"]), ("ttyname_r()", ["<unistd.h>"]), # ttyslot - find the slot of the current user in the user accounting database ("ttyslot()", ["<unistd.h>"]), - # tzset - set time zone conversion information + # tzset - set time zone conversion information ("tzset()", ["<time.h>"]), # ualarm - set the interval timer ("ualarm()", ["<unistd.h>"]), @@ -1048,21 +1048,21 @@ requirements = ( ("ulimit()", ["<ulimit.h>"]), # umask - set and get file mode creation mask (r"umask()", ["<sys/stat.h>", "<sys/types.h>"]), - # uname - get name of current system + # uname - get name of current system ("uname()", ["<sys/utsname.h>"]), # ungetc - push byte back into input stream (r"ungetc()", ["<stdio.h>"]), - # ungetwc - push wide-character code back into input stream + # ungetwc - push wide-character code back into input stream (r"ungetwc()", ["<stdio.h>", "<wchar.h>"]), # unlink - remove a directory entry ("unlink()", ["<unistd.h>"]), - # unlockpt - unlock a pseudo-terminal master/slave pair + # unlockpt - unlock a pseudo-terminal master/slave pair (r"unlockpt()", ["<stdlib.h>"]), # usleep - suspend execution for an interval ("usleep()", ["<unistd.h>"]), # utime - set file access and modification times (r"utime()", ["<sys/types.h>", "<utime.h>"]), - # utimes - set file access and modification times + # utimes - set file access and modification times (r"utimes()", ["<sys/time.h>"]), # valloc - page-aligned memory allocator (r"valloc()", ["<stdlib.h>"]), @@ -1078,7 +1078,7 @@ requirements = ( (r"vfwprintf()", ["<stdarg.h>", "<stdio.h>", "<wchar.h>"]), (r"vswprintf()", ["<stdarg.h>", "<stdio.h>", "<wchar.h>"]), # wchar.h - wide-character types - (r"wcrtomb()", ["<wchar.h>"]), # SuSv2 erroneously says <stdio.h> + (r"wcrtomb()", ["<wchar.h>"]), # SuSv2 erroneously says <stdio.h> (r"wcscat()", ["<wchar.h>"]), (r"wcschr()", ["<wchar.h>"]), (r"wcscmp()", ["<wchar.h>"]), @@ -1119,13 +1119,13 @@ requirements = ( (r"write()", ["<unistd.h>"]), (r"pwrite()", ["<unistd.h>"]), (r"writev()", ["<sys/uio.h>"]), - # y0, y1, yn - Bessel functions of the second kind + # y0, y1, yn - Bessel functions of the second kind (r"y0()", ["<math.h>"]), (r"y1()", ["<math.h>"]), (r"yn()", ["<math.h>"]), - + # Headers mandated by SuS Version 2 Network Services. - # sys/socket.h - Internet Protocol family + # sys/socket.h - Internet Protocol family (r"accept()", ["<sys/socket.h>"]), (r"bind()", ["<sys/socket.h>"]), (r"connect()", ["<sys/socket.h>"]), @@ -1154,7 +1154,7 @@ requirements = ( (r"htons()", ["<arpa/inet.h>"]), (r"ntohl()", ["<arpa/inet.h>"]), (r"ntohs()", ["<arpa/inet.h>"]), - # netdb.h - definitions for network database operations + # netdb.h - definitions for network database operations (r"endhostent()", ["<netdb.h>"]), (r"endnetent()", ["<netdb.h>"]), (r"endprotoent()", ["<netdb.h>"]), @@ -1175,7 +1175,7 @@ requirements = ( (r"setnetent()", ["<netdb.h>"]), (r"setprotoent()", ["<netdb.h>"]), (r"setservent()", ["<netdb.h>"]), - # unistd.h - standard symbolic constants and types + # unistd.h - standard symbolic constants and types (r"gethostname()", ["<unistd.h>"]), # stdbool.h - standard boolean type (r"=\s*true", ["<stdbool.h>"]), @@ -1274,7 +1274,7 @@ class InclusionMap: conditions.append(line[3:].strip()) elif line.startswith("#endif"): conditions.pop() - elif line.startswith("#include"): + elif line.startswith("#include"): if verbosity >= PROGRESS_DEBUG: name = trim(line) print "deheader: %s includes %s" % (sourcefile, name) @@ -1322,7 +1322,7 @@ class SaveForModification: ofp.close() def forget(self): "Disable reversion." - os.remove(self.original) + os.remove(self.original) def revert(self): "Revert modifications on the file at the end of this object's lifetime." if os.path.exists(self.original): @@ -1376,7 +1376,7 @@ def c_analyze(sourcefile, maker, includes, requires, verbosity): baton = Baton(sourcefile + ": ", "Done") try: saveit = SaveForModification(sourcefile) - while True: + while True: keepgoing = False for header in includes: if verbosity == BATON_DEBUG: @@ -1447,7 +1447,7 @@ class Summary: return result def __repr__(self): return "%d files, %d includes, %d removable" % \ - (len(self.filenames), len(self.includes), len(self.unneeded)) + (len(self.filenames), len(self.includes), len(self.unneeded)) if __name__ == "__main__": (options, arguments) = getopt.getopt(sys.argv[1:], "hi:m:rvx:V", @@ -1475,7 +1475,7 @@ if __name__ == "__main__": verbose += 1 elif switch in ('-V', '--version'): print "deheader", version - raise SystemExit, 0 + raise SystemExit(0) elif switch in ('-x', '--exclude'): exclusions.append(val) if not ignores: @@ -1501,6 +1501,6 @@ if __name__ == "__main__": for summary in summaries: stats = stats + summary print "deheader: saw", stats - raise SystemExit, 0 + raise SystemExit(0) # End |