From a68df043bfbc7f8f38332143577877846631eca4 Mon Sep 17 00:00:00 2001 From: Michał Cichoń Date: Tue, 25 Aug 2015 19:58:37 +0200 Subject: Update build environment - remove faad2 - remove mad - remove polarssl - remove pthreads - add libcurl - add vtparse with UTF8 support - update project to use Visual Studio 2015 --- faad2/src/aacDECdrop/misc.c | 124 -------------------------------------------- 1 file changed, 124 deletions(-) delete mode 100644 faad2/src/aacDECdrop/misc.c (limited to 'faad2/src/aacDECdrop/misc.c') diff --git a/faad2/src/aacDECdrop/misc.c b/faad2/src/aacDECdrop/misc.c deleted file mode 100644 index cf5b9af..0000000 --- a/faad2/src/aacDECdrop/misc.c +++ /dev/null @@ -1,124 +0,0 @@ -/* - * function: Miscellaneous functions for aacDECdrop - * - * This program is distributed under the GNU General Public License, version 2. - * A copy of this license is included with this source. - * - * Copyright (C) 2002 John Edwards - */ - -#include -#include -#include -#include -#include "misc.h" - -static char *_filename; -void (*error_handler)(const char *fmt, ...) = error_dialog; - -/* - * Set the current input file name. - */ - -void set_filename(char *filename) -{ - _filename = filename; -} - -/* - * Display an error dialog, possibly adding system error information. - */ - -void error_dialog(const char *fmt, ...) -{ - va_list ap; - char msgbuf[1024]; - char *bufp = msgbuf; - - /* A really rough sanity check to protect against blatant buffer overrun */ - if (strlen(fmt) > 750) - { - sprintf(msgbuf, "%s %s", " ", fmt); - } - else - { - if (_filename != NULL && strlen(_filename) < 255) - { - sprintf(msgbuf, "%s: ", _filename); - bufp += strlen(msgbuf); - } - - va_start(ap, fmt); - - vsprintf(bufp, fmt, ap); - - va_end(ap); - - if (errno != 0) - { - bufp = msgbuf + strlen(msgbuf); - sprintf(bufp, " error is %s (%d)", strerror(errno), errno); - errno = 0; - } - } - - MessageBox(NULL, msgbuf, "Error", 0); -} - -void log_error(const char *fmt, ...) -{ - va_list ap; - FILE *fp; - char msgbuf[1024]; - char *bufp = msgbuf; - - /* A really rough sanity check to protect against blatant buffer overrun */ - if (strlen(fmt) > 750) - { - sprintf(msgbuf, "%s %s", " ", fmt); - } - else - { - if (_filename != NULL && strlen(_filename) < 255) - { - sprintf(msgbuf, "%s : ", _filename); - bufp += strlen(msgbuf); - } - - va_start(ap, fmt); - - vsprintf(bufp, fmt, ap); - - va_end(ap); - - if (errno != 0) - { - bufp = msgbuf + strlen(msgbuf); - sprintf(bufp, " error is: %s (%d)", strerror(errno), errno); - errno = 0; - } - } - - va_start(ap, fmt); - - if ((fp = fopen("oggdrop.log", "a")) == (FILE *)NULL) - return; - - fprintf(fp, "%s\n", msgbuf); - fflush(fp); - fclose(fp); - - va_end(ap); -} - -void set_use_dialogs(int use_dialogs) -{ - if (!use_dialogs) - error_handler = error_dialog; - else - error_handler = log_error; -} - - -/******************************** end of misc.c ********************************/ - -- cgit v1.2.3