From 94dab852758a9d5a85e8c3d9e0a89f2aa26fa1b7 Mon Sep 17 00:00:00 2001 From: Sean Qureshi Date: Wed, 7 Aug 2013 18:52:11 -0700 Subject: [PATCH 1/2] Adds full -D support to toxics versioning, includes the commit number --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index f30d8e9..38f02dc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,9 @@ cmake_minimum_required(VERSION 2.6.0) project(toxic C) +execute_process(COMMAND git rev-list HEAD --count OUTPUT_VARIABLE COMMIT) +SET(GCC_COVERAGE_COMPILE_FLAGS '-DTOXICVER="0.1.1_r${COMMIT}"') +add_definitions(${GCC_COVERAGE_COMPILE_FLAGS}) set(exe_name toxic) add_executable(${exe_name} From 4cf43ae0974e5fcc18447d936f5e02dd97977e05 Mon Sep 17 00:00:00 2001 From: Sean Qureshi Date: Thu, 8 Aug 2013 03:04:36 -0700 Subject: [PATCH 2/2] Merged upstream main.c changes --- main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main.c b/main.c index 27e3d85..777ed80 100644 --- a/main.c +++ b/main.c @@ -22,7 +22,7 @@ extern int add_req(uint8_t *public_key); // XXX /* Holds status of chat windows */ char WINDOW_STATUS[MAX_WINDOW_SLOTS]; -#define TOXICVER "0.1.0" //Will be moved to a -D flag later +//#define TOXICVER "0.1.0" //Will be moved to a -D flag later static ToxWindow windows[MAX_WINDOW_SLOTS]; static ToxWindow* prompt; @@ -69,7 +69,7 @@ void on_nickchange(int friendnumber, uint8_t *string, uint16_t length) } } -void on_statuschange(int friendnumber, USERSTATUS_KIND kind, uint8_t *string, uint16_t length) +void on_statuschange(int friendnumber, uint8_t *string, uint16_t length) { wprintw(prompt->window, "\n(statuschange) %d: %s\n", friendnumber, string); int i; @@ -113,7 +113,7 @@ static void init_tox() m_callback_friendrequest(on_request); m_callback_friendmessage(on_message); m_callback_namechange(on_nickchange); - m_callback_userstatus(on_statuschange); + m_callback_statusmessage(on_statuschange); } void init_window_status()