1
0
mirror of https://github.com/Tha14/toxic.git synced 2024-12-23 19:43:26 +01:00

Fixed build problems

This commit is contained in:
mannol 2014-03-08 16:36:42 +01:00
parent 6c2ae4ad24
commit 1fd07837ea
5 changed files with 18 additions and 14 deletions

View File

@ -428,7 +428,7 @@ if test "x$BUILD_AV" = "xyes"; then
AC_CHECK_HEADER([tox/toxav.h],
[
# Place define for audio support
AC_DEFINE([_SUPPORT_AUDIO], [], [If audio supported])
AC_DEFINE([_SUPPORT_AUDIO], [], [Is audio supported])
AC_MSG_NOTICE([Building with audio support])
],
[
@ -448,10 +448,6 @@ fi
AM_CONDITIONAL(BUILD_AV, test "x$BUILD_AV" = "xyes")
#debug mode
CFLAGS="-ggdb3 -O0 -pg"
TOXIC_VERSION="$PACKAGE_VERSION"
AC_PATH_PROG([GIT], [git], [no])
if test "x$GIT" != "xno"; then

View File

@ -20,8 +20,13 @@
*
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include "toxic_windows.h"
#include "execute.h"

View File

@ -378,10 +378,10 @@ void cmd_prompt_help(WINDOW *window, ToxWindow *self, Tox *m, int argc, char (*a
wprintw(window, " /clear : Clear the window\n");
wprintw(window, " /quit or /exit : Exit Toxic\n");
#ifdef _SUPPORT_AUDIO
#ifdef _SUPPORT_AUDIO
wprintw(window, " /lsdev <type> : List devices where type: in|out\n");
wprintw(window, " /sdev <type> <id> : Set active device\n");
#endif /* _SUPPORT_AUDIO */
#endif /* _SUPPORT_AUDIO */
wattron(window, COLOR_PAIR(CYAN) | A_BOLD);
wprintw(window, " * Argument messages must be enclosed in quotation marks.\n");

View File

@ -43,7 +43,7 @@ static GroupChat groupchats[MAX_WINDOWS_NUM];
static int max_groupchat_index = 0;
/* temporary until group chats have unique commands */
extern glob_cmd_list[AC_NUM_GLOB_COMMANDS][MAX_CMDNAME_SIZE];
extern const uint8_t glob_cmd_list[AC_NUM_GLOB_COMMANDS][MAX_CMDNAME_SIZE];
int init_groupchat_win(ToxWindow *prompt, Tox *m, int groupnum)
{

View File

@ -68,6 +68,10 @@
#define PACKAGE_DATADIR "."
#endif
#ifdef _SUPPORT_AUDIO
ToxAv* av;
#endif /* _SUPPORT_AUDIO */
/* Export for use in Callbacks */
char *DATA_FILE = NULL;
ToxWindow *prompt = NULL;
@ -405,6 +409,9 @@ void exit_toxic(Tox *m)
free(prompt->promptbuf->log);
free(prompt->promptbuf);
tox_kill(m);
#ifdef _SUPPORT_AUDIO
terminate_audio(prompt, av);
#endif /* _SUPPORT_AUDIO */
endwin();
exit(EXIT_SUCCESS);
}
@ -486,7 +493,7 @@ int main(int argc, char *argv[])
wprintw(prompt->window, "Starting audio...\n");
attroff(COLOR_PAIR(RED) | A_BOLD);
ToxAv* av = init_audio(prompt, m);
av = init_audio(prompt, m);
if ( errors() == NoError )
wprintw(prompt->window, "Audio started with no problems.\n");
@ -518,10 +525,6 @@ int main(int argc, char *argv[])
while (true)
do_toxic(m, prompt);
#ifdef _SUPPORT_AUDIO
terminate_audio(prompt, av);
#endif /* _SUPPORT_AUDIO */
return 0;
}