From eccdd8010150176182a4a3cf3cb0698171dc3142 Mon Sep 17 00:00:00 2001 From: mouseym Date: Sun, 21 Jul 2013 18:15:05 +0100 Subject: [PATCH 1/2] Update INSTALL.md OSX Instructions added. --- INSTALL.md | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/INSTALL.md b/INSTALL.md index b4e28379..97bef179 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -27,6 +27,23 @@ For example, to build [`Messenger_test.c`](/others/Messenger_test.c) you would r make Messenger_test ``` +###OSX: + +Much the same as above, remember to install the latest XCode and the developer tools (Preferences -> Downloads -> Command Line Tools). +Users running Mountain Lion and the latest version of XCode (4.6.3) will also need to install libtool +Libtool is easy enough to install, grab it from http://www.gnu.org/software/libtool/ and: + +./configure +make +sudo make install + +Do not install it from macports (or any dependencies for that matter) as they get shoved in the wrong directory +and make your life more annoying. + +Another thing you may want to install is the latest gcc, this caused me a few problems as XCode from 4.3 +no longer includes gcc and instead uses LLVM-GCC, a nice install guide can be found at +http://caiustheory.com/install-gcc-421-apple-build-56663-with-xcode-42 + ###Windows: You should install: @@ -49,4 +66,4 @@ mingw32-make name_of_c_file For example, to build [`Messenger_test.c`](/others/Messenger_test.c) you would run: ```cmd mingw32-make Messenger_test -``` \ No newline at end of file +``` From 7863a552aab350202eb110bb7f319a210f085185 Mon Sep 17 00:00:00 2001 From: notadecent Date: Sun, 21 Jul 2013 22:54:09 +0200 Subject: [PATCH 2/2] Updated nTox.c (added timestamp) It's very glitchy. But it works. --- testing/nTox.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/testing/nTox.c b/testing/nTox.c index ccb11a71..693e64aa 100644 --- a/testing/nTox.c +++ b/testing/nTox.c @@ -1,4 +1,6 @@ #include "nTox.h" +#include +#include #ifdef WIN32 #define c_sleep(x) Sleep(1*x) @@ -168,12 +170,12 @@ void do_refresh() } void print_request(uint8_t * public_key, uint8_t * data, uint16_t length) { - new_lines("Friend request"); + new_lines("[i] received friend request"); do_refresh(); if(memcmp(data , "Install Gentoo", sizeof("Install Gentoo")) == 0 ) //if the request contained the message of peace the person is obviously a friend so we add him. { - new_lines("[i] friend request accepted."); + new_lines("[i] friend request accepted"); do_refresh(); int num = m_addfriend_norequest(public_key); char numchar[100]; @@ -186,7 +188,11 @@ void print_message(int friendnumber, uint8_t * string, uint16_t length) char *name = malloc(MAX_NAME_LENGTH); getname(friendnumber, (uint8_t*)name); char msg[100+length+strlen(name)+1]; - sprintf(msg, "[%d] <%s> %s", friendnumber, name, string); + time_t rawtime; + struct tm * timeinfo; + time ( &rawtime ); + timeinfo = localtime ( &rawtime ); + sprintf(msg, "[%d] %s <%s> %s", friendnumber, asctime (timeinfo), name, string); // someone please fix this free(name); new_lines(msg); }