reSIProcate
SIP stack, Dialog Usage Manager and related libraries
Loading...
Searching...
No Matches
ApiCheck.cxx
Go to the documentation of this file.
1#include <stdlib.h>
2#include <iostream>
3#include <iomanip>
4
7
8namespace resip
9{
10
12{
13 int bad = 0;
14
15 ApiEntry* p = list;
17 int resipListLen = sizeof(::anonymous_resipApiSizeList)/sizeof(*::anonymous_resipApiSizeList);
18
20 {
21 return;
22 }
23
24 if (resipListLen != len)
25 {
26 std::cerr << "reSIProcate Type verification list lengths are different."
27 << std::endl
28 << "\tEither the library and application are radically out of date"
29 << std::endl
30 << "application length: " << len << std::endl
31 << "reSIProcate length: " << resipListLen << std::endl;
32 ++bad;
33 }
34
35 std::cerr << std::setfill(' ')
36 << std::setw(34) << "Class" << ' '
37 << std::setw(8) << "App" << ' '
38 << std::setw(8) << "Lib" << ' '
39 << std::setw(8) << "Possible Culprit Flags"
40 << std::endl;
41
42 for(int i = 0 ; i < resipListLen && i < len; ++i)
43 {
44 bool oops = false;
45 if (strcmp(p[i].name, q[i].name))
46 {
47 std::cerr << "!!! Miss match entry for : (app)"
48 << p[i].name << " vs. (resip)" << q[i].name
49 << std::endl;
50 ++bad;
51 continue;
52 }
53
54 if (p[i].sz != q[i].sz)
55 {
56 ++bad;
57 oops = true;
58 }
59 const char w = oops?'!':' ';
60
61 std::cerr << w << w << w << std::setfill(' ')
62 << std::setw(30-strlen(p[i].name)) << "resip::"
63 << p[i].name << ' '
64 << std::setw(8) << p[i].sz << ' '
65 << std::setw(8) << q[i].sz << ' '
66 << (oops?p[i].culprits:"")
67 << std::endl;
68
69
70 }
71
72 if (bad)
73 {
74 std::cerr <<"SERIOUS COMPILATION / CONFIGURATION ERRORS -- ABORTING" << std::endl;
75#ifndef UNDER_CE
76 abort();
77#endif
78 exit(bad);
79 }
80 std::cerr << std::endl;
81}
82
83}
84
85/* ====================================================================
86 * The Vovida Software License, Version 1.0
87 *
88 * Copyright (c) 2000-2005 Vovida Networks, Inc. All rights reserved.
89 *
90 * Redistribution and use in source and binary forms, with or without
91 * modification, are permitted provided that the following conditions
92 * are met:
93 *
94 * 1. Redistributions of source code must retain the above copyright
95 * notice, this list of conditions and the following disclaimer.
96 *
97 * 2. Redistributions in binary form must reproduce the above copyright
98 * notice, this list of conditions and the following disclaimer in
99 * the documentation and/or other materials provided with the
100 * distribution.
101 *
102 * 3. The names "VOCAL", "Vovida Open Communication Application Library",
103 * and "Vovida Open Communication Application Library (VOCAL)" must
104 * not be used to endorse or promote products derived from this
105 * software without prior written permission. For written
106 * permission, please contact vocal@vovida.org.
107 *
108 * 4. Products derived from this software may not be called "VOCAL", nor
109 * may "VOCAL" appear in their name, without prior written
110 * permission of Vovida Networks, Inc.
111 *
112 * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
113 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
114 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
115 * NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL VOVIDA
116 * NETWORKS, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT DAMAGES
117 * IN EXCESS OF $1,000, NOR FOR ANY INDIRECT, INCIDENTAL, SPECIAL,
118 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
119 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
120 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
121 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
122 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
123 * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
124 * DAMAGE.
125 *
126 * ====================================================================
127 *
128 * This software consists of voluntary contributions made by Vovida
129 * Networks, Inc. and many individuals on behalf of Vovida Networks,
130 * Inc. For more information on Vovida Networks, Inc., please see
131 * <http://www.vovida.org/>.
132 *
133 */
::resip::ApiCheck::ApiEntry anonymous_resipApiSizeList[]
ApiCheck(ApiEntry *list, int len)
Definition ApiCheck.cxx:11
dcm! – add UnusedChecking(_enum) below;
void list()
Definition userAdmin.cxx:66