Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
tg
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
tg
Commits
232a9f12
Commit
232a9f12
authored
Apr 24, 2015
by
vvaltman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
some fixes. updated tgl
parent
443412cd
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
11 deletions
+11
-11
Makefile.tgl
Makefile.tgl
+2
-2
interface.c
interface.c
+4
-4
lua-tg.c
lua-tg.c
+4
-4
tgl
tgl
+1
-1
No files found.
Makefile.tgl
View file @
232a9f12
...
...
@@ -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 <
$<
>
$@
...
...
interface.c
View file @
232a9f12
...
...
@@ -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
)
{
...
...
lua-tg.c
View file @
232a9f12
...
...
@@ -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
;
...
...
tgl
@
03436dc7
Subproject commit
58c5c6a57272773df63e285162536f4ce53c5230
Subproject commit
03436dc71faa8122012a4b5e2035d1ac2cdb6648
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment