Merge github.com:vysheng/tg

This commit is contained in:
Vysheng 2013-11-30 01:44:16 +04:00
commit b7a2732c30
3 changed files with 17 additions and 2 deletions

View file

@ -10,6 +10,15 @@ Documentation for MTproto protocol is available here: http://core.telegram.org/m
### Installation
Clone GitHub Repository
$ git clone https://github.com/vysheng/tg.git && cd tg
or download and extrac zip
$ wget https://github.com/vysheng/tg/archive/master.zip -O tg-master.zip
$ tar xzf tg-master.zip && cd tg-master
#### Linux
Just run

View file

@ -1118,7 +1118,7 @@ void add_log_event (const int *data, int len) {
int *end = in_end;
replay_log_event ();
if (rptr != wptr) {
logprintf ("Unread %ld ints. Len = %d\n", wptr - rptr, len);
logprintf ("Unread %lld ints. Len = %d\n", (long long)(wptr - rptr), len);
assert (rptr == wptr);
}
if (binlog_enabled) {

View file

@ -48,6 +48,12 @@
#define sha1 SHA1
#ifdef __APPLE__
#define OPEN_BIN "open %s"
#else
#define OPEN_BIN "xdg-open %s"
#endif
char *get_downloads_directory (void);
int verbosity;
extern int offline_mode;
@ -1755,7 +1761,7 @@ void end_load (struct download *D) {
logprintf ("Done: %s\n", D->name);
} else if (D->next == 2) {
static char buf[1000];
sprintf (buf, "xdg-open %s", D->name);
sprintf (buf, OPEN_BIN, D->name);
int x = system (buf);
if (x < 0) {
logprintf ("Can not open image viewer: %m\n");