now tito is using 'pikotools' (utf8)
git-svn-id: svn://ttmath.org/publicrep/tito/src@373 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
parent
929d5c3bca
commit
0555454dda
12
Makefile
12
Makefile
|
@ -1,26 +1,26 @@
|
||||||
include Makefile.o.dep
|
include Makefile.o.dep
|
||||||
|
|
||||||
|
libname=tito.a
|
||||||
|
|
||||||
all: tito.a
|
all: $(libname)
|
||||||
|
|
||||||
tito.a: $(o)
|
$(libname): $(o)
|
||||||
ar rcs tito.a $(o)
|
ar rcs $(libname) $(o)
|
||||||
|
|
||||||
|
|
||||||
%.o: %.cpp
|
%.o: %.cpp
|
||||||
$(CXX) -c $(CXXFLAGS) $<
|
$(CXX) -c $(CXXFLAGS) $<
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
depend:
|
depend:
|
||||||
makedepend $(CXXFLAGS) -Y. -f- *.cpp > Makefile.dep
|
makedepend -Y. -I../../pikotools -f- *.cpp > Makefile.dep
|
||||||
echo -n "o = " > Makefile.o.dep
|
echo -n "o = " > Makefile.o.dep
|
||||||
ls -1 *.cpp | xargs -I foo echo -n foo " " | sed -E "s/([^\.]*)\.cpp[ ]/\1\.o/g" >> Makefile.o.dep
|
ls -1 *.cpp | xargs -I foo echo -n foo " " | sed -E "s/([^\.]*)\.cpp[ ]/\1\.o/g" >> Makefile.o.dep
|
||||||
|
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f *.o
|
rm -f *.o
|
||||||
rm -f *.a
|
rm -f $(libname)
|
||||||
|
|
||||||
|
|
||||||
include Makefile.dep
|
include Makefile.dep
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
# DO NOT DELETE
|
# DO NOT DELETE
|
||||||
|
|
||||||
edanticaes.o: aes.h
|
aes.o: aes.h
|
||||||
edanticbase64.o: base64.h
|
base64.o: base64.h
|
||||||
edanticcrypto.o: crypto.h aes.h base64.h /home/tomek/roboczy/ezc/src/utf8.h
|
crypto.o: crypto.h aes.h base64.h ../../pikotools/utf8/utf8.h misc.h
|
||||||
edanticcrypto.o: misc.h
|
misc.o: misc.h
|
||||||
edanticmisc.o: misc.h
|
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
// !! FIX ME
|
// !! FIX ME
|
||||||
//#include "log.h"
|
//#include "log.h"
|
||||||
|
|
||||||
#include "../ezc/src/utf8.h"
|
#include "utf8/utf8.h"
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
|
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@ return true;
|
||||||
|
|
||||||
void Crypto::Crypt(const std::wstring & in, std::wstring & out)
|
void Crypto::Crypt(const std::wstring & in, std::wstring & out)
|
||||||
{
|
{
|
||||||
Ezc::WideToUTF8(in, utf8_str);
|
PT::WideToUTF8(in, utf8_str);
|
||||||
aes.Encode((const unsigned char*)utf8_str.c_str(), utf8_str.size(), aes_name, uint8_tab);
|
aes.Encode((const unsigned char*)utf8_str.c_str(), utf8_str.size(), aes_name, uint8_tab);
|
||||||
|
|
||||||
base64_str.clear();
|
base64_str.clear();
|
||||||
|
@ -99,7 +99,7 @@ bool Crypto::Decrypt(const std::wstring & in, std::wstring & out)
|
||||||
if( aes.Decode((const unsigned char *)aes_str.c_str(), aes_str.size(), aes_tmp_name, uint8_tab) )
|
if( aes.Decode((const unsigned char *)aes_str.c_str(), aes_str.size(), aes_tmp_name, uint8_tab) )
|
||||||
{
|
{
|
||||||
if( !uint8_tab.empty() )
|
if( !uint8_tab.empty() )
|
||||||
Ezc::UTF8ToWide((const char*)&uint8_tab[0], uint8_tab.size(), out);
|
PT::UTF8ToWide((const char*)&uint8_tab[0], uint8_tab.size(), out);
|
||||||
|
|
||||||
Clear();
|
Clear();
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in New Issue