FreeBSD Bugzilla – Attachment 24574 Details for
Bug 42011
[Maintainer-Update] security/steghide Fix Build on -CURRENT
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
steghide.diff
steghide.diff (text/plain), 39.98 KB, created by
Tilman Linneweh
on 2002-08-26 00:10:01 UTC
(
hide
)
Description:
steghide.diff
Filename:
MIME Type:
Creator:
Tilman Linneweh
Created:
2002-08-26 00:10:01 UTC
Size:
39.98 KB
patch
obsolete
>Index: Makefile >=================================================================== >RCS file: /home/ncvs/ports/security/steghide/Makefile,v >retrieving revision 1.7 >diff -u -r1.7 Makefile >--- Makefile 11 Aug 2002 04:26:41 -0000 1.7 >+++ Makefile 26 Sep 2002 22:33:15 -0000 >@@ -32,5 +32,17 @@ > ${REINPLACE_CMD} -e 's|install-data-am\: install-docDATA||' \ > ${WRKSRC}/Makefile.in > .endif >+.for i in msg.h arg.h cvrstgfile.h error.h jpegjfifapp0.h >+ ${REINPLACE_CMD} -e 's/#include <string>//' ${WRKSRC}/src/${i} >+ ${REINPLACE_CMD} -e 's/string/std::string/g' ${WRKSRC}/src/${i} >+.endfor >+.for i in hash.cc bufmanag.cc wavfile.cc >+ ${REINPLACE_CMD} -e 's/string.h/string/' ${WRKSRC}/src/${i} >+.endfor >+.for i in jpeghufftable.h jpegbase.h jpegentropycoded.h jpegscan.h \ >+ jpegframe.h bmpfile.h aufile.h jpegunusedseg.h >+ ${REINPLACE_CMD} -e 's/#include <vector>//' ${WRKSRC}/src/${i} >+ ${REINPLACE_CMD} -e 's/vector/std::vector/g' ${WRKSRC}/src/${i} >+.endfor > > .include <bsd.port.mk> >Index: files/patch-src-arg.cc >=================================================================== >RCS file: files/patch-src-arg.cc >diff -N files/patch-src-arg.cc >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ files/patch-src-arg.cc 26 Sep 2002 17:19:25 -0000 >@@ -0,0 +1,10 @@ >+--- src/arg.cc.orig Thu Sep 26 19:18:45 2002 >++++ src/arg.cc Thu Sep 26 19:18:48 2002 >+@@ -18,6 +18,7 @@ >+ * >+ */ >+ >++#include <string> >+ #include "arg.h" >+ >+ template<class T> Arg<T>::Arg (void) >Index: files/patch-src-arguments.cc >=================================================================== >RCS file: files/patch-src-arguments.cc >diff -N files/patch-src-arguments.cc >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ files/patch-src-arguments.cc 26 Sep 2002 19:45:26 -0000 >@@ -0,0 +1,254 @@ >+--- src/arguments.cc.orig Thu Sep 26 21:38:44 2002 >++++ src/arguments.cc Thu Sep 26 21:44:01 2002 >+@@ -19,6 +19,7 @@ >+ */ >+ >+ #include <iostream> >++#include <string> >+ >+ #include <libintl.h> >+ #define _(S) gettext (S) >+@@ -53,15 +54,15 @@ >+ command.setValue (SHOWHELP) ; >+ return ; >+ } >+- else if (string (argv[1]) == "embed" || string (argv[1]) == "--embed") { >++ else if (std::string (argv[1]) == "embed" || std::string (argv[1]) == "--embed") { >+ command.setValue (EMBED) ; >+ setDefaults () ; >+ } >+- else if (string (argv[1]) == "extract" || string (argv[1]) == "--extract") { >++ else if (std::string (argv[1]) == "extract" || std::string (argv[1]) == "--extract") { >+ command.setValue (EXTRACT) ; >+ setDefaults () ; >+ } >+- else if (string (argv[1]) == "version" || string (argv[1]) == "--version") { >++ else if (std::string (argv[1]) == "version" || std::string (argv[1]) == "--version") { >+ command.setValue (SHOWVERSION) ; >+ if (argc > 2) { >+ Warning w (_("you cannot use arguments with the \"version\" command")) ; >+@@ -69,7 +70,7 @@ >+ } >+ return ; >+ } >+- else if (string (argv[1]) == "license" || string (argv[1]) == "--license") { >++ else if (std::string (argv[1]) == "license" || std::string (argv[1]) == "--license") { >+ command.setValue (SHOWLICENSE) ; >+ if (argc > 2) { >+ Warning w (_("you cannot use arguments with the \"license\" command")) ; >+@@ -77,7 +78,7 @@ >+ } >+ return ; >+ } >+- else if (string (argv[1]) == "help" || string (argv[1]) == "--help") { >++ else if (std::string (argv[1]) == "help" || std::string (argv[1]) == "--help") { >+ command.setValue (SHOWHELP) ; >+ if (argc > 2) { >+ Warning w (_("you cannot use arguments with the \"help\" command")) ; >+@@ -86,7 +87,7 @@ >+ return ; >+ } >+ #ifdef DEBUG >+- else if (string (argv[1]) == "test") { >++ else if (std::string (argv[1]) == "test") { >+ steghide_test_all () ; >+ exit (EXIT_SUCCESS) ; >+ } >+@@ -97,7 +98,7 @@ >+ >+ // parse rest of arguments >+ for (int i = 2; i < argc; i++) { >+- if (string (argv[i]) == "-d" || string (argv[i]) == "--distribution") { >++ if (std::string (argv[i]) == "-d" || std::string (argv[i]) == "--distribution") { >+ unsigned int tmp = 0 ; >+ >+ if (command.getValue() != EMBED) { >+@@ -112,7 +113,7 @@ >+ throw SteghideError (_("the argument \"%s\" is incomplete. type \"%s --help\" for help."), argv[i - 1], PROGNAME) ; >+ } >+ >+- if (string (argv[i]) == "cnsti") { >++ if (std::string (argv[i]) == "cnsti") { >+ dmtd.setValue (DMTD_CNSTI) ; >+ >+ if ((i + 1 < argc) && (argv[i + 1][0] != '-')) { >+@@ -127,7 +128,7 @@ >+ dmtdinfo.setValue (di) ; >+ } >+ } >+- else if (string (argv[i]) == "prndi") { >++ else if (std::string (argv[i]) == "prndi") { >+ dmtd.setValue (DMTD_PRNDI) ; >+ >+ if ((i + 1 < argc) && (argv[i + 1][0] != '-')) { >+@@ -147,7 +148,7 @@ >+ } >+ } >+ >+- else if (string (argv[i]) == "-e" || string (argv[i]) == "--encryption") { >++ else if (std::string (argv[i]) == "-e" || std::string (argv[i]) == "--encryption") { >+ if (command.getValue() != EMBED) { >+ throw SteghideError (_("the argument \"%s\" can only be used with the \"embed\" command. type \"%s --help\" for help."), argv[i], PROGNAME) ; >+ } >+@@ -159,7 +160,7 @@ >+ encryption.setValue (true) ; >+ } >+ >+- else if (string (argv[i]) == "-E" || string (argv[i]) == "--noencryption") { >++ else if (std::string (argv[i]) == "-E" || std::string (argv[i]) == "--noencryption") { >+ if (command.getValue () != EMBED) { >+ throw SteghideError (_("argument \"%s\" can only be used with the \"embed\" command. type \"%s --help\" for help."), argv[i], PROGNAME) ; >+ } >+@@ -171,7 +172,7 @@ >+ encryption.setValue (false) ; >+ } >+ >+- else if (string (argv[i]) == "-h" || string (argv[i]) == "--sthdrencryption") { >++ else if (std::string (argv[i]) == "-h" || std::string (argv[i]) == "--sthdrencryption") { >+ if (sthdrencryption.is_set()) { >+ throw SteghideError (_("the stego header encryption argument can be used only once. type \"%s --help\" for help."), PROGNAME) ; >+ } >+@@ -179,7 +180,7 @@ >+ sthdrencryption.setValue (true) ; >+ } >+ >+- else if (string (argv[i]) == "-H" || string (argv[i]) == "--nosthdrencryption") { >++ else if (std::string (argv[i]) == "-H" || std::string (argv[i]) == "--nosthdrencryption") { >+ if (sthdrencryption.is_set()) { >+ throw SteghideError (_("the stego header encryption argument can be used only once. type \"%s --help\" for help."), PROGNAME) ; >+ } >+@@ -187,7 +188,7 @@ >+ sthdrencryption.setValue (false) ; >+ } >+ >+- else if (string (argv[i]) == "-k" || string (argv[i]) == "--checksum") { >++ else if (std::string (argv[i]) == "-k" || std::string (argv[i]) == "--checksum") { >+ if (command.getValue() != EMBED) { >+ throw SteghideError (_("argument \"%s\" can only be used with the \"embed\" command. type \"%s --help\" for help."), argv[i], PROGNAME) ; >+ } >+@@ -199,7 +200,7 @@ >+ checksum.setValue (true) ; >+ } >+ >+- else if (string (argv[i]) == "-K" || string (argv[i]) == "--nochecksum") { >++ else if (std::string (argv[i]) == "-K" || std::string (argv[i]) == "--nochecksum") { >+ if (command.getValue() != EMBED) { >+ throw SteghideError (_("argument \"%s\" can only be used with the \"embed\" command. type \"%s --help\" for help."), argv[i], PROGNAME) ; >+ } >+@@ -211,7 +212,7 @@ >+ checksum.setValue (false) ; >+ } >+ >+- else if (string (argv[i]) == "-n" || string (argv[i]) == "--embedplainname") { >++ else if (std::string (argv[i]) == "-n" || std::string (argv[i]) == "--embedplainname") { >+ if (command.getValue() != EMBED) { >+ throw SteghideError (_("argument \"%s\" can only be used with the \"embed\" command. type \"%s --help\" for help."), argv[i], PROGNAME) ; >+ } >+@@ -223,7 +224,7 @@ >+ embedplnfn.setValue (true) ; >+ } >+ >+- else if (string (argv[i]) == "-N" || string (argv[i]) == "--notembedplainname") { >++ else if (std::string (argv[i]) == "-N" || std::string (argv[i]) == "--notembedplainname") { >+ if (command.getValue() != EMBED) { >+ throw SteghideError (_("argument \"%s\" can only be used with the \"embed\" command. type \"%s --help\" for help."), argv[i], PROGNAME) ; >+ } >+@@ -235,7 +236,7 @@ >+ embedplnfn.setValue (false) ; >+ } >+ >+- else if (string (argv[i]) == "-c" || string (argv[i]) == "--compatibility") { >++ else if (std::string (argv[i]) == "-c" || std::string (argv[i]) == "--compatibility") { >+ if (compatibility.is_set()) { >+ throw SteghideError (_("the compatibility argument can be used only once. type \"%s --help\" for help."), PROGNAME) ; >+ } >+@@ -243,7 +244,7 @@ >+ compatibility.setValue (true) ; >+ } >+ >+- else if (string (argv[i]) == "-p" || string (argv[i]) == "--passphrase") { >++ else if (std::string (argv[i]) == "-p" || std::string (argv[i]) == "--passphrase") { >+ if (passphrase.is_set()) { >+ throw SteghideError (_("the passphrase argument can be used only once. type \"%s --help\" for help."), PROGNAME) ; >+ } >+@@ -263,7 +264,7 @@ >+ } >+ } >+ >+- else if (string (argv[i]) == "-cf" || string (argv[i]) == "--coverfile") { >++ else if (std::string (argv[i]) == "-cf" || std::string (argv[i]) == "--coverfile") { >+ if (command.getValue() != EMBED) { >+ throw SteghideError (_("argument \"%s\" can only be used with the \"embed\" command. type \"%s --help\" for help."), argv[i], PROGNAME) ; >+ } >+@@ -276,7 +277,7 @@ >+ throw SteghideError (_("the \"%s\" argument must be followed by the cover file name. type \"%s --help\" for help."), argv[i - 1], PROGNAME) ; >+ } >+ >+- if (string (argv[i]) == "-") { >++ if (std::string (argv[i]) == "-") { >+ cvrfn.setValue ("") ; >+ } >+ else { >+@@ -284,7 +285,7 @@ >+ } >+ } >+ >+- else if (string (argv[i]) == "-sf" || string (argv[i]) == "--stegofile") { >++ else if (std::string (argv[i]) == "-sf" || std::string (argv[i]) == "--stegofile") { >+ if (stgfn.is_set()) { >+ throw SteghideError (_("the stego file name argument can be used only once. type \"%s --help\" for help."), PROGNAME) ; >+ } >+@@ -293,7 +294,7 @@ >+ throw SteghideError (_("the \"%s\" argument must be followed by the stego file name. type \"%s --help\" for help."), argv[i - 1], PROGNAME) ; >+ } >+ >+- if (string (argv[i]) == "-") { >++ if (std::string (argv[i]) == "-") { >+ stgfn.setValue ("") ; >+ } >+ else { >+@@ -301,7 +302,7 @@ >+ } >+ } >+ >+- else if (string (argv[i]) == "-pf" || string (argv[i]) == "--plainfile") { >++ else if (std::string (argv[i]) == "-pf" || std::string (argv[i]) == "--plainfile") { >+ if (plnfn.is_set()) { >+ throw SteghideError (_("the plain file name argument can be used only once. type \"%s --help\" for help."), PROGNAME) ; >+ } >+@@ -310,7 +311,7 @@ >+ throw SteghideError (_("the \"%s\" argument must be followed by the plain file name. type \"%s --help\" for help."), argv[i - 1], PROGNAME) ; >+ } >+ >+- if (string (argv[i]) == "-") { >++ if (std::string (argv[i]) == "-") { >+ plnfn.setValue ("") ; >+ } >+ else { >+@@ -318,7 +319,7 @@ >+ } >+ } >+ >+- else if (string (argv[i]) == "-f" || string (argv[i]) == "--force") { >++ else if (std::string (argv[i]) == "-f" || std::string (argv[i]) == "--force") { >+ if (force.is_set()) { >+ throw SteghideError (_("the force argument can be used only once. type \"%s --help\" for help."), PROGNAME) ; >+ } >+@@ -326,7 +327,7 @@ >+ force.setValue (true); >+ } >+ >+- else if (string (argv[i]) == "-q" || string (argv[i]) == "--quiet") { >++ else if (std::string (argv[i]) == "-q" || std::string (argv[i]) == "--quiet") { >+ if (verbosity.is_set()) { >+ throw SteghideError (_("the \"%s\" argument cannot be used here because the verbosity has already been set."), argv[i]) ; >+ } >+@@ -334,7 +335,7 @@ >+ verbosity.setValue (QUIET) ; >+ } >+ >+- else if (string (argv[i]) == "-v" || string (argv[i]) == "--verbose") { >++ else if (std::string (argv[i]) == "-v" || std::string (argv[i]) == "--verbose") { >+ if (verbosity.is_set()) { >+ throw SteghideError (_("the \"%s\" argument cannot be used here because the verbosity has already been set."), argv[i]) ; >+ } >Index: files/patch-src-aufile.cc >=================================================================== >RCS file: files/patch-src-aufile.cc >diff -N files/patch-src-aufile.cc >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ files/patch-src-aufile.cc 26 Sep 2002 20:54:56 -0000 >@@ -0,0 +1,34 @@ >+--- src/aufile.cc.orig Thu Sep 26 22:51:50 2002 >++++ src/aufile.cc Thu Sep 26 22:54:09 2002 >+@@ -23,6 +23,7 @@ >+ #include <cstdlib> >+ #include <cstring> >+ #include <vector> >++#include <string> >+ >+ #include <libintl.h> >+ #define _(S) gettext (S) >+@@ -51,12 +52,12 @@ >+ { >+ } >+ >+-vector<unsigned char> AuFile::getData (void) >++std::vector<unsigned char> AuFile::getData (void) >+ { >+ return data ; >+ } >+ >+-void AuFile::setData (vector<unsigned char> d) >++void AuFile::setData (std::vector<unsigned char> d) >+ { >+ data = d ; >+ } >+@@ -236,7 +237,7 @@ >+ void AuFile::writedata (void) >+ { >+ try { >+- for (vector<unsigned char>::iterator i = data.begin() ; i != data.end() ; i++) { >++ for (std::vector<unsigned char>::iterator i = data.begin() ; i != data.end() ; i++) { >+ getBinIO()->write8 (*i) ; >+ } >+ } >Index: files/patch-src-binaryio.cc >=================================================================== >RCS file: files/patch-src-binaryio.cc >diff -N files/patch-src-binaryio.cc >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ files/patch-src-binaryio.cc 26 Sep 2002 17:49:19 -0000 >@@ -0,0 +1,56 @@ >+--- src/binaryio.cc.orig Thu Sep 26 19:38:01 2002 >++++ src/binaryio.cc Thu Sep 26 19:47:54 2002 >+@@ -37,7 +37,7 @@ >+ set_open (false) ; >+ } >+ >+-BinaryIO::BinaryIO (string fn, MODE m) >++BinaryIO::BinaryIO (std::string fn, MODE m) >+ { >+ BinaryIO () ; >+ open (fn, m) ; >+@@ -60,12 +60,12 @@ >+ stream = s ; >+ } >+ >+-string BinaryIO::getName (void) >++std::string BinaryIO::getName (void) >+ { >+ return filename ; >+ } >+ >+-void BinaryIO::setName (string fn) >++void BinaryIO::setName (std::string fn) >+ { >+ filename = fn ; >+ } >+@@ -95,7 +95,7 @@ >+ mode = m ; >+ } >+ >+-void BinaryIO::open (string fn, MODE m) >++void BinaryIO::open (std::string fn, MODE m) >+ { >+ if (fn == "") { >+ switch (m) { >+@@ -243,9 +243,9 @@ >+ return ((bytes[0] << 24) | (bytes[1] << 16) | (bytes[2] << 8) | bytes[3]) ; >+ } >+ >+-string BinaryIO::readstring (unsigned int len) >++std::string BinaryIO::readstring (unsigned int len) >+ { >+- ostringstream ost ; >++ std::ostringstream ost ; >+ for (unsigned int i = 0 ; i < len ; i++) { >+ ost << read8() ; >+ } >+@@ -310,7 +310,7 @@ >+ } >+ } >+ >+-void BinaryIO::writestring (string s) >++void BinaryIO::writestring (std::string s) >+ { >+ if (fputs (s.c_str(), getStream()) == EOF) { >+ throw BinaryOutputError (getName()) ; >Index: files/patch-src-binaryio.h >=================================================================== >RCS file: files/patch-src-binaryio.h >diff -N files/patch-src-binaryio.h >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ files/patch-src-binaryio.h 26 Sep 2002 12:40:10 -0000 >@@ -0,0 +1,58 @@ >+--- src/binaryio.h.orig Thu Sep 26 14:38:10 2002 >++++ src/binaryio.h Thu Sep 26 14:39:22 2002 >+@@ -22,22 +22,21 @@ >+ #define SH_BINARYIO_H >+ >+ #include <stdio.h> >+-#include <string> >+ >+ class BinaryIO { >+ public: >+ enum MODE { READ, WRITE } ; >+ >+ BinaryIO (void) ; >+- BinaryIO (string fn, MODE m) ; >++ BinaryIO (std::string fn, MODE m) ; >+ ~BinaryIO (void) ; >+ >+- string getName (void) ; >++ std::string getName (void) ; >+ bool is_open (void) ; >+ bool is_std (void) ; >+ bool eof (void) ; >+ >+- void open (string fn, MODE m) ; >++ void open (std::string fn, MODE m) ; >+ void close (void) ; >+ >+ unsigned char read8 (void) ; >+@@ -45,25 +44,25 @@ >+ unsigned int read16_be (void) ; >+ unsigned long read32_le (void) ; >+ unsigned long read32_be (void) ; >+- string readstring (unsigned int len) ; >++ std::string readstring (unsigned int len) ; >+ >+ void write8 (unsigned char val) ; >+ void write16_le (unsigned int val) ; >+ void write16_be (unsigned int val) ; >+ void write32_le (unsigned long val) ; >+ void write32_be (unsigned long val) ; >+- void writestring (string s) ; >++ void writestring (std::string s) ; >+ >+ protected: >+ void setStream (FILE *s) ; >+ FILE *getStream (void) ; >+- void setName (string fn) ; >++ void setName (std::string fn) ; >+ void set_open (bool fo) ; >+ MODE getMode (void) ; >+ void setMode (BinaryIO::MODE m) ; >+ >+ private: >+- string filename ; >++ std::string filename ; >+ FILE *stream ; >+ bool fileopen ; >+ MODE mode ; >Index: files/patch-src-bmpfile.cc >=================================================================== >RCS file: files/patch-src-bmpfile.cc >diff -N files/patch-src-bmpfile.cc >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ files/patch-src-bmpfile.cc 26 Sep 2002 19:55:51 -0000 >@@ -0,0 +1,47 @@ >+--- src/bmpfile.cc.orig Thu Sep 26 21:46:06 2002 >++++ src/bmpfile.cc Thu Sep 26 21:54:46 2002 >+@@ -21,6 +21,8 @@ >+ #include <stdio.h> >+ #include <stdlib.h> >+ #include <assert.h> >++#include <string> >++#include <vector> >+ >+ #include <libintl.h> >+ #define _(S) gettext (S) >+@@ -305,7 +307,7 @@ >+ bmi_win.ncolors = bmi_win.bmih.biClrUsed ; >+ } >+ >+- bmi_win.colors = vector<RGBQUAD> (bmi_win.ncolors) ; >++ bmi_win.colors = std::vector<RGBQUAD> (bmi_win.ncolors) ; >+ for (unsigned int i = 0 ; i < bmi_win.ncolors ; i++) { >+ bmi_win.colors[i].rgbBlue = getBinIO()->read8() ; >+ bmi_win.colors[i].rgbGreen = getBinIO()->read8() ; >+@@ -371,7 +373,7 @@ >+ } >+ } >+ >+- bmi_os2.colors = vector<RGBTRIPLE> (bmi_os2.ncolors) ; >++ bmi_os2.colors = std::vector<RGBTRIPLE> (bmi_os2.ncolors) ; >+ for (unsigned int i = 0 ; i < bmi_os2.ncolors ; i++) { >+ bmi_os2.colors[i].rgbtBlue = getBinIO()->read8() ; >+ bmi_os2.colors[i].rgbtGreen = getBinIO()->read8() ; >+@@ -550,7 +552,7 @@ >+ paddinglength = 4 - (linelength % 4) ; >+ } >+ >+- bitmap = vector<vector<unsigned char> > (height) ; >++ bitmap = std::vector<std::vector<unsigned char> > (height) ; >+ for (long line = height - 1 ; line >= 0 ; line--) { >+ for (long posinline = 0 ; posinline < linelength ; posinline++) { >+ bitmap[line].push_back (getBinIO()->read8()) ; >+@@ -622,7 +624,7 @@ >+ } >+ } >+ >+- for (vector<unsigned char>::iterator i = atend.begin() ; i != atend.end() ; i++) { >++ for (std::vector<unsigned char>::iterator i = atend.begin() ; i != atend.end() ; i++) { >+ getBinIO()->write8 (*i) ; >+ } >+ } >Index: files/patch-src-cvrstgfile.cc >=================================================================== >RCS file: files/patch-src-cvrstgfile.cc >diff -N files/patch-src-cvrstgfile.cc >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ files/patch-src-cvrstgfile.cc 26 Sep 2002 20:08:15 -0000 >@@ -0,0 +1,30 @@ >+--- src/cvrstgfile.cc.orig Thu Sep 26 21:57:20 2002 >++++ src/cvrstgfile.cc Thu Sep 26 22:06:43 2002 >+@@ -20,7 +20,8 @@ >+ >+ #include <stdio.h> >+ #include <stdlib.h> >+-#include <string.h> >++#include <string> >++#include <vector> >+ #include <assert.h> >+ >+ #include <libintl.h> >+@@ -106,7 +107,7 @@ >+ } >+ >+ /* 'creates' a stego file from a cover file */ >+-void CvrStgFile::transform (string stgfn) >++void CvrStgFile::transform (std::string stgfn) >+ { >+ delete getBinIO() ; >+ setBinIO (new BinaryIO (stgfn, BinaryIO::WRITE)) ; >+@@ -144,7 +145,7 @@ >+ return retval ; >+ } >+ >+-CvrStgFile* CvrStgFile::readfile (string fn) >++CvrStgFile* CvrStgFile::readfile (std::string fn) >+ { >+ BinaryIO *BinIO = new BinaryIO (fn, BinaryIO::READ) ; >+ >Index: files/patch-src-error.cc >=================================================================== >RCS file: files/patch-src-error.cc >diff -N files/patch-src-error.cc >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ files/patch-src-error.cc 26 Sep 2002 21:02:19 -0000 >@@ -0,0 +1,52 @@ >+--- src/error.cc.orig Thu Sep 26 22:57:49 2002 >++++ src/error.cc Thu Sep 26 23:01:15 2002 >+@@ -37,7 +37,7 @@ >+ { >+ } >+ >+-SteghideError::SteghideError(string msg) >++SteghideError::SteghideError(std::string msg) >+ : MessageBase(msg) >+ { >+ } >+@@ -53,13 +53,13 @@ >+ >+ void SteghideError::printMessage (void) >+ { >+- cerr << PROGNAME << ": " << getMessage() << endl ; >++ std::cerr << PROGNAME << ": " << getMessage() << std::endl ; >+ } >+ >+ // >+ // class BinaryInputError >+ // >+-BinaryInputError::BinaryInputError (string fn, FILE* s) >++BinaryInputError::BinaryInputError (std::string fn, FILE* s) >+ : SteghideError() >+ { >+ if (feof (s)) { >+@@ -97,7 +97,7 @@ >+ // >+ // class BinaryOutputError >+ // >+-BinaryOutputError::BinaryOutputError (string fn) >++BinaryOutputError::BinaryOutputError (std::string fn) >+ : SteghideError() >+ { >+ if (fn == "") { >+@@ -142,12 +142,12 @@ >+ { >+ va_list ap ; >+ va_start (ap, msgfmt) ; >+- string auxmsg = vcompose (msgfmt, ap) ; >++ std::string auxmsg = vcompose (msgfmt, ap) ; >+ va_end (ap) ; >+ >+- string mainmsg ; >++ std::string mainmsg ; >+ if (io->is_std()) { >+- mainmsg = string (_("corrupt jpeg file on standard input:")) ; >++ mainmsg = std::string (_("corrupt jpeg file on standard input:")) ; >+ } >+ else { >+ mainmsg = compose (_("corrupt jpeg file \"%s\":"), io->getName().c_str()) ; >Index: files/patch-src-jpegbase.cc >=================================================================== >RCS file: files/patch-src-jpegbase.cc >diff -N files/patch-src-jpegbase.cc >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ files/patch-src-jpegbase.cc 26 Sep 2002 20:19:52 -0000 >@@ -0,0 +1,59 @@ >+--- src/jpegbase.cc.orig Thu Sep 26 22:09:33 2002 >++++ src/jpegbase.cc Thu Sep 26 22:18:35 2002 >+@@ -19,6 +19,8 @@ >+ */ >+ >+ #include <assert.h> >++#include <vector> >++#include <string> >+ >+ #include "binaryio.h" >+ #include "jpegbase.h" >+@@ -176,17 +178,17 @@ >+ >+ JpegContainer::~JpegContainer () >+ { >+- for (vector<JpegObject*>::iterator i = jpegobjs.begin() ; i != jpegobjs.end() ; i++) { >++ for (std::vector<JpegObject*>::iterator i = jpegobjs.begin() ; i != jpegobjs.end() ; i++) { >+ delete (*i) ; >+ } >+ } >+ >+-vector<JpegObject*> JpegContainer::getJpegObjects () >++std::vector<JpegObject*> JpegContainer::getJpegObjects () >+ { >+ return jpegobjs ; >+ } >+ >+-vector<CvrStgObject*> JpegContainer::getCvrStgObjects () >++std::vector<CvrStgObject*> JpegContainer::getCvrStgObjects () >+ { >+ return cvrstgobjs ; >+ } >+@@ -213,7 +215,7 @@ >+ void JpegContainer::write (BinaryIO *io) >+ { >+ // writing is only done here, not in derived classes >+- for (vector<JpegObject*>::iterator i = jpegobjs.begin() ; i != jpegobjs.end() ; i++) { >++ for (std::vector<JpegObject*>::iterator i = jpegobjs.begin() ; i != jpegobjs.end() ; i++) { >+ (*i)->write (io) ; >+ } >+ } >+@@ -222,7 +224,7 @@ >+ { >+ unsigned long sum = 0 ; >+ >+- for (vector<CvrStgObject*>::const_iterator i = cvrstgobjs.begin() ; i != cvrstgobjs.end() ; i++) { >++ for (std::vector<CvrStgObject*>::const_iterator i = cvrstgobjs.begin() ; i != cvrstgobjs.end() ; i++) { >+ sum += (*i)->getCapacity() ; >+ } >+ >+@@ -245,7 +247,7 @@ >+ CvrStgObject *JpegContainer::calcCvrStgObject (unsigned long *pos) const >+ { >+ unsigned long curCapacity = 0 ; >+- vector<CvrStgObject*>::const_iterator i = cvrstgobjs.begin() ; >++ std::vector<CvrStgObject*>::const_iterator i = cvrstgobjs.begin() ; >+ >+ curCapacity = (*i)->getCapacity() ; >+ while (*pos >= curCapacity) { >Index: files/patch-src-jpegentropycoded.cc >=================================================================== >RCS file: files/patch-src-jpegentropycoded.cc >diff -N files/patch-src-jpegentropycoded.cc >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ files/patch-src-jpegentropycoded.cc 26 Sep 2002 21:06:57 -0000 >@@ -0,0 +1,66 @@ >+--- src/jpegentropycoded.cc.orig Thu Sep 26 23:02:46 2002 >++++ src/jpegentropycoded.cc Thu Sep 26 23:05:21 2002 >+@@ -19,6 +19,8 @@ >+ */ >+ >+ #include <assert.h> >++#include <string> >++#include <vector> >+ >+ #include <libintl.h> >+ #define _(S) gettext (S) >+@@ -74,17 +76,17 @@ >+ { >+ } >+ >+-vector<vector <unsigned long> > JpegEntropyCoded::getFreqs () >++std::vector<std::vector <unsigned long> > JpegEntropyCoded::getFreqs () >+ { >+- vector<vector<unsigned long> > freq ; >++ std::vector<std::vector<unsigned long> > freq ; >+ >+ JpegScan *p_scan = (JpegScan *) getParent() ; >+ JpegScanHeader *p_scanhdr = (JpegScanHeader *) p_scan->getScanHeader() ; >+ JpegFrame *p_frame = (JpegFrame *) p_scan->getParent() ; >+ JpegFrameHeader *p_framehdr = (JpegFrameHeader *) p_frame->getFrameHeader() ; >+ >+- vector<unsigned int> dataunits ; >+- vector<unsigned int> htdestspec ; >++ std::vector<unsigned int> dataunits ; >++ std::vector<unsigned int> htdestspec ; >+ unsigned int maxdestspec = 0 ; >+ for (unsigned int comp = 0 ; comp < p_framehdr->getNumComponents() ; comp++) { >+ dataunits.push_back (p_framehdr->getHorizSampling (comp) * p_framehdr->getVertSampling (comp)) ; >+@@ -95,7 +97,7 @@ >+ } >+ >+ for (unsigned int destspec = 0 ; destspec <= maxdestspec ; destspec++) { >+- freq.push_back (vector<unsigned long> (257)) ; >++ freq.push_back (std::vector<unsigned long> (257)) ; >+ freq[destspec][256] = 1 ; >+ } >+ >+@@ -151,7 +153,7 @@ >+ JpegFrameHeader *p_framehdr = (JpegFrameHeader *) p_frame->getFrameHeader() ; >+ >+ unsigned long unitstart = 0 ; >+- vector<int> prediction ; >++ std::vector<int> prediction ; >+ for (unsigned int comp = 0 ; comp < p_framehdr->getNumComponents() ; comp++) { >+ prediction.push_back (0) ; >+ } >+@@ -228,10 +230,10 @@ >+ JpegFrame *p_frame = (JpegFrame *) p_scan->getParent() ; >+ JpegFrameHeader *p_framehdr = (JpegFrameHeader *) p_frame->getFrameHeader() ; >+ >+- vector<int> prediction ; >+- vector<JpegHuffmanTable*> DCTables ; >+- vector<JpegHuffmanTable*> ACTables ; >+- vector<unsigned int> dataunits ; >++ std::vector<int> prediction ; >++ std::vector<JpegHuffmanTable*> DCTables ; >++ std::vector<JpegHuffmanTable*> ACTables ; >++ std::vector<unsigned int> dataunits ; >+ for (unsigned int comp = 0 ; comp < p_framehdr->getNumComponents() ; comp++) { >+ prediction.push_back (0) ; >+ DCTables.push_back (p_frame->getDCTable (p_scanhdr->getDCDestSpec (comp))) ; >Index: files/patch-src-jpegfile.cc >=================================================================== >RCS file: files/patch-src-jpegfile.cc >diff -N files/patch-src-jpegfile.cc >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ files/patch-src-jpegfile.cc 26 Sep 2002 18:51:16 -0000 >@@ -0,0 +1,10 @@ >+--- src/jpegfile.cc.orig Thu Sep 26 20:50:05 2002 >++++ src/jpegfile.cc Thu Sep 26 20:50:33 2002 >+@@ -19,6 +19,7 @@ >+ */ >+ >+ #include <iostream> >++#include <vector> >+ >+ #include "cvrstgfile.h" >+ #include "jpegbase.h" >Index: files/patch-src-jpegframe.cc >=================================================================== >RCS file: files/patch-src-jpegframe.cc >diff -N files/patch-src-jpegframe.cc >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ files/patch-src-jpegframe.cc 26 Sep 2002 22:04:34 -0000 >@@ -0,0 +1,90 @@ >+--- src/jpegframe.cc.orig Thu Sep 26 23:59:23 2002 >++++ src/jpegframe.cc Fri Sep 27 00:04:28 2002 >+@@ -19,6 +19,8 @@ >+ */ >+ >+ #include <limits.h> >++#include <string> >++#include <vector> >+ >+ #include <libintl.h> >+ #define _(S) gettext (S) >+@@ -34,16 +36,16 @@ >+ : JpegContainer() >+ { >+ framehdr = NULL ; >+- ACTables = vector<JpegHuffmanTable*> (4) ; >+- DCTables = vector<JpegHuffmanTable*> (4) ; >++ ACTables = std::vector<JpegHuffmanTable*> (4) ; >++ DCTables = std::vector<JpegHuffmanTable*> (4) ; >+ } >+ >+ JpegFrame::JpegFrame (BinaryIO *io) >+ : JpegContainer() >+ { >+ framehdr = NULL ; >+- ACTables = vector<JpegHuffmanTable*> (4) ; >+- DCTables = vector<JpegHuffmanTable*> (4) ; >++ ACTables = std::vector<JpegHuffmanTable*> (4) ; >++ DCTables = std::vector<JpegHuffmanTable*> (4) ; >+ >+ read (io) ; >+ } >+@@ -164,24 +166,24 @@ >+ JpegContainer::write (io) ; >+ } >+ >+-void JpegFrame::recalcACTables (vector<vector <unsigned long> > freqs) >++void JpegFrame::recalcACTables (std::vector<std::vector <unsigned long> > freqs) >+ { >+- for (vector<JpegHuffmanTable*>::iterator ht = ACTables.begin() ; ht != ACTables.end() ; ht++) { >++ for (std::vector<JpegHuffmanTable*>::iterator ht = ACTables.begin() ; ht != ACTables.end() ; ht++) { >+ if (*ht != NULL) { >+- vector<unsigned int> codesize = calcCodeSize (freqs[(*ht)->getDestId()]) ; >+- vector<unsigned int> bits = calcBits (codesize) ; >+- vector<unsigned int> huffval = calcHuffVal (codesize) ; >++ std::vector<unsigned int> codesize = calcCodeSize (freqs[(*ht)->getDestId()]) ; >++ std::vector<unsigned int> bits = calcBits (codesize) ; >++ std::vector<unsigned int> huffval = calcHuffVal (codesize) ; >+ >+ (*ht)->reset (bits, huffval) ; >+ } >+ } >+ } >+ >+-vector<unsigned int> JpegFrame::calcCodeSize (vector<unsigned long> freq) >++std::vector<unsigned int> JpegFrame::calcCodeSize (std::vector<unsigned long> freq) >+ { >+- vector<unsigned int> codesize(257) ; >+- vector<long int> others(257) ; >+- for (vector<long int>::iterator j = others.begin() ; j != others.end() ; j++) { >++ std::vector<unsigned int> codesize(257) ; >++ std::vector<long int> others(257) ; >++ for (std::vector<long int>::iterator j = others.begin() ; j != others.end() ; j++) { >+ *j = -1 ; >+ } >+ >+@@ -230,9 +232,9 @@ >+ return codesize ; >+ } >+ >+-vector<unsigned int> JpegFrame::calcBits (vector<unsigned int> codesize) >++std::vector<unsigned int> JpegFrame::calcBits (std::vector<unsigned int> codesize) >+ { >+- vector<unsigned int> bits (33) ; >++ std::vector<unsigned int> bits (33) ; >+ >+ for (unsigned int i = 0 ; i < 257 ; i++) { >+ if (codesize[i] > 0) { >+@@ -275,9 +277,9 @@ >+ return bits ; >+ } >+ >+-vector<unsigned int> JpegFrame::calcHuffVal (vector<unsigned int> codesize) >++std::vector<unsigned int> JpegFrame::calcHuffVal (std::vector<unsigned int> codesize) >+ { >+- vector<unsigned int> huffval ; >++ std::vector<unsigned int> huffval ; >+ for (unsigned int i = 1 ; i <= 32 ; i++) { >+ for (unsigned j = 0 ; j <= 255 ; j++) { >+ if (codesize[j] == i) { >Index: files/patch-src-jpegframehder.cc >=================================================================== >RCS file: files/patch-src-jpegframehder.cc >diff -N files/patch-src-jpegframehder.cc >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ files/patch-src-jpegframehder.cc 26 Sep 2002 21:10:31 -0000 >@@ -0,0 +1,11 @@ >+--- src/jpegframehdr.cc.orig Thu Sep 26 23:07:32 2002 >++++ src/jpegframehdr.cc Thu Sep 26 23:09:26 2002 >+@@ -19,6 +19,8 @@ >+ */ >+ >+ #include <assert.h> >++#include <string> >++#include <vector> >+ >+ #include "jpegbase.h" >+ #include "jpegframehdr.h" >Index: files/patch-src-jpeghufftable.cc >=================================================================== >RCS file: files/patch-src-jpeghufftable.cc >diff -N files/patch-src-jpeghufftable.cc >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ files/patch-src-jpeghufftable.cc 26 Sep 2002 19:23:20 -0000 >@@ -0,0 +1,45 @@ >+--- src/jpeghufftable.cc.orig Thu Sep 26 21:02:04 2002 >++++ src/jpeghufftable.cc Thu Sep 26 21:22:37 2002 >+@@ -22,13 +22,14 @@ >+ #include <limits.h> >+ >+ #include <iostream> >++#include <vector> >+ >+ #include "error.h" >+ #include "binaryio.h" >+ #include "jpegbase.h" >+ #include "jpeghufftable.h" >+ >+-JpegHuffmanTable::JpegHuffmanTable (unsigned int lr = UINT_MAX) >++JpegHuffmanTable::JpegHuffmanTable (unsigned int lr ) >+ : JpegSegment (JpegElement::MarkerDHT) >+ { >+ tableclass = 0xFF ; >+@@ -36,7 +37,7 @@ >+ lengthremaining = lr ; >+ } >+ >+-JpegHuffmanTable::JpegHuffmanTable (BinaryIO *io, unsigned int lr = UINT_MAX) >++JpegHuffmanTable::JpegHuffmanTable (BinaryIO *io, unsigned int lr ) >+ : JpegSegment (JpegElement::MarkerDHT) >+ { >+ tableclass = 0xFF ; >+@@ -81,7 +82,7 @@ >+ return tabledestid ; >+ } >+ >+-void JpegHuffmanTable::reset (vector<unsigned int> b, vector<unsigned int> hv) >++void JpegHuffmanTable::reset (std::vector<unsigned int> b, std::vector<unsigned int> hv) >+ { >+ assert (b.size() == 16) ; >+ >+@@ -236,7 +237,7 @@ >+ for (unsigned int l = 1 ; l <= Len_bits ; l++) { >+ io->write8 ((unsigned char) getBits(l)) ; >+ } >+- vector<unsigned int>::iterator p = huffval.begin() ; >++ std::vector<unsigned int>::iterator p = huffval.begin() ; >+ for (unsigned int l = 1 ; l <= Len_bits ; l++) { >+ for (unsigned int j = 0 ; j < getBits (l) ; j++) { >+ io->write8 (*p) ; >Index: files/patch-src-jpegjfifapp0.cc >=================================================================== >RCS file: files/patch-src-jpegjfifapp0.cc >diff -N files/patch-src-jpegjfifapp0.cc >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ files/patch-src-jpegjfifapp0.cc 26 Sep 2002 20:32:23 -0000 >@@ -0,0 +1,10 @@ >+--- src/jpegjfifapp0.cc.orig Thu Sep 26 22:30:27 2002 >++++ src/jpegjfifapp0.cc Thu Sep 26 22:30:51 2002 >+@@ -19,6 +19,7 @@ >+ */ >+ >+ #include <string> >++#include <vector> >+ >+ #include <libintl.h> >+ #define _(S) gettext (S) >Index: files/patch-src-jpegrestart.cc >=================================================================== >RCS file: files/patch-src-jpegrestart.cc >diff -N files/patch-src-jpegrestart.cc >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ files/patch-src-jpegrestart.cc 26 Sep 2002 21:45:01 -0000 >@@ -0,0 +1,12 @@ >+--- src/jpegrestart.cc.orig Thu Sep 26 23:11:13 2002 >++++ src/jpegrestart.cc Thu Sep 26 23:42:51 2002 >+@@ -18,6 +18,9 @@ >+ * >+ */ >+ >++#include <vector> >++#include <string> >++ >+ #include "binaryio.h" >+ #include "jpegrestart.h" >+ >Index: files/patch-src-jpegscan.cc >=================================================================== >RCS file: files/patch-src-jpegscan.cc >diff -N files/patch-src-jpegscan.cc >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ files/patch-src-jpegscan.cc 26 Sep 2002 20:39:40 -0000 >@@ -0,0 +1,26 @@ >+--- src/jpegscan.cc.orig Thu Sep 26 21:26:56 2002 >++++ src/jpegscan.cc Thu Sep 26 21:30:37 2002 >+@@ -20,6 +20,7 @@ >+ >+ #include <vector> >+ #include <limits.h> >++#include <string> >+ >+ #include <libintl.h> >+ #define _(S) gettext (S) >+@@ -141,11 +142,11 @@ >+ } >+ } >+ >+-vector<vector <unsigned long> > JpegScan::getFreqs () >++std::vector<std::vector <unsigned long> > JpegScan::getFreqs () >+ { >+- vector<vector <unsigned long> > freqs = ECSegs[0]->getFreqs() ; >+- for (vector<JpegEntropyCoded*>::iterator i = ECSegs.begin() + 1 ; i != ECSegs.end() ; i++) { >+- vector<vector <unsigned long> > addfreqs = (*i)->getFreqs() ; >++ std::vector<std::vector <unsigned long> > freqs = ECSegs[0]->getFreqs() ; >++ for (std::vector<JpegEntropyCoded*>::iterator i = ECSegs.begin() + 1 ; i != ECSegs.end() ; i++) { >++ std::vector<std::vector <unsigned long> > addfreqs = (*i)->getFreqs() ; >+ for (unsigned int j = 0 ; j < addfreqs.size() ; j++) { >+ for (unsigned int k = 0 ; k < 256 ; k++) { >+ // don't touch freqs[j][256], must remain 1 >Index: files/patch-src-jpegscanhdr.cc >=================================================================== >RCS file: files/patch-src-jpegscanhdr.cc >diff -N files/patch-src-jpegscanhdr.cc >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ files/patch-src-jpegscanhdr.cc 26 Sep 2002 22:11:24 -0000 >@@ -0,0 +1,12 @@ >+--- src/jpegscanhdr.cc.orig Fri Sep 27 00:08:50 2002 >++++ src/jpegscanhdr.cc Fri Sep 27 00:09:36 2002 >+@@ -18,6 +18,9 @@ >+ * >+ */ >+ >++#include <string> >++#include <vector> >++ >+ #include "jpegbase.h" >+ #include "jpegscanhdr.h" >+ >Index: files/patch-src-jpegunusedseg.cc >=================================================================== >RCS file: files/patch-src-jpegunusedseg.cc >diff -N files/patch-src-jpegunusedseg.cc >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ files/patch-src-jpegunusedseg.cc 26 Sep 2002 21:48:42 -0000 >@@ -0,0 +1,19 @@ >+--- src/jpegunusedseg.cc.orig Thu Sep 26 23:45:27 2002 >++++ src/jpegunusedseg.cc Thu Sep 26 23:47:31 2002 >+@@ -19,6 +19,7 @@ >+ */ >+ >+ #include <vector> >++#include <string> >+ >+ #include "binaryio.h" >+ #include "jpegbase.h" >+@@ -56,7 +57,7 @@ >+ void JpegUnusedSegment::write (BinaryIO *io) >+ { >+ JpegSegment::write (io) ; >+- for (vector<unsigned char>::iterator i = data.begin() ; i != data.end() ; i++) { >++ for (std::vector<unsigned char>::iterator i = data.begin() ; i != data.end() ; i++) { >+ io->write8 (*i) ; >+ } >+ } >Index: files/patch-src-main.cc >=================================================================== >RCS file: files/patch-src-main.cc >diff -N files/patch-src-main.cc >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ files/patch-src-main.cc 26 Sep 2002 19:38:22 -0000 >@@ -0,0 +1,31 @@ >+--- src/main.cc.orig Thu Sep 26 21:33:15 2002 >++++ src/main.cc Thu Sep 26 21:36:48 2002 >+@@ -84,8 +84,8 @@ >+ static void version (void) ; >+ static void usage (void) ; >+ static void license (void) ; >+-static void embedfile (string cvrfilename, string stgfilename, string plnfilename) ; >+-static void extractfile (string stgfilename, string plnfilename) ; >++static void embedfile (std::string cvrfilename, std::string stgfilename, std::string plnfilename) ; >++static void extractfile (std::string stgfilename, std::string plnfilename) ; >+ static void cleanup (void) ; >+ >+ int main (int argc, char *argv[]) >+@@ -334,7 +334,7 @@ >+ } >+ >+ /* calls functions to embed plain data in cover data and save as stego data */ >+-static void embedfile (string cvrfilename, string stgfilename, string plnfilename) >++static void embedfile (std::string cvrfilename, std::string stgfilename, std::string plnfilename) >+ { >+ CvrStgFile *cvrstgfile = NULL ; >+ PLNFILE *plnfile = NULL ; >+@@ -372,7 +372,7 @@ >+ } >+ >+ /* calls functions to extract (and save) plain data from stego data */ >+-static void extractfile (string stgfilename, string plnfilename) >++static void extractfile (std::string stgfilename, std::string plnfilename) >+ { >+ PLNFILE *plnfile = NULL ; >+ unsigned long firstplnpos = 0 ; >Index: files/patch-src-msg.cc >=================================================================== >RCS file: files/patch-src-msg.cc >diff -N files/patch-src-msg.cc >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ files/patch-src-msg.cc 26 Sep 2002 20:51:17 -0000 >@@ -0,0 +1,149 @@ >+--- src/msg.cc.orig Thu Sep 26 22:42:25 2002 >++++ src/msg.cc Thu Sep 26 22:49:08 2002 >+@@ -22,6 +22,7 @@ >+ #include <cstdarg> >+ #include <cstdio> >+ #include <iostream> >++#include <string> >+ >+ #include <termios.h> >+ >+@@ -41,7 +42,7 @@ >+ setMessage (_("__no_message_defined__")) ; >+ } >+ >+-MessageBase::MessageBase (string msg) >++MessageBase::MessageBase (std::string msg) >+ { >+ setMessage (msg) ; >+ } >+@@ -58,12 +59,12 @@ >+ { >+ } >+ >+-string MessageBase::getMessage () >++std::string MessageBase::getMessage () >+ { >+ return message ; >+ } >+ >+-void MessageBase::setMessage (string msg) >++void MessageBase::setMessage (std::string msg) >+ { >+ message = msg ; >+ } >+@@ -76,20 +77,20 @@ >+ va_end (ap) ; >+ } >+ >+-string MessageBase::compose (const char *msgfmt, ...) >++std::string MessageBase::compose (const char *msgfmt, ...) >+ { >+ va_list ap ; >+ va_start (ap, msgfmt) ; >+- string retval = vcompose (msgfmt, ap) ; >++ std::string retval = vcompose (msgfmt, ap) ; >+ va_end (ap) ; >+ return retval ; >+ } >+ >+-string MessageBase::vcompose (const char *msgfmt, va_list ap) >++std::string MessageBase::vcompose (const char *msgfmt, va_list ap) >+ { >+ char *str = new char[MsgMaxSize] ; >+ vsnprintf (str, MsgMaxSize, msgfmt, ap) ; >+- return string (str) ; >++ return std::string (str) ; >+ } >+ >+ // >+@@ -109,7 +110,7 @@ >+ if (args->verbosity.getValue() == NORMAL || >+ args->verbosity.getValue() == VERBOSE) { >+ >+- cerr << getMessage() << endl ; >++ std::cerr << getMessage() << std::endl ; >+ } >+ } >+ >+@@ -128,7 +129,7 @@ >+ void VerboseMessage::printMessage () >+ { >+ if (args->verbosity.getValue() == VERBOSE) { >+- cerr << getMessage() << endl ; >++ std::cerr << getMessage() << std::endl ; >+ } >+ } >+ >+@@ -149,7 +150,7 @@ >+ if (args->verbosity.getValue() == NORMAL || >+ args->verbosity.getValue() == VERBOSE) { >+ >+- cerr << PROGNAME << _(": warning: ") << getMessage() << endl ; >++ std::cerr << PROGNAME << _(": warning: ") << getMessage() << std::endl ; >+ } >+ } >+ >+@@ -167,7 +168,7 @@ >+ >+ void CriticalWarning::printMessage () >+ { >+- cerr << PROGNAME << _(": warning: ") << getMessage() << endl ; >++ std::cerr << PROGNAME << _(": warning: ") << getMessage() << std::endl ; >+ } >+ >+ // >+@@ -176,22 +177,22 @@ >+ Question::Question (void) >+ : MessageBase() >+ { >+- yeschar = string (_("y")) ; >+- nochar = string (_("n")) ; >++ yeschar = std::string (_("y")) ; >++ nochar = std::string (_("n")) ; >+ } >+ >+-Question::Question (string msg) >++Question::Question (std::string msg) >+ : MessageBase (msg) >+ { >+- yeschar = string (_("y")) ; >+- nochar = string (_("n")) ; >++ yeschar = std::string (_("y")) ; >++ nochar = std::string (_("n")) ; >+ } >+ >+ Question::Question (const char *msgfmt, ...) >+ : MessageBase() >+ { >+- yeschar = string (_("y")) ; >+- nochar = string (_("n")) ; >++ yeschar = std::string (_("y")) ; >++ nochar = std::string (_("n")) ; >+ >+ va_list ap ; >+ va_start (ap, msgfmt) ; >+@@ -203,7 +204,7 @@ >+ { >+ assert (!stdin_isused()) ; >+ >+- cerr << getMessage() << " (" << yeschar << "/" << nochar << ") " ; >++ std::cerr << getMessage() << " (" << yeschar << "/" << nochar << ") " ; >+ } >+ >+ bool Question::getAnswer () >+@@ -212,11 +213,11 @@ >+ >+ struct termios oldattr = termios_singlekey_on () ; >+ char input[2] ; >+- input[0] = cin.get() ; >++ input[0] = std::cin.get() ; >+ input[1] = '\0' ; >+- bool retval = (string (input) == yeschar) ; >++ bool retval = (std::string (input) == yeschar) ; >+ termios_reset (oldattr) ; >+ >+- cerr << endl ; >++ std::cerr << std::endl ; >+ return retval ; >+ }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 42011
: 24574