2
1
mirror of https://github.com/qpdf/qpdf.git synced 2024-12-22 02:49:00 +00:00

Remove "lt-" workarounds

The executables that libtool built invoked the underlying binary with
an "lt-" prefix. The code contained numerous workarounds for testing,
which can now be removed.
This commit is contained in:
Jay Berkenbilt 2022-03-18 18:22:54 -04:00 committed by Jay Berkenbilt
parent e316e90d1f
commit 820a3f04fd
25 changed files with 1 additions and 142 deletions

View File

@ -155,12 +155,6 @@ int main(int argc, char* argv[])
{
whoami = QUtil::getWhoami(argv[0]);
// For libtool's sake....
if (strncmp(whoami, "lt-", 3) == 0)
{
whoami += 3;
}
char const* infilename = 0;
char const* password = 0;
char const* attachment = 0;

View File

@ -157,12 +157,6 @@ int main(int argc, char* argv[])
{
whoami = QUtil::getWhoami(argv[0]);
// For libtool's sake....
if (strncmp(whoami, "lt-", 3) == 0)
{
whoami += 3;
}
if ((argc == 2) && (strcmp(argv[1], "--version") == 0))
{
std::cout << whoami << " version 1.5" << std::endl;

View File

@ -75,12 +75,6 @@ int main(int argc, char* argv[])
{
whoami = QUtil::getWhoami(argv[0]);
// For libtool's sake....
if (strncmp(whoami, "lt-", 3) == 0)
{
whoami += 3;
}
if (argc != 2)
{
usage();

View File

@ -409,11 +409,6 @@ int main(int argc, char* argv[])
{
whoami = QUtil::getWhoami(argv[0]);
// For libtool's sake....
if (strncmp(whoami, "lt-", 3) == 0)
{
whoami += 3;
}
if (argc != 2)
{
usage();

View File

@ -470,12 +470,6 @@ int main(int argc, char* argv[])
{
whoami = QUtil::getWhoami(argv[0]);
// For libtool's sake....
if (strncmp(whoami, "lt-", 3) == 0)
{
whoami += 3;
}
char const* infilename = 0;
char const* outfilename = 0;
bool decode_specialized = false;

View File

@ -49,12 +49,6 @@ int main(int argc, char* argv[])
{
whoami = QUtil::getWhoami(argv[0]);
// For libtool's sake....
if (strncmp(whoami, "lt-", 3) == 0)
{
whoami += 3;
}
// For test suite
bool static_id = false;
if ((argc > 1) && (strcmp(argv[1], " --static-id") == 0))

View File

@ -192,12 +192,6 @@ int main(int argc, char* argv[])
{
whoami = QUtil::getWhoami(argv[0]);
// For libtool's sake....
if (strncmp(whoami, "lt-", 3) == 0)
{
whoami += 3;
}
if (argc != 3)
{
usage();

View File

@ -109,12 +109,6 @@ int main(int argc, char* argv[])
{
whoami = QUtil::getWhoami(argv[0]);
// For libtool's sake....
if (strncmp(whoami, "lt-", 3) == 0)
{
whoami += 3;
}
// For test suite
bool static_id = false;
if ((argc > 1) && (strcmp(argv[1], " --static-id") == 0))

View File

@ -75,12 +75,6 @@ int main(int argc, char* argv[])
whoami = QUtil::getWhoami(argv[0]);
// For libtool's sake....
if (strncmp(whoami, "lt-", 3) == 0)
{
whoami += 3;
}
if ((argc == 2) && (! strcmp(argv[1], "--version")) )
{
std::cout << whoami << " version " << version << std::endl;

View File

@ -21,12 +21,6 @@ int main(int argc, char* argv[])
{
whoami = QUtil::getWhoami(argv[0]);
// For libtool's sake....
if (strncmp(whoami, "lt-", 3) == 0)
{
whoami += 3;
}
if (argc != 2)
{
usage();

View File

@ -18,12 +18,6 @@ int main(int argc, char* argv[])
{
whoami = QUtil::getWhoami(argv[0]);
// For libtool's sake....
if (strncmp(whoami, "lt-", 3) == 0)
{
whoami += 3;
}
if ((argc == 2) && (strcmp(argv[1], "--version") == 0))
{
std::cout << whoami << " version 1.3" << std::endl;

View File

@ -88,12 +88,6 @@ int main(int argc, char* argv[])
{
whoami = QUtil::getWhoami(argv[0]);
// For libtool's sake....
if (strncmp(whoami, "lt-", 3) == 0)
{
whoami += 3;
}
if (argc != 4)
{
usage();

View File

@ -63,12 +63,6 @@ int main(int argc, char* argv[])
{
whoami = QUtil::getWhoami(argv[0]);
// For libtool's sake....
if (strncmp(whoami, "lt-", 3) == 0)
{
whoami += 3;
}
if (argc != 3)
{
usage();

View File

@ -24,12 +24,6 @@ int main(int argc, char* argv[])
{
whoami = QUtil::getWhoami(argv[0]);
// For libtool's sake....
if (strncmp(whoami, "lt-", 3) == 0)
{
whoami += 3;
}
if (argc != 4)
{
usage();

View File

@ -59,11 +59,6 @@ int main(int argc, char* argv[])
{
char const* whoami = QUtil::getWhoami(argv[0]);
// For libtool's sake....
if (strncmp(whoami, "lt-", 3) == 0)
{
whoami += 3;
}
// For test suite
if ((argc > 1) && (strcmp(argv[1], " --static-id") == 0))
{

View File

@ -27,12 +27,6 @@ int main(int argc, char* argv[])
{
whoami = QUtil::getWhoami(argv[0]);
// For libtool's sake....
if (strncmp(whoami, "lt-", 3) == 0)
{
whoami += 3;
}
if (argc != 1)
{
usage();

View File

@ -21,13 +21,7 @@ QPDFArgParser::Members::Members(
final_check_handler(nullptr)
{
auto tmp = QUtil::make_unique_cstr(argv[0]);
char* p = QUtil::getWhoami(tmp.get());
// Remove prefix added by libtool for consistency during testing.
if (strncmp(p, "lt-", 3) == 0)
{
p += 3;
}
whoami = p;
whoami = QUtil::getWhoami(tmp.get());
}
QPDFArgParser::QPDFArgParser(int argc, char const* const argv[],

View File

@ -94,11 +94,6 @@ int main(int argc, char* argv[])
{
++whoami;
}
// For libtool's sake....
if (strncmp(whoami, "lt-", 3) == 0)
{
whoami += 3;
}
if (argc != 2)
{

View File

@ -33,12 +33,6 @@ int realmain(int argc, char* argv[])
whoami = QUtil::getWhoami(argv[0]);
QUtil::setLineBuf(stdout);
// Remove prefix added by libtool for consistency during testing.
if (strncmp(whoami, "lt-", 3) == 0)
{
whoami += 3;
}
QPDFJob j;
try
{

View File

@ -3495,11 +3495,6 @@ int main(int argc, char* argv[])
{
++whoami;
}
// For libtool's sake....
if (strncmp(whoami, "lt-", 3) == 0)
{
whoami += 3;
}
if ((argc < 3) || (argc > 4))
{

View File

@ -306,11 +306,6 @@ int main(int argc, char* argv[])
whoami = QUtil::getWhoami(argv[0]);
QUtil::setLineBuf(stdout);
// For libtool's sake....
if (strncmp(whoami, "lt-", 3) == 0)
{
whoami += 3;
}
if (argc != 4)
{
usage();

View File

@ -22,11 +22,6 @@ int main(int argc, char* argv[])
{
++whoami;
}
// For libtool's sake....
if (strncmp(whoami, "lt-", 3) == 0)
{
whoami += 3;
}
if (argc != 2)
{

View File

@ -22,11 +22,6 @@ int main(int argc, char* argv[])
{
++whoami;
}
// For libtool's sake....
if (strncmp(whoami, "lt-", 3) == 0)
{
whoami += 3;
}
if (argc != 2)
{

View File

@ -260,11 +260,6 @@ int main(int argc, char* argv[])
{
++whoami;
}
// For libtool's sake....
if (strncmp(whoami, "lt-", 3) == 0)
{
whoami += 3;
}
char const* filename = 0;
size_t max_len = 0;

View File

@ -34,11 +34,6 @@ int main(int argc, char* argv[])
{
++whoami;
}
// For libtool's sake....
if (strncmp(whoami, "lt-", 3) == 0)
{
whoami += 3;
}
if ((argc == 2) && (strcmp(argv[1], "--version") == 0))
{