You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
68 lines
1.5 KiB
68 lines
1.5 KiB
11 years ago
|
|
||
|
#include <fstream>
|
||
|
#include <iostream>
|
||
|
#include <string>
|
||
|
|
||
9 years ago
|
int main(int argc, char** argv)
|
||
11 years ago
|
{
|
||
|
std::ifstream f;
|
||
|
f.open(UI_LIBWIDGET_H);
|
||
9 years ago
|
if (!f.is_open()) {
|
||
11 years ago
|
std::cout << "Could not open \"" UI_LIBWIDGET_H "\"." << std::endl;
|
||
|
return -1;
|
||
9 years ago
|
}
|
||
11 years ago
|
|
||
|
{
|
||
9 years ago
|
bool gotTr2i18n = false;
|
||
11 years ago
|
|
||
9 years ago
|
while (!f.eof()) {
|
||
|
std::string output;
|
||
|
getline(f, output);
|
||
|
if (!gotTr2i18n) {
|
||
|
gotTr2i18n = output.find("tr2i18n") != std::string::npos;
|
||
11 years ago
|
}
|
||
9 years ago
|
if (output.find("tr2xi18n") != std::string::npos) {
|
||
|
std::cout << "ui_libwidget,h uses tr2xi18n, though it should not."
|
||
|
<< std::endl;
|
||
|
return -1;
|
||
11 years ago
|
}
|
||
|
}
|
||
|
|
||
9 years ago
|
if (!gotTr2i18n) {
|
||
|
std::cout << "Did not find tr2i18n in ui_libwidget.h" << std::endl;
|
||
|
return -1;
|
||
11 years ago
|
}
|
||
|
}
|
||
|
|
||
|
f.close();
|
||
|
f.open(UI_MYWIDGET_H);
|
||
9 years ago
|
if (!f.is_open()) {
|
||
11 years ago
|
std::cout << "Could not open \"" UI_MYWIDGET_H "\"." << std::endl;
|
||
|
return -1;
|
||
9 years ago
|
}
|
||
11 years ago
|
|
||
|
{
|
||
9 years ago
|
bool gotTr2xi18n = false;
|
||
11 years ago
|
|
||
9 years ago
|
while (!f.eof()) {
|
||
|
std::string output;
|
||
|
getline(f, output);
|
||
|
if (!gotTr2xi18n) {
|
||
|
gotTr2xi18n = output.find("tr2xi18n") != std::string::npos;
|
||
11 years ago
|
}
|
||
9 years ago
|
if (output.find("tr2i18n") != std::string::npos) {
|
||
|
std::cout << "ui_mywidget,h uses tr2i18n, though it should not."
|
||
|
<< std::endl;
|
||
|
return -1;
|
||
11 years ago
|
}
|
||
|
}
|
||
9 years ago
|
if (!gotTr2xi18n) {
|
||
|
std::cout << "Did not find tr2xi18n in ui_mywidget.h" << std::endl;
|
||
|
return -1;
|
||
11 years ago
|
}
|
||
|
}
|
||
|
f.close();
|
||
|
|
||
|
return 0;
|
||
|
}
|