From 232a9f12d9a66cb9ca114e1899c327c2f5f469f1 Mon Sep 17 00:00:00 2001 From: vvaltman Date: Fri, 24 Apr 2015 12:38:21 +0300 Subject: [PATCH] some fixes. updated tgl --- Makefile.tgl | 4 ++-- interface.c | 8 ++++---- lua-tg.c | 8 ++++---- tgl | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Makefile.tgl b/Makefile.tgl index bfc6d68..88e0bf4 100644 --- a/Makefile.tgl +++ b/Makefile.tgl @@ -41,10 +41,10 @@ ${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 auto/constants.h ${AUTO}/auto-%.h | create_dirs_and_headers - ${EXE}/generate ${AUTO}/scheme.tlo -g $(patsubst ${AUTO}/auto-%.c,%,$@) > $@ || rm $@ + ${EXE}/generate -g $(patsubst ${AUTO}/auto-%.c,%,$@) ${AUTO}/scheme.tlo > $@ || rm $@ ${AUTO}/auto-%.h: ${AUTO}/scheme.tlo ${EXE}/generate - ${EXE}/generate ${AUTO}/scheme.tlo -g $(patsubst ${AUTO}/auto-%.h,%-header,$@) > $@ || rm $@ + ${EXE}/generate -g $(patsubst ${AUTO}/auto-%.h,%-header,$@) ${AUTO}/scheme.tlo > $@ || rm $@ ${AUTO}/constants.h: ${AUTO}/scheme2.tl ${srcdir}/tgl/gen_constants_h.awk awk -f ${srcdir}/tgl/gen_constants_h.awk < $< > $@ diff --git a/interface.c b/interface.c index 126152e..9596685 100644 --- a/interface.c +++ b/interface.c @@ -725,7 +725,7 @@ void do_send_typing_abort (int arg_num, struct arg args[], struct in_ev *ev) { void do_rename_chat (int arg_num, struct arg args[], struct in_ev *ev) { assert (arg_num == 2); if (ev) { ev->refcnt ++; } - tgl_do_rename_chat (TLS, args[0].P->id, args[1].str, print_msg_success_gw, ev); + tgl_do_rename_chat (TLS, args[0].P->id, args[1].str, print_success_gw, ev); } #define DO_LOAD_PHOTO(tp,act,actf) \ @@ -912,13 +912,13 @@ void do_secret_chat_rekey (int arg_num, struct arg args[], struct in_ev *ev) { void do_chat_add_user (int arg_num, struct arg args[], struct in_ev *ev) { assert (arg_num == 3); if (ev) { ev->refcnt ++; } - tgl_do_add_user_to_chat (TLS, args[0].P->id, args[1].P->id, args[2].num != NOT_FOUND ? args[2].num : 100, print_msg_success_gw, ev); + tgl_do_add_user_to_chat (TLS, args[0].P->id, args[1].P->id, args[2].num != NOT_FOUND ? args[2].num : 100, print_success_gw, ev); } void do_chat_del_user (int arg_num, struct arg args[], struct in_ev *ev) { assert (arg_num == 2); if (ev) { ev->refcnt ++; } - tgl_do_del_user_from_chat (TLS, args[0].P->id, args[1].P->id, print_msg_success_gw, ev); + tgl_do_del_user_from_chat (TLS, args[0].P->id, args[1].P->id, print_success_gw, ev); } void do_status_online (int arg_num, struct arg args[], struct in_ev *ev) { @@ -986,7 +986,7 @@ void do_create_group_chat (int arg_num, struct arg args[], struct in_ev *ev) { } if (ev) { ev->refcnt ++; } - tgl_do_create_group_chat_ex (TLS, arg_num - 1, ids, args[0].str, print_msg_success_gw, ev); + tgl_do_create_group_chat_ex (TLS, arg_num - 1, ids, args[0].str, print_success_gw, ev); } void do_chat_set_photo (int arg_num, struct arg args[], struct in_ev *ev) { diff --git a/lua-tg.c b/lua-tg.c index 1ba970c..8cd0ad6 100644 --- a/lua-tg.c +++ b/lua-tg.c @@ -889,7 +889,7 @@ void lua_do_all (void) { p += 2; break; case lq_rename_chat: - tgl_do_rename_chat (TLS, ((tgl_peer_t *)lua_ptr[p + 1])->id, lua_ptr[p + 2], lua_msg_cb, lua_ptr[p]); + tgl_do_rename_chat (TLS, ((tgl_peer_t *)lua_ptr[p + 1])->id, lua_ptr[p + 2], lua_empty_cb, lua_ptr[p]); free (lua_ptr[p + 2]); p += 3; break; @@ -977,11 +977,11 @@ void lua_do_all (void) { p += 3; break; case lq_chat_add_user: - tgl_do_add_user_to_chat (TLS, ((tgl_peer_t *)lua_ptr[p + 1])->id, ((tgl_peer_t *)lua_ptr[p + 2])->id, 10, lua_msg_cb, lua_ptr[p]); + tgl_do_add_user_to_chat (TLS, ((tgl_peer_t *)lua_ptr[p + 1])->id, ((tgl_peer_t *)lua_ptr[p + 2])->id, 10, lua_empty_cb, lua_ptr[p]); p += 3; break; case lq_chat_del_user: - tgl_do_del_user_from_chat (TLS, ((tgl_peer_t *)lua_ptr[p + 1])->id, ((tgl_peer_t *)lua_ptr[p + 2])->id, lua_msg_cb, lua_ptr[p]); + tgl_do_del_user_from_chat (TLS, ((tgl_peer_t *)lua_ptr[p + 1])->id, ((tgl_peer_t *)lua_ptr[p + 2])->id, lua_empty_cb, lua_ptr[p]); p += 3; break; case lq_add_contact: @@ -1044,7 +1044,7 @@ void lua_do_all (void) { break; case lq_create_group_chat: s = lua_ptr[p + 2]; - tgl_do_create_group_chat (TLS, ((tgl_peer_t *)lua_ptr[p + 1])->id, s, lua_msg_cb, lua_ptr[p]); + tgl_do_create_group_chat (TLS, ((tgl_peer_t *)lua_ptr[p + 1])->id, s, lua_empty_cb, lua_ptr[p]); free (s); p += 3; break; diff --git a/tgl b/tgl index 58c5c6a..03436dc 160000 --- a/tgl +++ b/tgl @@ -1 +1 @@ -Subproject commit 58c5c6a57272773df63e285162536f4ce53c5230 +Subproject commit 03436dc71faa8122012a4b5e2035d1ac2cdb6648