EnglishFrenchSpanish

Ad


OnWorks favicon

deheader - Online in the Cloud

Run deheader in OnWorks free hosting provider over Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

This is the command deheader that can be run in the OnWorks free hosting provider using one of our multiple free online workstations such as Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

PROGRAM:

NAME


deheader - report which includes in C or C++ compiles can be removed

SYNOPSIS


deheader [-h] [-m command] [-i pattern] [-q] [-r] [-v] [-x pattern] [-V] [file-or-dir]

DESCRIPTION


This tool takes a list of C or C++ sourcefiles and generates a report on which #includes
can be omitted from them; also, what standard inclusions may be required for portability.
The test, for each foo.c or foo.cc or foo.cpp, is simply whether "rm foo.o; make foo.o"
returns a zero status (but the build command may be overridden).

Exception: Under cmake, foo.o is a phoney target. Therefore, when a "CMakeList.txt" is
detected, "make clean" is done rather than "rm foo.o".

Optionally, with the -r switch, the unneeded headers are removed from the sourcefiles.
Don't use this option unless you have your sourcefiles safely under version control and
can revert!

If a sourcefile argument is a directory, the report is generated on all source files
beneath it. Subdirectories beginning with a dot are assumed to be repository directories
for version-control systems and ignored. If no arguments are given, the program runs as if
the name of the current directory had been passed to it.

Inclusions within the scope of #if/#ifdef/#else/#endif directives are left alone, because
trying to reason about potential combinations of -D and U options would be too complicated
and prone to weird errors. One exception: headers protected only by S_SPLINT_S, the
conditional for blocking scanning by the static analysis tool splint(1), are scanned
normally.

The tool will also emit warnings about duplicate inclusions, and inclusions required for
portability but not present.

It is recommended that you arrange to compile with options that will stop the compiler on
warnings when using this tool; otherwise it will report headers that only declare
prototypes and return types (and thus throw only warnings) as being not required. Under
gcc the compiler options to accomplish this are -Werror -Wfatal-errors. If your makefile
follows normal conventions, running with -m "make CFLAGS='-Werror -Wfatal-errors'" may do
the right thing; you can check this by running with -v -v -v to see what compilation
commands are actually emitted.

On each test compile, the original sourcefile is moved to a name with an .orig suffix and
restored on interrupt or after processing with its original timestamp, unless the -r
option was given and headers removed.

If the first test compilation from the top-level directory fails, deheader descends into
the subdirectory of the source file and retries compiling inside there.

At verbosity level 0, only messages indicating removable headers are issued. At verbosity
1, test compilations are timed and progess indicated with a twirling-baton prompt. At
verbosity level 2, you get verbose progress messages on the analysis. At verbosity level
3, you see the output from the make and compilation commands.

If the -q (--quiet) option flag was not set, the last line of the output will be a
statistical summary.

Running deheader will leave a lot of binaries in your directory that were compiled in ways
possibly not invoked by your normal build process. Running "make clean" afterwards (or the
equivalent under whatever build system you are using) is strongly recommended.

OPTIONS


-h
Display some help and exit.

-m
Set the build command used for test compiles. Defaults to 'make'.

-i
Set a pattern for includes to be ignored. Takes a Python regular expression.

-q
Suppress statistical summary.

-r
Remove header inclusions from sourcefiles where they are not required.

-v
Set verbosity.

-x
Exclude files with names matching the specified Python regexp.

-V
Show version of program and exit.

Use deheader online using onworks.net services


Free Servers & Workstations

Download Windows & Linux apps

  • 1
    facetracknoir
    facetracknoir
    Modular headtracking program that
    supports multiple face-trackers, filters
    and game-protocols. Among the trackers
    are the SM FaceAPI, AIC Inertial Head
    Tracker ...
    Download facetracknoir
  • 2
    PHP QR Code
    PHP QR Code
    PHP QR Code is open source (LGPL)
    library for generating QR Code,
    2-dimensional barcode. Based on
    libqrencode C library, provides API for
    creating QR Code barc...
    Download PHP QR Code
  • 3
    Freeciv
    Freeciv
    Freeciv is a free turn-based
    multiplayer strategy game, in which each
    player becomes the leader of a
    civilization, fighting to obtain the
    ultimate goal: to bec...
    Download Freeciv
  • 4
    Cuckoo Sandbox
    Cuckoo Sandbox
    Cuckoo Sandbox uses components to
    monitor the behavior of malware in a
    Sandbox environment; isolated from the
    rest of the system. It offers automated
    analysis o...
    Download Cuckoo Sandbox
  • 5
    LMS-YouTube
    LMS-YouTube
    Play YouTube video on LMS (porting of
    Triode's to YouTbe API v3) This is
    an application that can also be fetched
    from
    https://sourceforge.net/projects/lms-y...
    Download LMS-YouTube
  • 6
    Windows Presentation Foundation
    Windows Presentation Foundation
    Windows Presentation Foundation (WPF)
    is a UI framework for building Windows
    desktop applications. WPF supports a
    broad set of application development
    features...
    Download Windows Presentation Foundation
  • More »

Linux commands

Ad