Changeset 14389


Ignore:
Timestamp:
2022-04-10T23:09:14Z (4 months ago)
Author:
marios
Message:

Show include files in output of list_headers.pl

The previous implementation did not search through other header files
when searching for uses of a given header file. As a result, on output
(in listfiles.list) some header files would be followed by a blank line,
ie, they would appear as not being used.

listfiles.list now shows both header and C++ files that use each header
file. The only header files that may be followed by a blank line are
those that are genuinely unused.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/c17_branch/source/list_headers.pl

    r919 r14389  
    11#!/usr/bin/perl
    2 # program to find out the C files using the header(.h) files.
     2# program to find out the C++ files using the header(.h) files.
    33
    44# this will be list of headers
    55$hfiles='headers.txt';
    66
    7 # List of header files  and C files using them 
     7# List of header files  and C++ files using them 
    88$result='listfiles.list';
    99
     
    2929  print LFILE "$header";
    3030  $header=~s/\n//; 
    31   while(defined($input=glob("*.cpp")))  #Scanning through the C files
     31  while(defined($input=glob("*.h *.cpp")))  #Scanning through the C++ files
    3232  {
     33     next if $header eq $input;
    3334     open(CFILE,"$input");
    3435     while(<CFILE>)
Note: See TracChangeset for help on using the changeset viewer.