]> git.ipfire.org Git - thirdparty/squid.git/blame - scripts/calc-must-ids.sh
SourceFormat Enforcement
[thirdparty/squid.git] / scripts / calc-must-ids.sh
CommitLineData
64b66b76
CT
1#!/bin/sh
2#
ef57eb7b 3## Copyright (C) 1996-2016 The Squid Software Foundation and contributors
a151895d
AJ
4##
5## Squid software is distributed under GPLv2+ license and includes
6## contributions from numerous individuals and organizations.
7## Please see the COPYING and CONTRIBUTORS files for details.
8##
9#
64b66b76
CT
10# Usage:
11# calc-must-ids.sh [MustID]
12# Given an id it searches for the related Must expression in all
13# source files. If no arguments given it returns all Must expressions
14# with its ids and their exact position in the source files.
15#
16# Example usage:
17# # ./scripts/calc-must-ids.sh 0xB79EF14
18# ./src/adaptation/ecap/MessageRep.cc:356: 0xB79EF14 Must(false);
19#
20
21if test -z "$1"; then
22 find . -name "*.cc" -o -name "*.h" -o -name "*.cci" | \
23 xargs `dirname $0`/calc-must-ids.pl
24else
25 find . -name "*.cc" -o -name "*.h" -o -name "*.cci" | \
26 xargs `dirname $0`/calc-must-ids.pl | grep ": $1 "
27fi
28
29