Skip to content

Commit

Permalink
Refactored code a bit to better separation of library. Library can no…
Browse files Browse the repository at this point in the history
…w be compiled without libevent.
  • Loading branch information
Vysheng committed Oct 24, 2014
1 parent c01eb11 commit 56fe7be
Show file tree
Hide file tree
Showing 28 changed files with 2,658 additions and 2,454 deletions.
2 changes: 1 addition & 1 deletion Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ EXE_LIST=${EXE}/generate ${EXE}/tlc ${EXE}/telegram-cli
LIB_LIST=${LIB}/libtgl.a

TG_OBJECTS=${OBJ}/main.o ${OBJ}/loop.o ${OBJ}/interface.o ${OBJ}/lua-tg.o
TGL_OBJECTS=${OBJ}/net.o ${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
TGL_OBJECTS=${OBJ}/net.o ${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 ${OBJ}/tgl-timers.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
Expand Down
6 changes: 3 additions & 3 deletions auto-static.c
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ static void free_vars_to_be_freed (void) {
fvars_pos = 0;
}

int tglf_extf_autocomplete (const char *text, int text_len, int index, char **R, char *data, int data_len) {
int tglf_extf_autocomplete (struct tgl_state *TLS, const char *text, int text_len, int index, char **R, char *data, int data_len) {
if (index == -1) {
buffer_pos = data;
buffer_end = data + data_len;
Expand All @@ -330,7 +330,7 @@ int tglf_extf_autocomplete (const char *text, int text_len, int index, char **R,
}
}

struct paramed_type *tglf_extf_store (const char *data, int data_len) {
struct paramed_type *tglf_extf_store (struct tgl_state *TLS, const char *data, int data_len) {
buffer_pos = (char *)data;
buffer_end = (char *)(data + data_len);
local_next_token ();
Expand Down Expand Up @@ -432,7 +432,7 @@ static void print_offset (void) {
}
}

char *tglf_extf_fetch (struct paramed_type *T) {
char *tglf_extf_fetch (struct tgl_state *TLS, struct paramed_type *T) {
out_buf_pos = 0;
if (fetch_type_any (T) < 0) { return 0; }
return out_buf;
Expand Down
Loading

0 comments on commit 56fe7be

Please sign in to comment.