Commit 2c340e59 authored by Vysheng's avatar Vysheng

Detached libtgl

parent f45458c3
[submodule "tgl"]
path = tgl
url = https://github.com/vysheng/tgl.git
...@@ -10,24 +10,16 @@ EXTRA_LIBS=@LIBS@ @EXTRA_LIBS@ @OPENSSL_LIBS@ ...@@ -10,24 +10,16 @@ EXTRA_LIBS=@LIBS@ @EXTRA_LIBS@ @OPENSSL_LIBS@
LOCAL_LDFLAGS=-rdynamic -ggdb -levent ${EXTRA_LIBS} LOCAL_LDFLAGS=-rdynamic -ggdb -levent ${EXTRA_LIBS}
LINK_FLAGS=${LDFLAGS} ${LOCAL_LDFLAGS} LINK_FLAGS=${LDFLAGS} ${LOCAL_LDFLAGS}
DEP=${srcdir}/dep DEP=dep
AUTO=${srcdir}/auto AUTO=auto
EXE=${srcdir}/bin EXE=bin
OBJ=${srcdir}/objs OBJ=objs
LIB=${srcdir}/libs LIB=libs
DIR_LIST=${DEP} ${AUTO} ${EXE} ${OBJ} ${LIB} ${DEP}/auto ${OBJ}/auto DIR_LIST=${DEP} ${AUTO} ${EXE} ${OBJ} ${LIB} ${DEP}/auto ${OBJ}/auto
EXE_LIST=${EXE}/generate ${EXE}/tlc ${EXE}/telegram-cli EXE_LIST=${EXE}/telegram-cli
LIB_LIST=${LIB}/libtgl.a
TG_OBJECTS=${OBJ}/main.o ${OBJ}/loop.o ${OBJ}/interface.o ${OBJ}/net.o ${OBJ}/lua-tg.o ${OBJ}/tgl-timers.o TG_OBJECTS=${OBJ}/main.o ${OBJ}/loop.o ${OBJ}/interface.o ${OBJ}/lua-tg.o
TGL_OBJECTS=${OBJ}/mtproto-common.o ${OBJ}/mtproto-client.o ${OBJ}/queries.o ${OBJ}/structures.o ${OBJ}/binlog.o ${OBJ}/auto/auto.o ${OBJ}/tgl.o ${OBJ}/updates.o
TLC_OBJECTS=${OBJ}/tlc.o ${OBJ}/tl-parser.o ${OBJ}/crc32.o
TLD_OBJECTS=${OBJ}/dump-tl-file.o
GENERATE_OBJECTS=${OBJ}/generate.o
COMMON_OBJECTS=${OBJ}/tools.o
OBJ_LIST=${TG_OBJECTS} ${TLC_OBJECTS} ${GENERATE_OBJECTS} ${COMMON_OBJECTS} ${TGL_OBJECTS} ${TLD_OBJECTS}
OBJ_C=${TLC_OBJECTS} ${GENERATE_OBJECTS} ${COMMON_OBJECTS} ${TGL_OBJECTS} ${TLD_OBJECTS}
DEPENDENCE=$(subst ${OBJ}/,${DEP}/,$(patsubst %.o,%.d,${OBJ_LIST})) DEPENDENCE=$(subst ${OBJ}/,${DEP}/,$(patsubst %.o,%.d,${OBJ_LIST}))
DEPENDENCE_LIST=${DEPENDENCE} DEPENDENCE_LIST=${DEPENDENCE}
...@@ -39,56 +31,24 @@ CC=@CC@ ...@@ -39,56 +31,24 @@ CC=@CC@
.SUFFIXES: .c .h .o .SUFFIXES: .c .h .o
all: ${EXE_LIST} ${DIR_LIST} ${LIB_LIST} all: ${EXE_LIST} ${DIR_LIST}
create_dirs_and_headers: ${DIR_LIST} ${AUTO}/auto.c ${AUTO}/auto-header.h ${AUTO}/constants.h create_dirs_and_headers: ${DIR_LIST} ${AUTO}/auto.c ${AUTO}/auto-header.h ${AUTO}/constants.h
create_dirs: ${DIR_LIST} create_dirs: ${DIR_LIST}
dump-tl: ${EXE}/dump-tl-file dump-tl: ${EXE}/dump-tl-file
include ${srcdir}/Makefile.tl-parser
include ${srcdir}/Makefile.tgl
${DIR_LIST}: ${DIR_LIST}:
@test -d $@ || mkdir -p $@ @test -d $@ || mkdir -p $@
-include ${DEPENDENCE_LIST} -include ${DEPENDENCE_LIST}
${TG_OBJECTS} ${TGL_OBJECTS}: ${AUTO}/constants.h ${AUTO}/auto-header.h
${TG_OBJECTS}: ${OBJ}/%.o: %.c | create_dirs_and_headers ${TG_OBJECTS}: ${OBJ}/%.o: %.c | create_dirs_and_headers
${CC} ${INCLUDE} ${COMPILE_FLAGS} -c -MP -MD -MF ${DEP}/$*.d -MQ ${OBJ}/$*.o -o $@ $< ${CC} ${INCLUDE} ${COMPILE_FLAGS} -c -MP -MD -MF ${DEP}/$*.d -MQ ${OBJ}/$*.o -o $@ $<
${OBJ_C}: ${OBJ}/%.o: %.c | create_dirs ${EXE}/telegram-cli: ${TG_OBJECTS} ${LIB}/libtgl.a
${CC} ${INCLUDE} ${COMPILE_FLAGS} -c -MP -MD -MF ${DEP}/$*.d -MQ ${OBJ}/$*.o -o $@ $< ${CC} $^ ${LINK_FLAGS} -o $@
${EXE}/tlc: ${TLC_OBJECTS} ${COMMON_OBJECTS}
${CC} ${TLC_OBJECTS} ${COMMON_OBJECTS} ${LINK_FLAGS} -o $@
${EXE}/telegram-cli: ${TG_OBJECTS} ${COMMON_OBJECTS} ${LIB}/libtgl.a
${CC} ${TG_OBJECTS} ${COMMON_OBJECTS} ${LINK_FLAGS} -L${LIB} -l tgl -o $@
${LIB}/libtgl.a: ${TGL_OBJECTS} ${COMMON_OBJECTS}
ar ruv $@ ${TGL_OBJECTS} ${COMMON_OBJECTS}
${EXE}/generate: ${GENERATE_OBJECTS} ${COMMON_OBJECTS}
${CC} ${GENERATE_OBJECTS} ${COMMON_OBJECTS} ${LINK_FLAGS} -o $@
${AUTO}/scheme.tlo: ${AUTO}/scheme.tl ${EXE}/tlc
${EXE}/tlc -e $@ ${AUTO}/scheme.tl
${AUTO}/scheme.tl: ${srcdir}/scheme.tl ${srcdir}/encrypted_scheme.tl ${srcdir}/binlog.tl ${srcdir}/append.tl | ${AUTO}
cat $^ > $@
${AUTO}/scheme2.tl: ${AUTO}/scheme.tl ${EXE}/tlc
${EXE}/tlc -E ${AUTO}/scheme.tl 2> $@ || ( cat $@ && rm $@ && false )
${AUTO}/auto.c: ${AUTO}/scheme.tlo ${EXE}/generate
${EXE}/generate ${AUTO}/scheme.tlo > $@
${AUTO}/auto-header.h: ${AUTO}/scheme.tlo ${EXE}/generate
${EXE}/generate -H ${AUTO}/scheme.tlo > $@
${AUTO}/constants.h: ${AUTO}/scheme2.tl ${srcdir}/gen_constants_h.awk
awk -f ${srcdir}/gen_constants_h.awk < $< > $@
${EXE}/dump-tl-file: ${OBJ}/auto/auto.o ${TLD_OBJECTS}
${CC} ${OBJ}/auto/auto.o ${TLD_OBJECTS} ${LINK_FLAGS} -o $@
clean: clean:
rm -rf ${DIR_LIST} config.log config.status > /dev/null || echo "all clean" rm -rf ${DIR_LIST} config.log config.status > /dev/null || echo "all clean"
......
TGL_OBJECTS=${OBJ}/mtproto-common.o ${OBJ}/mtproto-client.o ${OBJ}/queries.o ${OBJ}/structures.o ${OBJ}/binlog.o ${OBJ}/tgl.o ${OBJ}/updates.o ${OBJ}/tgl-net.o ${OBJ}/tgl-timers.o
TLD_OBJECTS=${OBJ}/dump-tl-file.o
GENERATE_OBJECTS=${OBJ}/generate.o
TGL_COMMON_OBJECTS=${OBJ}/tools.o
TGL_OBJ_C=${GENERATE_OBJECTS} ${TGL_COMMON_OBJECTS} ${TGL_OBJECTS} ${TLD_OBJECTS}
.SUFFIXES:
.SUFFIXES: .c .h .o
dump-tl: ${EXE}/dump-tl-file
${OBJ}/auto/auto.o ${TGL_OBJECTS}: ${AUTO}/constants.h ${AUTO}/auto-header.h
${TGL_OBJ_C}: ${OBJ}/%.o: ${srcdir}/tgl/%.c | create_dirs
${CC} ${INCLUDE} ${COMPILE_FLAGS} -iquote ${srcdir}/tgl -c -MP -MD -MF ${DEP}/$*.d -MQ ${OBJ}/$*.o -o $@ $<
${OBJ}/auto/auto.o: ${AUTO}/auto.c
${CC} ${INCLUDE} ${COMPILE_FLAGS} -iquote ${srcdir}/tgl -c -MP -MD -MF ${DEP}/auto/auto.d -MQ ${OBJ}/auto/auto.o -o $@ $<
${LIB}/libtgl.a: ${TGL_OBJECTS} ${TGL_COMMON_OBJECTS} ${OBJ}/auto/auto.o
ar ruv $@ $^
${EXE}/generate: ${GENERATE_OBJECTS} ${TGL_COMMON_OBJECTS}
${CC} ${GENERATE_OBJECTS} ${TGL_COMMON_OBJECTS} ${LINK_FLAGS} -o $@
${AUTO}/scheme.tlo: ${AUTO}/scheme.tl ${EXE}/tl-parser
${EXE}/tl-parser -e $@ ${AUTO}/scheme.tl
${AUTO}/scheme.tl: ${srcdir}/tgl/scheme.tl ${srcdir}/tgl/encrypted_scheme.tl ${srcdir}/tgl/binlog.tl ${srcdir}/tgl/append.tl | ${AUTO}
cat $^ > $@
${AUTO}/scheme2.tl: ${AUTO}/scheme.tl ${EXE}/tl-parser
${EXE}/tl-parser -E ${AUTO}/scheme.tl 2> $@ || ( cat $@ && rm $@ && false )
${AUTO}/auto.c: ${AUTO}/scheme.tlo ${EXE}/generate
${EXE}/generate ${AUTO}/scheme.tlo > $@
${AUTO}/auto-header.h: ${AUTO}/scheme.tlo ${EXE}/generate
${EXE}/generate -H ${AUTO}/scheme.tlo > $@
${AUTO}/constants.h: ${AUTO}/scheme2.tl ${srcdir}/tgl/gen_constants_h.awk
awk -f ${srcdir}/tgl/gen_constants_h.awk < $< > $@
${EXE}/dump-tl-file: ${OBJ}/auto/auto.o ${TLD_OBJECTS}
${CC} ${OBJ}/auto/auto.o ${TLD_OBJECTS} ${LINK_FLAGS} -o $@
TL_PARSER_OBJECTS=${OBJ}/tl-parser.o ${OBJ}/tlc.o ${OBJ}/crc32.o
${TL_PARSER_OBJECTS}: ${OBJ}/%.o: ${srcdir}/tgl/tl-parser/%.c | create_dirs
${CC} ${INCLUDE} ${COMPILE_FLAGS} -iquote ${srcdir}/tgl/tl-parser -c -MP -MD -MF ${DEP}/$*.d -MQ ${OBJ}/$*.o -o $@ $<
${EXE}/tl-parser: ${TL_PARSER_OBJECTS}
${CC} $^ ${LINK_FLAGS} -o $@
...@@ -22,12 +22,7 @@ Fourth, in peer_name '#' are substitued to '@'. (Not applied to appending of '#% ...@@ -22,12 +22,7 @@ Fourth, in peer_name '#' are substitued to '@'. (Not applied to appending of '#%
Clone GitHub Repository Clone GitHub Repository
git clone https://github.com/vysheng/tg.git && cd tg git clone --recursive https://github.com/vysheng/tg.git && cd tg
or download and extract zip
wget https://github.com/vysheng/tg/archive/master.zip -O tg-master.zip
unzip tg-master.zip && cd tg-master
#### Linux and BSDs #### Linux and BSDs
......
decryptedMessageMediaVideoL12#4cee6ef3 thumb:bytes thumb_w:int thumb_h:int duration:int w:int h:int size:int key:bytes iv:bytes = DecryptedMessageMedia;
decryptedMessageMediaAudioL12#6080758f duration:int size:int key:bytes iv:bytes = DecryptedMessageMedia;
---types---
binlog.fileLocation dc:int volume:long local_id:int secret:long = binlog.FileLocation;
binlog.chatParticipant user:int inviter:int date:int = binlog.ChatParticipant;
binlog.start = binlog.Update;
binlog.dcOption id:int name:string ip:string port:int = binlog.Update;
binlog.authKey dc:int key_id:long key:64*[int] = binlog.Update;
binlog.defaultDc dc:int = binlog.Update;
binlog.ourId id:int = binlog.Update;
binlog.dcSigned id:int = binlog.Update;
binlog.dcSalt id:int salt:long = binlog.Update;
binlog.setDhParams root:int prime:64*[int] version:int = binlog.Update;
binlog.setPts pts:int = binlog.Update;
binlog.setQts qts:int = binlog.Update;
binlog.setDate date:int = binlog.Update;
binlog.setSeq seq:int = binlog.Update;
binlog.userAdd id:int first_name:string last_name:string hash:long phone:string is_contact:int = binlog.Update;
binlog.userDelete id:int = binlog.Update;
binlog.userSetAccessHash id:int hash:long = binlog.Update;
binlog.userSetPhone id:int phone:string = binlog.Update;
binlog.userSetFriend id:int friend:int = binlog.Update;
binlog.userSetFullPhoto id:int photo:Photo = binlog.Update;
binlog.userSetBlocked id:int blocked:int = binlog.Update;
binlog.userSetRealName id:int real_first_name:string real_last_name:string = binlog.Update;
binlog.userSetName id:int first_name:string last_name:string = binlog.Update;
binlog.userSetPhoto id:int photo:UserProfilePhoto = binlog.Update;
binlog.userSetUsername id:int username:string = binlog.Update;
binlog.encrChatDelete id:int = binlog.Update;
binlog.encrChatRequested id:int hash:long date:int admin:int user:int key:64*[int] nonce:64*[int] = binlog.Update;
binlog.encrChatAccepted id:int key:64*[int] nonce:64*[int] fingerprint:long = binlog.Update;
binlog.encrChatInit id:int user:int key:64*[int] g_key:64*[int] = binlog.Update;
binlog.encrChatCreate id:int user_id:int admin_id:int name:string = binlog.Update;
binlog.encrChatSetAccessHash id:int hash:long = binlog.Update;
binlog.encrChatSetDate id:int date:int = binlog.Update;
binlog.encrChatSetTtl id:int ttl:int = binlog.Update;
binlog.encrChatSetLayer id:int layer:int = binlog.Update;
binlog.encrChatSetState id:int state:int = binlog.Update;
binlog.encrChatSetKey id:int key:64*[int] fingerprint:long = binlog.Update;
binlog.encrChatUpdateSeq id:int in_seq_no:int out_seq_no:int = binlog.Update;
binlog.encrChatSetSeq id:int in_seq_no:int last_in_seq_no:int out_seq_no:int = binlog.Update;
binlog.chatCreate id:int flags:int title:string user_num:int date:int version:int photo_big:%binlog.FileLocation photo_small:%binlog.FileLocation = binlog.Update;
binlog.chatChangeFlags id:int set_flags:int clear_flags:int = binlog.Update;
binlog.chatSetTitle id:int title:string = binlog.Update;
binlog.chatSetPhoto id:int photo_big:%binlog.FileLocation photo_small:%binlog.FileLocation = binlog.Update;
binlog.chatSetDate id:int date:int = binlog.Update;
binlog.chatSetVersion id:int version:int users_num:int = binlog.Update;
binlog.chatSetAdmin id:int admin:int = binlog.Update;
binlog.chatSetParticipants id:int version:int participants:%(Vector %binlog.ChatParticipant) = binlog.Update;
binlog.chatSetFullPhoto id:int photo:Photo = binlog.Update;
binlog.chatAddParticipant id:int version:int user:%binlog.ChatParticipant = binlog.Update;
binlog.chatDelParticipant id:int version:int user:int = binlog.Update;
binlog.createMessageText id:int from_id:int to_type:int to_id:int date:int unread:int text:string = binlog.Update;
binlog.sendMessageText id:long from_id:int to_type:int to_id:int date:int text:string = binlog.Update;
binlog.sendMessageActionEncr id:long from_id:int to_type:int to_id:int date:int action:DecryptedMessageAction = binlog.Update;
binlog.createMessageTextFwd id:int from_id:int to_type:int to_id:int date:int fwd_from_id:int fwd_date:int unread:int text:string = binlog.Update;
binlog.createMessageMedia id:int from_id:int to_type:int to_id:int date:int unread:int text:string media:MessageMedia = binlog.Update;
binlog.createMessageMediaEncr id:long from_id:int to_type:int to_id:int date:int text:string media:DecryptedMessageMedia file:EncryptedFile = binlog.Update;
binlog.createMessageMediaEncrPending id:long from_id:int to_type:int to_id:int date:int text:string media:DecryptedMessageMedia = binlog.Update;
binlog.createMessageMediaEncrSent id:long file:EncryptedFile = binlog.Update;
binlog.createMessageMediaFwd id:int from_id:int to_type:int to_id:int date:int fwd_from_id:int fwd_date:int unread:int text:string media:MessageMedia = binlog.Update;
binlog.createMessageService id:int from_id:int to_type:int to_id:int date:int unread:int action:MessageAction = binlog.Update;
binlog.createMessageServiceEncr id:long from_id:int to_type:int to_id:int date:int action:DecryptedMessageAction = binlog.Update;
binlog.createMessageServiceFwd id:int from_id:int to_type:int to_id:int date:int fwd_from_id:int fwd_date:int unread:int action:MessageAction = binlog.Update;
binlog.messageSetUnread id:int = binlog.Update;
binlog.messageSetUnreadLong id:long = binlog.Update;
binlog.setMessageSent id:long = binlog.Update;
binlog.setMsgId old_id:long new_id:int = binlog.Update;
binlog.deleteMsg id:long = binlog.Update;
binlog.msgSeqUpdate id:long = binlog.Update;
binlog.msgUpdate id:long = binlog.Update;
binlog.resetAuthorization = binlog.Update;
//binlog.addDc id:int ip:string port:int auth_key_id:long auth_key:64*[int] = binlog.Update;
This diff is collapsed.
/*
This file is part of VK/KittenPHP-DB-Engine Library.
VK/KittenPHP-DB-Engine Library is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
VK/KittenPHP-DB-Engine Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with VK/KittenPHP-DB-Engine Library. If not, see <http://www.gnu.org/licenses/>.
Copyright 2009-2012 Vkontakte Ltd
2009-2012 Nikolai Durov
2009-2012 Andrei Lopatin
2012 Anton Maydell
*/
#ifndef __CRC32_H__
#define __CRC32_H__
#ifdef __cplusplus
extern "C" {
#endif
extern unsigned int crc32_table[256];
unsigned crc32_partial (const void *data, int len, unsigned crc);
//unsigned crc32_partial_fast (const void *data, int len, unsigned crc);
//unsigned crc32_partial_fastest (const void *data, int len, unsigned crc);
unsigned compute_crc32 (const void *data, int len);
unsigned compute_crc32_combine (unsigned crc1, unsigned crc2, int len2);
extern unsigned long long crc64_table[256];
unsigned long long crc64_partial (const void *data, int len, unsigned long long crc);
unsigned long long crc64 (const void *data, int len);
//unsigned gf32_matrix_times (unsigned *matrix, unsigned vector);
/* crc32_check_and_repair returns
0 : Cyclic redundancy check is ok
1 : Cyclic redundancy check fails, but we fix one bit in input
2 : Cyclic redundancy check fails, but we fix one bit in input_crc32
-1 : Cyclic redundancy check fails, no repair possible.
In this case *input_crc32 will be equal crc32 (input, l)
Case force_exit == 1 (case 1, 2: kprintf call, case -1: assert fail).
*/
int crc32_check_and_repair (void *input, int l, unsigned *input_crc32, int force_exit);
#ifdef __cplusplus
}
#endif
#endif
encrypted_scheme17.tl
\ No newline at end of file
---types---
decryptedMessageLayer#99a438cf layer:int message:DecryptedMessage = DecryptedMessageLayer;
decryptedMessage#1f814f1f random_id:long random_bytes:bytes message:string media:DecryptedMessageMedia = DecryptedMessage;
decryptedMessageService#aa48327d random_id:long random_bytes:bytes action:DecryptedMessageAction = DecryptedMessage;
decryptedMessageMediaEmpty#89f5c4a = DecryptedMessageMedia;
decryptedMessageMediaPhoto#32798a8c thumb:bytes thumb_w:int thumb_h:int w:int h:int size:int key:bytes iv:bytes = DecryptedMessageMedia;
//decryptedMessageMediaVideo#4cee6ef3 thumb:bytes thumb_w:int thumb_h:int duration:int w:int h:int size:int key:bytes iv:bytes = DecryptedMessageMedia;
decryptedMessageMediaGeoPoint#35480a59 lat:double long:double = DecryptedMessageMedia;
decryptedMessageMediaContact#588a0a97 phone_number:string first_name:string last_name:string user_id:int = DecryptedMessageMedia;
decryptedMessageActionSetMessageTTL#a1733aec ttl_seconds:int = DecryptedMessageAction;
decryptedMessageMediaDocument#b095434b thumb:bytes thumb_w:int thumb_h:int file_name:string mime_type:string size:int key:bytes iv:bytes = DecryptedMessageMedia;
//decryptedMessageMediaAudio#6080758f duration:int size:int key:bytes iv:bytes = DecryptedMessageMedia;
decryptedMessageMediaVideo#524a415d thumb:bytes thumb_w:int thumb_h:int duration:int mime_type:string w:int h:int size:int key:bytes iv:bytes = DecryptedMessageMedia;
decryptedMessageMediaAudio#57e0a9cb duration:int mime_type:string size:int key:bytes iv:bytes = DecryptedMessageMedia;
decryptedMessageActionReadMessages#c4f40be random_ids:Vector<long> = DecryptedMessageAction;
decryptedMessageActionDeleteMessages#65614304 random_ids:Vector<long> = DecryptedMessageAction;
decryptedMessageActionScreenshotMessages#8ac1f475 random_ids:Vector<long> = DecryptedMessageAction;
decryptedMessageActionFlushHistory#6719e45c = DecryptedMessageAction;
decryptedMessageActionNotifyLayer#f3048883 layer:int = DecryptedMessageAction;
---functions---
---types---
decryptedMessageLayer#1be31789 layer:int message:DecryptedMessage = DecryptedMessageLayer;
decryptedMessage_l16#1f814f1f random_id:long random_bytes:bytes message:string media:DecryptedMessageMedia = DecryptedMessage;
decryptedMessageService_l16#aa48327d random_id:long random_bytes:bytes action:DecryptedMessageAction = DecryptedMessage;
decryptedMessage#204d3878 in_seq_no:int out_seq_no:int ttl:int random_id:long random_bytes:bytes message:string media:DecryptedMessageMedia = DecryptedMessage;
decryptedMessageService#73164160 in_seq_no:int out_seq_no:int random_id:long random_bytes:bytes action:DecryptedMessageAction = DecryptedMessage;
decryptedMessageMediaEmpty#89f5c4a = DecryptedMessageMedia;
decryptedMessageMediaPhoto#32798a8c thumb:bytes thumb_w:int thumb_h:int w:int h:int size:int key:bytes iv:bytes = DecryptedMessageMedia;
//decryptedMessageMediaVideo#4cee6ef3 thumb:bytes thumb_w:int thumb_h:int duration:int w:int h:int size:int key:bytes iv:bytes = DecryptedMessageMedia;
decryptedMessageMediaGeoPoint#35480a59 lat:double long:double = DecryptedMessageMedia;
decryptedMessageMediaContact#588a0a97 phone_number:string first_name:string last_name:string user_id:int = DecryptedMessageMedia;
decryptedMessageActionSetMessageTTL#a1733aec ttl_seconds:int = DecryptedMessageAction;
decryptedMessageMediaDocument#b095434b thumb:bytes thumb_w:int thumb_h:int file_name:string mime_type:string size:int key:bytes iv:bytes = DecryptedMessageMedia;
//decryptedMessageMediaAudio#6080758f duration:int size:int key:bytes iv:bytes = DecryptedMessageMedia;
decryptedMessageMediaVideo#524a415d thumb:bytes thumb_w:int thumb_h:int duration:int mime_type:string w:int h:int size:int key:bytes iv:bytes = DecryptedMessageMedia;
decryptedMessageMediaAudio#57e0a9cb duration:int mime_type:string size:int key:bytes iv:bytes = DecryptedMessageMedia;
decryptedMessageActionReadMessages#c4f40be random_ids:Vector<long> = DecryptedMessageAction;
decryptedMessageActionDeleteMessages#65614304 random_ids:Vector<long> = DecryptedMessageAction;
decryptedMessageActionScreenshotMessages#8ac1f475 random_ids:Vector<long> = DecryptedMessageAction;
decryptedMessageActionFlushHistory#6719e45c = DecryptedMessageAction;
decryptedMessageActionNotifyLayer#f3048883 layer:int = DecryptedMessageAction;
decryptedMessageActionResend#511110b0 start_seq_no:int end_seq_no:int = DecryptedMessageAction;
decryptedMessageActionTyping#ccb27641 action:SendMessageAction = DecryptedMessageAction;
---functions---
BEGIN {
print "/*";
print " This file is part of telegram-client.";
print "";
print " Telegram-client is free software: you can redistribute it and/or modify";
print " it under the terms of the GNU General Public License as published by";
print " the Free Software Foundation, either version 2 of the License, or";
print " (at your option) any later version.";
print "";
print " Telegram-client is distributed in the hope that it will be useful,";
print " but WITHOUT ANY WARRANTY; without even the implied warranty of";
print " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the";
print " GNU General Public License for more details.";
print "";
print " You should have received a copy of the GNU General Public License";
print " along with this telegram-client. If not, see <http://www.gnu.org/licenses/>.";
print "";
print " Copyright Vitaly Valtman 2013";
print "*/";
print "#ifndef CONSTANTS_H";
print "#define CONSTANTS_H";
}
// {
if (split ($1, a, "#") == 2) {
gsub (/[ABCDEFGHIJKLMNOPQRSTUVWXYZ]/, "_&", a[1]);
gsub (/[.]/, "_", a[1]);
if (a[2] in h) {
print "ERROR: Duplicate magic " a[2] " for define " a[1] " and " h[a[2]] >"/dev/stderr/"
exit 1;
}
h[a[2]] = a[1];
print "#define", "CODE_" tolower(a[1]), "0x" a[2];
}
}
END {
print "#endif";
}
This diff is collapsed.
/*
This file is part of tgl-libary/generate
Tgl-library/generate is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
Tgl-library/generate is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this tgl-library/generate. If not, see <http://www.gnu.org/licenses/>.
Copyright Vitaly Valtman 2014
It is derivative work of VK/KittenPHP-DB-Engine (https://github.com/vk-com/kphp-kdb/)
Copyright 2012-2013 Vkontakte Ltd
2012-2013 Vitaliy Valtman
*/
#ifndef __GENERATE_H__
#define __GENERATE_H__
struct tl_combinator;
struct tl_type {
// struct tl_type_methods *methods;
char *id;
char *print_id;
unsigned name;
int arity;
int flags;
int constructors_num;
struct tl_combinator **constructors;
long long params_types;
int extra;
};
#define NODE_TYPE_TYPE 1
#define NODE_TYPE_NAT_CONST 2
#define NODE_TYPE_VAR_TYPE 3
#define NODE_TYPE_VAR_NUM 4
#define NODE_TYPE_ARRAY 5
#define MAX_COMBINATOR_VARS 64
#define NAME_VAR_NUM 0x70659eff
#define NAME_VAR_TYPE 0x2cecf817
#define NAME_INT 0xa8509bda
#define NAME_LONG 0x22076cba
#define NAME_DOUBLE 0x2210c154
#define NAME_STRING 0xb5286e24
#define NAME_VECTOR 0x1cb5c415
#define NAME_MAYBE_TRUE 0x3f9c8ef8
#define NAME_MAYBE_FALSE 0x27930a7b
#define NAME_BOOL_FALSE 0xbc799737
#define NAME_BOOL_TRUE 0x997275b5
#define FLAG_OPT_VAR (1 << 17)
#define FLAG_EXCL (1 << 18)
#define FLAG_OPT_FIELD (1 << 20)
#define FLAG_NOVAR (1 << 21)
#define FLAG_BARE 1
#define FLAGS_MASK ((1 << 16) - 1)
#define FLAG_DEFAULT_CONSTRUCTOR (1 << 25)
#define FLAG_NOCONS (1 << 1)
extern struct tl_tree_methods tl_nat_const_methods;
extern struct tl_tree_methods tl_nat_const_full_methods;
extern struct tl_tree_methods tl_pnat_const_full_methods;
extern struct tl_tree_methods tl_array_methods;
extern struct tl_tree_methods tl_type_methods;
extern struct tl_tree_methods tl_parray_methods;
extern struct tl_tree_methods tl_ptype_methods;
extern struct tl_tree_methods tl_var_num_methods;
extern struct tl_tree_methods tl_var_type_methods;
extern struct tl_tree_methods tl_pvar_num_methods;
extern struct tl_tree_methods tl_pvar_type_methods;
#define TL_IS_NAT_VAR(x) (((long)x) & 1)
#define TL_TREE_METHODS(x) (TL_IS_NAT_VAR (x) ? &tl_nat_const_methods : ((struct tl_tree *)(x))->methods)
#define DEC_REF(x) (TL_TREE_METHODS(x)->dec_ref ((void *)x))
#define INC_REF(x) (TL_TREE_METHODS(x)->inc_ref ((void *)x))
#define TYPE(x) (TL_TREE_METHODS(x)->type ((void *)x))
typedef unsigned long long tl_tree_hash_t;
struct tl_tree;
struct tl_tree_methods {
int (*type)(struct tl_tree *T);
int (*eq)(struct tl_tree *T, struct tl_tree *U);
void (*inc_ref)(struct tl_tree *T);
void (*dec_ref)(struct tl_tree *T);
};
struct tl_tree {
int ref_cnt;
int flags;
//tl_tree_hash_t hash;
struct tl_tree_methods *methods;
};
/*
struct tl_tree_nat_const {
struct tl_tree self;
int value;
};*/
struct tl_tree_type {
struct tl_tree self;
struct tl_type *type;
int children_num;
struct tl_tree **children;
};
struct tl_tree_array {
struct tl_tree self;
struct tl_tree *multiplicity;
int args_num;
struct arg **args;
};
struct tl_tree_var_type {
struct tl_tree self;
int var_num;
};
struct tl_tree_var_num {
struct tl_tree self;
int var_num;
int dif;
};
struct tl_tree_nat_const {
struct tl_tree self;
long long value;
};
struct arg {
char *id;
int var_num;
int flags;
int exist_var_num;
int exist_var_bit;
struct tl_tree *type;
};
struct tl_combinator {
//struct tl_combinator_methods *methods;
char *id;
char *print_id;
unsigned name;
int is_fun;
int var_num;
int args_num;
struct arg **args;
struct tl_tree *result;
void **IP;
void **fIP;
int IP_len;
int fIP_len;
};
#endif
/*
This file is part of telegram-client.
Telegram-client is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
Telegram-client is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this telegram-client. If not, see <http://www.gnu.org/licenses/>.
Copyright Vitaly Valtman 2013
*/
#ifndef __INCLUDE_H__
#define __INCLUDE_H__
#define UU __attribute__ ((unused))
#endif
...@@ -38,7 +38,6 @@ ...@@ -38,7 +38,6 @@
#endif #endif
#include <unistd.h> #include <unistd.h>
#include "include.h"
//#include "queries.h" //#include "queries.h"
#include "interface.h" #include "interface.h"
...@@ -62,7 +61,7 @@ ...@@ -62,7 +61,7 @@
//#include "mtproto-common.h" //#include "mtproto-common.h"
#include "tgl.h" #include <tgl/tgl.h>
#include "loop.h" #include "loop.h"
#ifndef PATH_MAX #ifndef PATH_MAX
...@@ -496,7 +495,7 @@ char *get_default_prompt (void) { ...@@ -496,7 +495,7 @@ char *get_default_prompt (void) {
return buf; return buf;
} }
char *complete_none (const char *text UU, int state UU) { char *complete_none (const char *text, int state) {
return 0; return 0;
} }
...@@ -1371,7 +1370,7 @@ char *command_generator (const char *text, int state) { ...@@ -1371,7 +1370,7 @@ char *command_generator (const char *text, int state) {
} }
} }
char **complete_text (char *text, int start UU, int end UU) { char **complete_text (char *text, int start, int end) {
return (char **) rl_completion_matches (text, command_generator); return (char **) rl_completion_matches (text, command_generator);
} }
...@@ -2045,7 +2044,7 @@ struct tgl_update_callback upd_cb = { ...@@ -2045,7 +2044,7 @@ struct tgl_update_callback upd_cb = {
}; };
void interpreter_ex (char *line UU, void *ex) { void interpreter_ex (char *line, void *ex) {
force_end_mode = 1; force_end_mode = 1;
assert (!in_readline); assert (!in_readline);
in_readline = 1; in_readline = 1;
...@@ -2279,7 +2278,7 @@ void interpreter_ex (char *line UU, void *ex) { ...@@ -2279,7 +2278,7 @@ void interpreter_ex (char *line UU, void *ex) {
in_readline = 0; in_readline = 0;
} }
void interpreter (char *line UU) { void interpreter (char *line) {
interpreter_ex (line, 0); interpreter_ex (line, 0);
} }
......
...@@ -18,8 +18,8 @@ ...@@ -18,8 +18,8 @@
*/ */
#ifndef __INTERFACE_H__ #ifndef __INTERFACE_H__
#define __INTERFACE_H__ #define __INTERFACE_H__
#include "structures.h" #include <tgl/tgl-structures.h>
#include "tgl-layout.h" #include <tgl/tgl-layout.h>
#define COLOR_RED "\033[0;31m" #define COLOR_RED "\033[0;31m"
#define COLOR_REDB "\033[1;31m" #define COLOR_REDB "\033[1;31m"
......
...@@ -57,10 +57,10 @@ ...@@ -57,10 +57,10 @@
#include "telegram.h" #include "telegram.h"
#include "loop.h" #include "loop.h"
#include "lua-tg.h" #include "lua-tg.h"
#include "tgl.h" #include <tgl/tgl.h>
#include "binlog.h" #include <tgl/tgl-binlog.h>
#include "net.h" #include <tgl/tgl-net.h>
#include "tgl-timers.h" #include <tgl/tgl-timers.h>
int verbosity; int verbosity;
extern int readline_disabled; extern int readline_disabled;
...@@ -708,6 +708,7 @@ int loop (void) { ...@@ -708,6 +708,7 @@ int loop (void) {
tgl_set_ev_base (TLS, ev); tgl_set_ev_base (TLS, ev);
tgl_set_net_methods (TLS, &tgl_conn_methods); tgl_set_net_methods (TLS, &tgl_conn_methods);
tgl_set_timer_methods (TLS, &tgl_libevent_timers); tgl_set_timer_methods (TLS, &tgl_libevent_timers);
assert (TLS->timer_methods);
tgl_set_download_directory (TLS, get_downloads_directory ()); tgl_set_download_directory (TLS, get_downloads_directory ());
tgl_init (TLS); tgl_init (TLS);
......
...@@ -24,7 +24,6 @@ ...@@ -24,7 +24,6 @@
#ifdef USE_LUA #ifdef USE_LUA
#include "lua-tg.h" #include "lua-tg.h"
#include "include.h"
#include <string.h> #include <string.h>
#include <stdlib.h> #include <stdlib.h>
...@@ -42,7 +41,7 @@ lua_State *luaState; ...@@ -42,7 +41,7 @@ lua_State *luaState;
//#include "interface.h" //#include "interface.h"
//#include "auto/constants.h" //#include "auto/constants.h"
#include "tgl.h" #include <tgl/tgl.h>
#include "interface.h" #include "interface.h"
#include <assert.h> #include <assert.h>
...@@ -52,7 +51,7 @@ extern struct tgl_state *TLS; ...@@ -52,7 +51,7 @@ extern struct tgl_state *TLS;
static int have_file; static int have_file;
#define my_lua_checkstack(L,x) assert (lua_checkstack (L, x)) #define my_lua_checkstack(L,x) assert (lua_checkstack (L, x))
void push_user (tgl_peer_t *P UU); void push_user (tgl_peer_t *P);
void push_peer (tgl_peer_id_t id, tgl_peer_t *P); void push_peer (tgl_peer_id_t id, tgl_peer_t *P);
void lua_add_string_field (const char *name, const char *value) { void lua_add_string_field (const char *name, const char *value) {
...@@ -96,7 +95,7 @@ void push_tgl_peer_type (int x) { ...@@ -96,7 +95,7 @@ void push_tgl_peer_type (int x) {
} }
} }
void push_user (tgl_peer_t *P UU) { void push_user (tgl_peer_t *P) {
my_lua_checkstack (luaState, 4); my_lua_checkstack (luaState, 4);
lua_add_string_field ("first_name", P->user.first_name); lua_add_string_field ("first_name", P->user.first_name);
lua_add_string_field ("last_name", P->user.last_name); lua_add_string_field ("last_name", P->user.last_name);
...@@ -387,7 +386,7 @@ void lua_our_id (int id) { ...@@ -387,7 +386,7 @@ void lua_our_id (int id) {
} }
} }
void lua_new_msg (struct tgl_message *M UU) { void lua_new_msg (struct tgl_message *M) {
if (!have_file) { return; } if (!have_file) { return; }
lua_settop (luaState, 0); lua_settop (luaState, 0);
//lua_checkstack (luaState, 20); //lua_checkstack (luaState, 20);
......
...@@ -20,8 +20,7 @@ ...@@ -20,8 +20,7 @@
#define __LUA_TG_H__ #define __LUA_TG_H__
#include <string.h> #include <string.h>
#include "lua-tg.h" #include <tgl/tgl.h>
#include "tgl.h"
void lua_init (const char *file); void lua_init (const char *file);
void lua_new_msg (struct tgl_message *M); void lua_new_msg (struct tgl_message *M);
......
...@@ -64,13 +64,13 @@ ...@@ -64,13 +64,13 @@
#include "telegram.h" #include "telegram.h"
#include "loop.h" #include "loop.h"
#include "interface.h" #include "interface.h"
#include "tools.h" #include <tgl/tools.h>
#ifdef USE_LUA #ifdef USE_LUA
# include "lua-tg.h" # include "lua-tg.h"
#endif #endif
#include "tgl.h" #include <tgl/tgl.h>
#define PROGNAME "telegram-cli" #define PROGNAME "telegram-cli"
#define VERSION "0.07" #define VERSION "0.07"
......
This diff is collapsed.
/*
This file is part of tgl-library
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Copyright Nikolay Durov, Andrey Lopatin 2012-2013
Vitaly Valtman 2013-2014
*/
#ifndef __MTPROTO_CLIENT_H__
#define __MTPROTO_CLIENT_H__
//#include "net.h"
#include <openssl/bn.h>
//void on_start (void);
//..long long encrypt_send_message (struct connection *c, int *msg, int msg_ints, int useful);
//void dc_authorize (struct tgl_dc *DC);
//void work_update (struct connection *c, long long msg_id);
//void work_update_binlog (void);
//int check_g (unsigned char p[256], BIGNUM *g);
//int check_g_bn (BIGNUM *p, BIGNUM *g);
//int check_DH_params (BIGNUM *p, int g);
//void secure_random (void *s, int l);
#include "tgl.h"
struct connection;
struct tgl_dc;
//#include "queries.h"
#define TG_APP_HASH "36722c72256a24c1225de00eb6a1ca74"
#define TG_APP_ID 2899
#define ACK_TIMEOUT 1
#define MAX_DC_ID 10
struct connection;
long long tglmp_encrypt_send_message (struct tgl_state *TLS, struct connection *c, int *msg, int msg_ints, int flags);
void tglmp_dc_create_session (struct tgl_state *TLS, struct tgl_dc *DC);
int tglmp_check_g (struct tgl_state *TLS, unsigned char p[256], BIGNUM *g);
int tglmp_check_DH_params (struct tgl_state *TLS, BIGNUM *p, int g);
struct tgl_dc *tglmp_alloc_dc (struct tgl_state *TLS, int id, char *ip, int port);
void tglmp_regenerate_temp_auth_key (struct tgl_state *TLS, struct tgl_dc *D);
void tgln_insert_msg_id (struct tgl_state *TLS, struct tgl_session *S, long long id);
void tglmp_on_start (struct tgl_state *TLS);
void tgl_dc_authorize (struct tgl_state *TLS, struct tgl_dc *DC);
void tgls_free_dc (struct tgl_state *TLS, struct tgl_dc *DC);
void tgls_free_pubkey (struct tgl_state *TLS);
#endif
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/*
This file is part of tgl-library
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Copyright Vitaly Valtman 2013-2014
*/
#ifndef __NET_H__
#define __NET_H__
struct connection_buffer {
unsigned char *start;
unsigned char *end;
unsigned char *rptr;
unsigned char *wptr;
struct connection_buffer *next;
};
enum conn_state {
conn_none,
conn_connecting,
conn_ready,
conn_failed,
conn_stopped
};
struct connection {
int fd;
char *ip;
int port;
int flags;
enum conn_state state;
int ipv6[4];
struct connection_buffer *in_head;
struct connection_buffer *in_tail;
struct connection_buffer *out_head;
struct connection_buffer *out_tail;
int in_bytes;
int out_bytes;
int packet_num;
int out_packet_num;
int last_connect_time;
int in_fail_timer;
struct mtproto_methods *methods;
struct tgl_state *TLS;
struct tgl_session *session;
struct tgl_dc *dc;
void *extra;
struct event *ping_ev;
struct event *fail_ev;
struct event *read_ev;
struct event *write_ev;
double last_receive_time;
};
//extern struct connection *Connections[];
int tgln_write_out (struct connection *c, const void *data, int len);
void tgln_flush_out (struct connection *c);
int tgln_read_in (struct connection *c, void *data, int len);
int tgln_read_in_lookup (struct connection *c, void *data, int len);
//void tgln_insert_msg_id (struct tgl_session *S, long long id);
extern struct tgl_net_methods tgl_conn_methods;
//void create_all_outbound_connections (void);
//struct connection *create_connection (const char *host, int port, struct tgl_session *session, struct connection_methods *methods);
//struct tgl_dc *tgln_alloc_dc (int id, char *ip, int port);
//void tgln_dc_create_session (struct tgl_dc *DC, struct mtproto_methods *methods);
struct connection *tgln_create_connection (struct tgl_state *TLS, const char *host, int port, struct tgl_session *session, struct tgl_dc *dc, struct mtproto_methods *methods);
#define GET_DC(c) (c->session->dc)
#endif
/*
This file is part of tgl-library
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Copyright Vitaly Valtman 2013-2014
*/
// Just sample jpg file 90x90
int thumb_file_size = (82 * 6 - 2) * 4;
int thumb_file [] = {
0xe0ffd8ff, 0x464a1000, 0x01004649, 0x64000101, 0x00006400, 0xa002e2ff,
0x5f434349, 0x464f5250, 0x00454c49, 0x00000101, 0x636c9002, 0x3004736d,
0x6e6d0000, 0x47527274, 0x59582042, 0xdd07205a, 0x04000b00, 0x1b001600,
0x63612400, 0x50417073, 0x00004c50, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x0100d6f6, 0x00000000, 0x636c2dd3,
0x0000736d, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x65640b00, 0x00006373, 0x00000801, 0x70633800, 0x00007472, 0x00004001,
0x74774e00, 0x00007470, 0x00009001, 0x68631400, 0x00006461, 0x0000a401,
0x58722c00, 0x00005a59, 0x0000d001, 0x58621400, 0x00005a59, 0x0000e401,
0x58671400, 0x00005a59, 0x0000f801, 0x54721400, 0x00004352, 0x00000c02,
0x54672000, 0x00004352, 0x00002c02, 0x54622000, 0x00004352, 0x00004c02,
0x68632000, 0x00006d72, 0x00006c02, 0x6c6d2400, 0x00006375, 0x00000000,
0x00000100, 0x6e650c00, 0x00005355, 0x00001c00, 0x73001c00, 0x47005200,
0x20004200, 0x75006200, 0x6c006900, 0x2d007400, 0x6e006900, 0x6c6d0000,
0x00006375, 0x00000000, 0x00000100, 0x6e650c00, 0x00005355, 0x00003200,
0x4e001c00, 0x20006f00, 0x6f006300, 0x79007000, 0x69007200, 0x68006700,
0x2c007400, 0x75002000, 0x65007300, 0x66002000, 0x65007200, 0x6c006500,
0x00007900, 0x59580000, 0x0000205a, 0x00000000, 0x0100d6f6, 0x00000000,
0x66732dd3, 0x00003233, 0x01000000, 0x00004a0c, 0xffffe305, 0x00002af3,
0x00009b07, 0xffff87fd, 0xffffa2fb, 0x0000a3fd, 0x0000d803, 0x595894c0,
0x0000205a, 0x00000000, 0x0000946f, 0x0000ee38, 0x59589003, 0x0000205a,
0x00000000, 0x00009d24, 0x0000830f, 0x5958beb6, 0x0000205a, 0x00000000,
0x0000a562, 0x000090b7, 0x6170de18, 0x00006172, 0x03000000, 0x02000000,
0x00006666, 0x0000a7f2, 0x0000590d, 0x0000d013, 0x61705b0a, 0x00006172,
0x03000000, 0x02000000, 0x00006666, 0x0000a7f2, 0x0000590d, 0x0000d013,
0x61705b0a, 0x00006172, 0x03000000, 0x02000000, 0x00006666, 0x0000a7f2,
0x0000590d, 0x0000d013, 0x68635b0a, 0x00006d72, 0x03000000, 0x00000000,
0x0000d7a3, 0x00007b54, 0x0000cd4c, 0x00009a99, 0x00006626, 0xdbff5c0f,
0x14004300, 0x0f120f0e, 0x1112140d, 0x14161712, 0x21331f18, 0x1f1c1c1f,
0x252f2d3f, 0x4e414a33, 0x4841494d, 0x765c5246, 0x6f575264, 0x66484658,
0x7a6f688c, 0x8485847d, 0x9b91634f, 0x769a808f, 0xff7f8481, 0x014300db,
0x1f171716, 0x213c1f1b, 0x547f3c21, 0x7f7f5448, 0x7f7f7f7f, 0x7f7f7f7f,
0x7f7f7f7f, 0x7f7f7f7f, 0x7f7f7f7f, 0x7f7f7f7f, 0x7f7f7f7f, 0x7f7f7f7f,
0x7f7f7f7f, 0x7f7f7f7f, 0x7f7f7f7f, 0x7f7f7f7f, 0x1100c0ff, 0x005a0008,
0x2201035a, 0x01110200, 0xff011103, 0x001900c4, 0x01010101, 0x00000101,
0x00000000, 0x00000000, 0x02030400, 0xc4ff0605, 0x00103600, 0x02010401,
0x06050304, 0x00000306, 0x01000000, 0x11030200, 0x05211204, 0x13514131,
0x32146122, 0x23918171, 0x72423424, 0x432515a1, 0xa2827444, 0xc4fff0b3,
0x01011400, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x1400c4ff,
0x00000111, 0x00000000, 0x00000000, 0x00000000, 0xdaff0000, 0x01030c00,
0x03110200, 0x003f0011, 0x404434fb, 0xbcb4875c, 0x006b38b0, 0x03dcdb12,
0xf4637f74, 0xe519f153, 0x09d7c5c7, 0x47d29160, 0x20692f18, 0xd06d786a,
0x53f7f922, 0x17b3e260, 0x2fe8668c, 0x1786a473, 0x9775efbd, 0xe917e43a,
0x1d0a1bb0, 0x114d0f82, 0x14651110, 0x35f299ed, 0xe9b09680, 0xf5a4fc2f,
0xe975bd03, 0xb506737b, 0x04444440, 0x5c444044, 0x8e8dedbd, 0xc61adc7b,
0x689c738b, 0x92a0dc01, 0x58e2b77f, 0x7bfb37d1, 0xb5b5e79d, 0xdbf968cc,
0xead3f48d, 0x38ed1313, 0xdea77c86, 0xae089963, 0xc743435a, 0x403fe4ce,
0x392ee1b9, 0xed39e718, 0xd6517e2d, 0x7fc4aa03, 0xb7ad7590, 0x77e7e6ab,
0x34bf705d, 0x7c77ca53, 0x3dea1299, 0x7fb0bcf4, 0x241fadc5, 0x95a7a816,
0x13fbe6f3, 0x3182b135, 0xd1b4b224, 0x1b0d48a2, 0xbf9d26d8, 0x82dc3640,
0x63569a2a, 0xbbd224c3, 0xb9b4714c, 0x1680aec6, 0x3d311856, 0x9b59be91,
0x09876ca6, 0x61d86564, 0x5a9f06d2, 0x36f51b0d, 0x8682e476, 0xacb1b131,
0xd1584363, 0x00456b4d, 0x22d2053b, 0x22202202, 0xf3f30222, 0xe3e513e5,
0xf1e6e1f0, 0x2380496e, 0x5fdcdb68, 0x549b3a27, 0x825e6a6c, 0x6522028b,
0xaf91ccc8, 0x341cf26b, 0x58dbc4b5, 0xf2289add, 0x0854ddbd, 0x0b9247d5,
0xf02b5c54, 0x3f917f92, 0xaf56affd, 0xe3760637, 0x05cebde0, 0xed4c76ce,
0x3cef1b63, 0x7fd8aff8, 0xa0c902ea, 0x7e730d0a, 0x435834f3, 0x26edbb76,
0xd3ec00fd, 0x76d48efa, 0xa8560f2d, 0x0e766331, 0xd319993c, 0x20243209,
0x61b7e6c8, 0x998331d0, 0x640ee802, 0x47a3d493, 0xfab99413, 0x4fd871f1,
0xe9443792, 0x627e051c, 0xd8f3051c, 0x2f28f558, 0x64b51745, 0x1b2bfee3,
0xb8783953, 0x9900fff6, 0xd8176a65, 0x5a3bf56a, 0x1b331fdb, 0x64b3572f,
0xd59a3643, 0xaf3abce1, 0x11dd20bd, 0x01111110, 0x5c141011, 0xb3e3083f,
0xd9b19cc4, 0x17edb20e, 0xa78e9aa1, 0x4ef4de06, 0x00c0bfe7, 0x7e1e442d,
0x9221fe38, 0xedb5c7dc, 0x6338078a, 0x62495b8d, 0xc11d9b8c, 0x49e81b16,
0x51d02bea, 0x3eb86d70, 0xc8bc4f13, 0xa10ec758, 0xd40751c0, 0x5ac94710,
0xc4c8b080, 0x95492b83, 0x975ee696, 0xb7bd96b4, 0x17379cce, 0x82e856e8,
0xe4c2c82a, 0x398e935f, 0x632437ea, 0x7c9c87d2, 0xdc1ddb7c, 0x65a80a48,
0x2309f164, 0x51fab475, 0x081dc11d, 0xda45573b, 0x6622f3f3, 0x48f1b214,
0x676c4edb, 0x243468c7, 0x00ffde60, 0xf1630350, 0xa0076c1d, 0x8f2c0c8b,
0x2383c26b, 0x361a8f4e, 0xaceea6c9, 0x01dd5a5d, 0x11111011, 0xc3780c04,
0xbf093ee2, 0xc7972c0b, 0x00d99040, 0xc0c20eb7, 0x659d3bd4, 0x269ab85e,
0x468e114f, 0x11ad4fdb, 0x83d083d8, 0x8c52f4bd, 0x3c9664bf, 0xa4f9c77c,
0x22a68876, 0xadb18784, 0xf480be83, 0x885a00ea, 0x220e0a88, 0xc303e4f6,
0xc866e058, 0xdddbd661, 0xdf395db1, 0xbad64343, 0xe6e65b03, 0x668e81c3,
0xad619e98, 0xeeb94563, 0xd4d19a3c, 0x3316ce95, 0x9d65f1e1, 0x3bf324fe,
0x0e468f53, 0xc386068c, 0xa89e24f7, 0xf0c7c73b, 0xb60e391f, 0x1b8827cb,
0x58601954, 0xc54f90f9, 0x80886ec5, 0x88088888, 0x1b7bb980, 0xb4c71c23,
0xe6148e39, 0xb12358b8, 0xbd08225d, 0x0ffef085, 0x72b4f025, 0x635ce389,
0xb90277e4, 0x0d05e000, 0x9bf9dbb9, 0x8e749fbc, 0x7ee6abbf, 0x4ddbf4af,
0x728df7f3, 0x10b59adf, 0xe3c38f49, 0xb23c638a, 0xdb3d9349, 0x66899a64,
0x00004dd5, 0xf51b5adf, 0x2220a255, 0xd9ff0f22};
This diff is collapsed.
This diff is collapsed.
scheme18.tl
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Subproject commit 6a59fd311c1246aba4f6fb2c9a28e40e7abb3f2e
This diff is collapsed.
/*
This file is part of tgl-library
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Copyright Vitaly Valtman 2014
*/
#ifndef __TGL_INNER_H__
#define __TGL_INNER_H__
#define vlogprintf(verbosity_level,...) \
do { \
if (TLS->verbosity >= verbosity_level) { \
TLS->callback.logprintf (__VA_ARGS__); \
} \
} while (0)
#endif
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment