mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-27 05:10:36 +00:00
Update to 0.5.1
This commit is contained in:
parent
fce81d08ea
commit
a2f328dedd
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=91962
@ -6,10 +6,10 @@
|
||||
#
|
||||
|
||||
PORTNAME= steghide
|
||||
PORTVERSION= 0.4.6.b
|
||||
PORTREVISION= 1
|
||||
PORTVERSION= 0.5.1
|
||||
CATEGORIES= security
|
||||
MASTER_SITES= http://steghide.sourceforge.net/download/
|
||||
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
|
||||
MASTER_SITE_SUBDIR= steghide
|
||||
DISTNAME= ${PORTNAME}-${PORTVERSION:S/.b/b/}
|
||||
|
||||
MAINTAINER= arved@FreeBSD.org
|
||||
@ -19,6 +19,8 @@ LIB_DEPENDS= mcrypt.8:${PORTSDIR}/security/libmcrypt \
|
||||
mhash.2:${PORTSDIR}/security/mhash \
|
||||
intl.5:${PORTSDIR}/devel/gettext
|
||||
|
||||
USE_PERL5= yes
|
||||
USE_LIBTOOL= yes
|
||||
GNU_CONFIGURE= yes
|
||||
CONFIGURE_TARGET=
|
||||
CONFIGURE_ARGS= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
|
||||
@ -34,17 +36,7 @@ post-patch:
|
||||
${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
|
||||
${REINPLACE_CMD} -e 's,SHELL) libtool,SHELL) ${LIBTOOL},' \
|
||||
${WRKSRC}/src/Makefile.in
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
@ -1 +1 @@
|
||||
MD5 (steghide-0.4.6b.tar.gz) = 72be8f0cdd6c0d03c455f6854eeb5a2b
|
||||
MD5 (steghide-0.5.1.tar.gz) = 5be490e24807d921045780fd8cc446b3
|
||||
|
@ -1,13 +0,0 @@
|
||||
--- Makefile.in.orig Tue May 14 08:50:09 2002
|
||||
+++ Makefile.in Sat Aug 10 22:12:35 2002
|
||||
@@ -99,8 +99,8 @@
|
||||
|
||||
EXTRA_DIST = ABOUT-NLS BUGS CREDITS HISTORY depcomp
|
||||
SUBDIRS = doc intl po src
|
||||
-docdir = $(prefix)/doc/$(PACKAGE)-$(VERSION)
|
||||
-doc_DATA = ABOUT-NLS BUGS COPYING CREDITS HISTORY INSTALL README TODO
|
||||
+docdir = $(prefix)/share/doc/$(PACKAGE)
|
||||
+doc_DATA = BUGS CREDITS HISTORY README TODO
|
||||
subdir = .
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
@ -1,10 +0,0 @@
|
||||
--- 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)
|
@ -1,255 +0,0 @@
|
||||
--- src/arguments.cc.orig Tue May 14 07:48:06 2002
|
||||
+++ src/arguments.cc Wed Aug 13 10:40:26 2003
|
||||
@@ -19,6 +19,8 @@
|
||||
*/
|
||||
|
||||
#include <iostream>
|
||||
+#include <string>
|
||||
+#include <assert.h>
|
||||
|
||||
#include <libintl.h>
|
||||
#define _(S) gettext (S)
|
||||
@@ -53,15 +55,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 +71,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 +79,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 +88,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 +99,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 +114,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 +129,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 +149,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 +161,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 +173,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 +181,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 +189,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 +201,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 +213,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 +225,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 +237,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 +245,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 +265,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 +278,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 +286,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 +295,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 +303,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 +312,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 +320,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 +328,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 +336,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]) ;
|
||||
}
|
@ -1,34 +0,0 @@
|
||||
--- 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) ;
|
||||
}
|
||||
}
|
@ -1,64 +0,0 @@
|
||||
--- src/binaryio.cc.orig Mon May 13 22:48:06 2002
|
||||
+++ src/binaryio.cc Thu Jul 17 14:27:14 2003
|
||||
@@ -20,6 +20,7 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <sstream>
|
||||
+#include <assert.h>
|
||||
|
||||
#include <libintl.h>
|
||||
#define _(S) gettext (S)
|
||||
@@ -37,7 +38,7 @@
|
||||
set_open (false) ;
|
||||
}
|
||||
|
||||
-BinaryIO::BinaryIO (string fn, MODE m)
|
||||
+BinaryIO::BinaryIO (std::string fn, MODE m)
|
||||
{
|
||||
BinaryIO () ;
|
||||
open (fn, m) ;
|
||||
@@ -60,12 +61,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 +96,7 @@
|
||||
mode = m ;
|
||||
}
|
||||
|
||||
-void BinaryIO::open (string fn, MODE m)
|
||||
+void BinaryIO::open (std::string fn, MODE m)
|
||||
{
|
||||
if (fn == "") {
|
||||
switch (m) {
|
||||
@@ -243,9 +244,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 +311,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
-void BinaryIO::writestring (string s)
|
||||
+void BinaryIO::writestring (std::string s)
|
||||
{
|
||||
if (fputs (s.c_str(), getStream()) == EOF) {
|
||||
throw BinaryOutputError (getName()) ;
|
@ -1,58 +0,0 @@
|
||||
--- 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 ;
|
@ -1,47 +0,0 @@
|
||||
--- 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) ;
|
||||
}
|
||||
}
|
@ -1,30 +0,0 @@
|
||||
--- 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) ;
|
||||
|
@ -1,52 +0,0 @@
|
||||
--- 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()) ;
|
@ -1,59 +0,0 @@
|
||||
--- 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) {
|
@ -1,66 +0,0 @@
|
||||
--- 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))) ;
|
@ -1,12 +0,0 @@
|
||||
--- src/jpegfile.cc.orig Tue May 14 07:48:06 2002
|
||||
+++ src/jpegfile.cc Wed Aug 13 10:22:19 2003
|
||||
@@ -19,6 +19,9 @@
|
||||
*/
|
||||
|
||||
#include <iostream>
|
||||
+#include <vector>
|
||||
+#include <string>
|
||||
+#include <assert.h>
|
||||
|
||||
#include "cvrstgfile.h"
|
||||
#include "jpegbase.h"
|
@ -1,91 +0,0 @@
|
||||
--- src/jpegframe.cc.orig Tue May 14 07:48:06 2002
|
||||
+++ src/jpegframe.cc Wed Aug 13 11:12:33 2003
|
||||
@@ -19,6 +19,9 @@
|
||||
*/
|
||||
|
||||
#include <limits.h>
|
||||
+#include <string>
|
||||
+#include <vector>
|
||||
+#include <assert.h>
|
||||
|
||||
#include <libintl.h>
|
||||
#define _(S) gettext (S)
|
||||
@@ -34,16 +37,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 +167,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 +233,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 +278,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) {
|
@ -1,11 +0,0 @@
|
||||
--- 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"
|
@ -1,46 +0,0 @@
|
||||
--- src/jpeghufftable.cc.orig Tue May 14 07:48:06 2002
|
||||
+++ src/jpeghufftable.cc Mon Sep 23 18:39:13 2002
|
||||
@@ -22,13 +22,15 @@
|
||||
#include <limits.h>
|
||||
|
||||
#include <iostream>
|
||||
+#include <vector>
|
||||
+#include <string>
|
||||
|
||||
#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 +38,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 +83,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 +238,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) ;
|
@ -1,10 +0,0 @@
|
||||
--- 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)
|
@ -1,12 +0,0 @@
|
||||
--- 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"
|
||||
|
@ -1,27 +0,0 @@
|
||||
--- src/jpegscan.cc.orig Tue May 14 07:48:06 2002
|
||||
+++ src/jpegscan.cc Wed Aug 13 10:27:45 2003
|
||||
@@ -20,6 +20,8 @@
|
||||
|
||||
#include <vector>
|
||||
#include <limits.h>
|
||||
+#include <string>
|
||||
+#include <assert.h>
|
||||
|
||||
#include <libintl.h>
|
||||
#define _(S) gettext (S)
|
||||
@@ -141,11 +143,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
|
@ -1,13 +0,0 @@
|
||||
--- src/jpegscanhdr.cc.orig Tue May 14 07:48:06 2002
|
||||
+++ src/jpegscanhdr.cc Wed Aug 13 10:51:43 2003
|
||||
@@ -18,6 +18,10 @@
|
||||
*
|
||||
*/
|
||||
|
||||
+#include <string>
|
||||
+#include <vector>
|
||||
+#include <assert.h>
|
||||
+
|
||||
#include "jpegbase.h"
|
||||
#include "jpegscanhdr.h"
|
||||
|
@ -1,19 +0,0 @@
|
||||
--- 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) ;
|
||||
}
|
||||
}
|
@ -1,31 +0,0 @@
|
||||
--- 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 ;
|
@ -1,149 +0,0 @@
|
||||
--- 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 ;
|
||||
}
|
@ -2,8 +2,11 @@ bin/steghide
|
||||
%%PORTDOCS%%share/doc/steghide/BUGS
|
||||
%%PORTDOCS%%share/doc/steghide/CREDITS
|
||||
%%PORTDOCS%%share/doc/steghide/HISTORY
|
||||
%%PORTDOCS%%share/doc/steghide/LEAME
|
||||
%%PORTDOCS%%share/doc/steghide/README
|
||||
%%PORTDOCS%%share/doc/steghide/TODO
|
||||
share/locale/de/LC_MESSAGES/steghide.mo
|
||||
share/locale/es/LC_MESSAGES/steghide.mo
|
||||
share/locale/fr/LC_MESSAGES/steghide.mo
|
||||
share/locale/ro/LC_MESSAGES/steghide.mo
|
||||
%%PORTDOCS%%@dirrm share/doc/steghide
|
||||
|
Loading…
Reference in New Issue
Block a user