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
5308d0c6
Commit
5308d0c6
authored
Oct 21, 2014
by
Vysheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added --disable-extf to configure script
parent
84795ec0
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
140 additions
and
80 deletions
+140
-80
auto-static.c
auto-static.c
+3
-0
config.h.in
config.h.in
+3
-0
configure
configure
+14
-0
configure.ac
configure.ac
+8
-0
generate.c
generate.c
+96
-79
interface.c
interface.c
+8
-1
queries.c
queries.c
+8
-0
No files found.
auto-static.c
View file @
5308d0c6
...
...
@@ -19,8 +19,10 @@
*/
#include "mtproto-common.h"
#include "config.h"
#include <string.h>
#ifndef DISABLE_EXTF
static
int
cur_token_len
;
static
char
*
cur_token
;
static
int
cur_token_real_len
;
...
...
@@ -435,3 +437,4 @@ char *tglf_extf_fetch (struct paramed_type *T) {
if
(
fetch_type_any
(
T
)
<
0
)
{
return
0
;
}
return
out_buf
;
}
#endif
config.h.in
View file @
5308d0c6
/* config.h.in. Generated from configure.ac by autoheader. */
/* disable extf queries */
#undef DISABLE_EXTF
/* Use libevent v1 */
#undef EVENT_V1
...
...
configure
View file @
5308d0c6
...
...
@@ -692,6 +692,7 @@ enable_option_checking
with_openssl
with_zlib
enable_libconfig
enable_extf
enable_liblua
with_progname
'
...
...
@@ -1317,6 +1318,7 @@ Optional Features:
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--enable-libconfig/--disable-libconfig
--enable-extf/--disable-extf
--enable-liblua/--disable-liblua
Optional Packages:
...
...
@@ -4502,6 +4504,18 @@ fi
fi
# Check whether --enable-extf was given.
if
test
"
${
enable_extf
+set
}
"
=
set
;
then
:
enableval
=
$enable_extf
;
if
test
"x
$enableval
"
=
"xno"
;
then
$as_echo
"#define DISABLE_EXTF 1"
>>
confdefs.h
fi
fi
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: checking for liblua"
>
&5
$as_echo_n
"checking for liblua... "
>
&6
;
}
# Check whether --enable-liblua was given.
...
...
configure.ac
View file @
5308d0c6
...
...
@@ -52,6 +52,14 @@ AC_ARG_ENABLE(libconfig,[--enable-libconfig/--disable-libconfig],
AC_CHECK_LIB([config],[config_init],[],AC_MSG_ERROR([No libconfig found. Try --disable-libconfig]))
])
AC_ARG_ENABLE(extf,[--enable-extf/--disable-extf],
[
if test "x$enableval" = "xno" ; then
AC_DEFINE([DISABLE_EXTF],[1],[disable extf queries])
fi
],[
])
AC_MSG_CHECKING([for liblua])
AC_ARG_ENABLE(liblua,[--enable-liblua/--disable-liblua],
[
...
...
generate.c
View file @
5308d0c6
This diff is collapsed.
Click to expand it.
interface.c
View file @
5308d0c6
...
...
@@ -1252,7 +1252,10 @@ int complete_command_list (int index, const char *text, int len, char **R) {
}
char
*
command_generator
(
const
char
*
text
,
int
state
)
{
static
int
len
,
index
;
#ifndef DISABLE_EXTF
static
int
len
;
#endif
static
int
index
;
static
enum
command_argument
mode
;
static
char
*
command_pos
;
static
int
command_len
;
...
...
@@ -1267,7 +1270,9 @@ char *command_generator (const char *text, int state) {
c
=
rl_line_buffer
[
rl_point
];
rl_line_buffer
[
rl_point
]
=
0
;
if
(
!
state
)
{
#ifndef DISABLE_EXTF
len
=
strlen
(
text
);
#endif
index
=
-
1
;
mode
=
get_complete_mode
();
...
...
@@ -1314,10 +1319,12 @@ char *command_generator (const char *text, int state) {
index
=
complete_string_list
(
modifiers
,
index
,
command_pos
,
command_len
,
&
R
);
if
(
c
)
{
rl_line_buffer
[
rl_point
]
=
c
;
}
return
R
;
#ifndef DISABLE_EXTF
case
ca_extf
:
index
=
tglf_extf_autocomplete
(
text
,
len
,
index
,
&
R
,
rl_line_buffer
,
rl_point
);
if
(
c
)
{
rl_line_buffer
[
rl_point
]
=
c
;
}
return
R
;
#endif
default:
if
(
c
)
{
rl_line_buffer
[
rl_point
]
=
c
;
}
return
0
;
...
...
queries.c
View file @
5308d0c6
...
...
@@ -3809,6 +3809,7 @@ void tgl_do_import_card (int size, int *card, void (*callback)(void *callback_ex
}
/* }}} */
#ifndef DISABLE_EXTF
static
int
ext_query_on_answer
(
struct
query
*
q
UU
)
{
if
(
q
->
callback
)
{
char
*
buf
=
tglf_extf_fetch
(
q
->
type
);
...
...
@@ -3831,6 +3832,13 @@ void tgl_do_send_extf (char *data, int data_len, void (*callback)(void *callback
tglq_send_query
(
tgl_state
.
DC_working
,
packet_ptr
-
packet_buffer
,
packet_buffer
,
&
ext_query_methods
,
0
,
callback
,
callback_extra
);
}
}
#else
void
tgl_do_send_extf
(
char
*
data
,
int
data_len
,
void
(
*
callback
)(
void
*
callback_extra
,
int
success
,
char
*
buf
),
void
*
callback_extra
)
{
if
(
callback
)
{
callback
(
callback_extra
,
0
,
0
);
}
}
#endif
static
void
set_flag_4
(
void
*
_D
,
int
success
)
{
struct
tgl_dc
*
D
=
_D
;
...
...
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