mirror of
				https://github.com/Tha14/toxic.git
				synced 2025-10-30 15:46:51 +01:00 
			
		
		
		
	Fixed build problems
This commit is contained in:
		| @@ -428,7 +428,7 @@ if test "x$BUILD_AV" = "xyes"; then | |||||||
|             AC_CHECK_HEADER([tox/toxav.h], |             AC_CHECK_HEADER([tox/toxav.h], | ||||||
|             [ |             [ | ||||||
|                 # Place define for audio support |                 # 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]) |                 AC_MSG_NOTICE([Building with audio support]) | ||||||
|             ], |             ], | ||||||
|             [ |             [ | ||||||
| @@ -448,10 +448,6 @@ fi | |||||||
| AM_CONDITIONAL(BUILD_AV, test "x$BUILD_AV" = "xyes") | AM_CONDITIONAL(BUILD_AV, test "x$BUILD_AV" = "xyes") | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
| #debug mode |  | ||||||
| CFLAGS="-ggdb3 -O0 -pg" |  | ||||||
|  |  | ||||||
| TOXIC_VERSION="$PACKAGE_VERSION" | TOXIC_VERSION="$PACKAGE_VERSION" | ||||||
| AC_PATH_PROG([GIT], [git], [no]) | AC_PATH_PROG([GIT], [git], [no]) | ||||||
| if test "x$GIT" != "xno"; then | if test "x$GIT" != "xno"; then | ||||||
|   | |||||||
| @@ -20,8 +20,13 @@ | |||||||
|  * |  * | ||||||
|  */ |  */ | ||||||
|  |  | ||||||
|  | #ifdef HAVE_CONFIG_H | ||||||
|  | #include "config.h" | ||||||
|  | #endif | ||||||
|  |  | ||||||
| #include <stdlib.h> | #include <stdlib.h> | ||||||
| #include <string.h> | #include <string.h> | ||||||
|  | #include <assert.h> | ||||||
|  |  | ||||||
| #include "toxic_windows.h" | #include "toxic_windows.h" | ||||||
| #include "execute.h" | #include "execute.h" | ||||||
|   | |||||||
| @@ -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, "    /clear                     : Clear the window\n"); | ||||||
|     wprintw(window, "    /quit or /exit             : Exit Toxic\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, "    /lsdev <type>              : List devices where type: in|out\n"); | ||||||
|     wprintw(window, "    /sdev <type> <id>          : Set active device\n"); |     wprintw(window, "    /sdev <type> <id>          : Set active device\n"); | ||||||
|     #endif /* _SUPPORT_AUDIO */ | #endif /* _SUPPORT_AUDIO */ | ||||||
|      |      | ||||||
|     wattron(window, COLOR_PAIR(CYAN) | A_BOLD); |     wattron(window, COLOR_PAIR(CYAN) | A_BOLD); | ||||||
|     wprintw(window, " * Argument messages must be enclosed in quotation marks.\n"); |     wprintw(window, " * Argument messages must be enclosed in quotation marks.\n"); | ||||||
|   | |||||||
| @@ -43,7 +43,7 @@ static GroupChat groupchats[MAX_WINDOWS_NUM]; | |||||||
| static int max_groupchat_index = 0; | static int max_groupchat_index = 0; | ||||||
|  |  | ||||||
| /* temporary until group chats have unique commands */ | /* 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) | int init_groupchat_win(ToxWindow *prompt, Tox *m, int groupnum) | ||||||
| { | { | ||||||
|   | |||||||
							
								
								
									
										13
									
								
								src/main.c
									
									
									
									
									
								
							
							
						
						
									
										13
									
								
								src/main.c
									
									
									
									
									
								
							| @@ -68,6 +68,10 @@ | |||||||
| #define PACKAGE_DATADIR "." | #define PACKAGE_DATADIR "." | ||||||
| #endif | #endif | ||||||
|  |  | ||||||
|  | #ifdef _SUPPORT_AUDIO | ||||||
|  |     ToxAv* av; | ||||||
|  | #endif /* _SUPPORT_AUDIO */ | ||||||
|  |  | ||||||
| /* Export for use in Callbacks */ | /* Export for use in Callbacks */ | ||||||
| char *DATA_FILE = NULL; | char *DATA_FILE = NULL; | ||||||
| ToxWindow *prompt = NULL; | ToxWindow *prompt = NULL; | ||||||
| @@ -405,6 +409,9 @@ void exit_toxic(Tox *m) | |||||||
|     free(prompt->promptbuf->log); |     free(prompt->promptbuf->log); | ||||||
|     free(prompt->promptbuf); |     free(prompt->promptbuf); | ||||||
|     tox_kill(m); |     tox_kill(m); | ||||||
|  |     #ifdef _SUPPORT_AUDIO | ||||||
|  |     terminate_audio(prompt, av); | ||||||
|  |     #endif /* _SUPPORT_AUDIO */ | ||||||
|     endwin(); |     endwin(); | ||||||
|     exit(EXIT_SUCCESS); |     exit(EXIT_SUCCESS); | ||||||
| } | } | ||||||
| @@ -486,7 +493,7 @@ int main(int argc, char *argv[]) | |||||||
|     wprintw(prompt->window, "Starting audio...\n"); |     wprintw(prompt->window, "Starting audio...\n"); | ||||||
|     attroff(COLOR_PAIR(RED) | A_BOLD); |     attroff(COLOR_PAIR(RED) | A_BOLD); | ||||||
|      |      | ||||||
|     ToxAv* av = init_audio(prompt, m); |     av = init_audio(prompt, m); | ||||||
|          |          | ||||||
|     if ( errors() == NoError ) |     if ( errors() == NoError ) | ||||||
|         wprintw(prompt->window, "Audio started with no problems.\n"); |         wprintw(prompt->window, "Audio started with no problems.\n"); | ||||||
| @@ -519,9 +526,5 @@ int main(int argc, char *argv[]) | |||||||
|     while (true)  |     while (true)  | ||||||
|         do_toxic(m, prompt); |         do_toxic(m, prompt); | ||||||
|          |          | ||||||
| #ifdef _SUPPORT_AUDIO      |  | ||||||
|     terminate_audio(prompt, av); |  | ||||||
| #endif /* _SUPPORT_AUDIO */ |  | ||||||
|      |  | ||||||
|     return 0; |     return 0; | ||||||
| } | } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user