diff --git a/src/ccextractor.c b/src/ccextractor.c index 3d277afe..3f9917f3 100644 --- a/src/ccextractor.c +++ b/src/ccextractor.c @@ -596,7 +596,9 @@ int main(int argc, char *argv[]) fatal (EXIT_UNABLE_TO_DETERMINE_FILE_SIZE, "Failed to determine total file size.\n"); } +#ifndef _WIN32 m_signal(SIGINT, sigint_handler); +#endif while (switch_to_next_file(0) && !processed_enough) { diff --git a/src/ccextractor.h b/src/ccextractor.h index a1aeb845..4bbd6d11 100644 --- a/src/ccextractor.h +++ b/src/ccextractor.h @@ -317,7 +317,9 @@ int hex2int (char high, char low); void timestamp_to_srttime(uint64_t timestamp, char *buffer); void millis_to_date (uint64_t timestamp, char *buffer) ; int levenshtein_dist (const uint64_t *s1, const uint64_t *s2, unsigned s1len, unsigned s2len); +#ifndef _WIN32 void m_signal(int sig, void (*func)(int)); +#endif unsigned encode_line (unsigned char *buffer, unsigned char *text); diff --git a/src/utility.c b/src/utility.c index 2a35d789..7cb0b422 100644 --- a/src/utility.c +++ b/src/utility.c @@ -246,6 +246,7 @@ int hex2int (char high, char low) return h*16+l; } +#ifndef _WIN32 void m_signal(int sig, void (*func)(int)) { struct sigaction act; @@ -258,3 +259,4 @@ void m_signal(int sig, void (*func)(int)) return; } +#endif