replace c-string Mode with c++-string ActiveSubprocess
authorDavid Kalnischkies <david@kalnischkies.de>
Sat, 27 Sep 2014 23:57:49 +0000 (01:57 +0200)
committerDavid Kalnischkies <david@kalnischkies.de>
Sat, 27 Sep 2014 23:57:49 +0000 (01:57 +0200)
commitffbe056dc554b3f1fdf79b4726415a70f6d59dc1
tree1ab7fea04d330307028d1b451732a811452f6c15
parentc4b91cbe7cd24126ead1c3fd4b89ff7069bcc148
replace c-string Mode with c++-string ActiveSubprocess

A long-lasting FIXME in the acquire code points out the problem that we
e.g. for decompressors assign c-string representations of c++-strings to
the Mode variable, which e.g. cppcheck points out as very bad.

In practice, nothing major happens as the c++-strings do not run out of
scope until Mode would do, but that is bad style and fragile, so the
obvious proper fix is to use a c++ string for storage to begin with.

The slight complications stems from the fact that progress reporting
code in frontends potentially uses Mode and compares it with NULL, which
can't be done with std::string, so instead of just changing the type we
introduce a new variable and deprecate the old one.

Git-Dch: Ignore
apt-pkg/acquire-item.cc
apt-pkg/acquire-item.h
apt-private/acqprogress.cc