Dec 122017
 
Scans TurboC source files to produce a list of the header files that contain the prototypes for the library functions called. C source included.
File HEADHU.ZIP from The Programmer’s Corner in
Category C Source Code
Scans TurboC source files to produce a list of the header files that contain the prototypes for the library functions called. C source included.
File Name File Size Zip Size Zip Type
HEADHUNT.C 12799 3925 deflated
HEADHUNT.DOC 1647 818 deflated
HEADHUNT.EXE 18384 8525 deflated

Download File HEADHU.ZIP Here

Contents of the HEADHUNT.DOC file


File: HeadHunt.doc
Date: 4 Sept 87
Author: Lawrence Allen (BIX: lallen, CompuServe: 75776,2477)

Purpose: Scans TurboC source files to produce a list of the
header files that contain the prototypes for the
library functions called.

Usage: headhunt infilespec [outfilespec] [-n]

where if outfilespec is omitted, output is to stdout.

-n if present, outputs the file header names only.
Eg. "stdio.h" rather than the default format:
"#include "


HeadHunt automates a tedious part of ANSI-compatibility: the search
through source files for library functions and the look up of which
header files contain their prototypes.

I've provided the source to make it possible to customize for other
"ANSI-compatible" C compilers and to allow you to add your own
functions and headers.

Please note that TurboC's header files also contain lots of #defines,
global variables, etc. whose use would require their inclusion.
HeadHunt does not pick these up. I left these out for several reasons.
First, it would slow down processing considerably. Second, I figured
that if you're using these labels you're probably looking at the header
files and therefore are less likely to forget to #include them. Third,
the compiler is sure to complain and alert you if they're left out.

If you want to handle this other stuff, simply remove the test for a
left parenthesis after the call to getword() in main() and add the new
identifiers to functab[] and headers[].



 December 12, 2017  Add comments

Leave a Reply