windows support

This commit is contained in:
Ruslan Kuchumov 2014-09-08 18:49:37 +00:00
parent 7763f8aeab
commit 84db812769
3 changed files with 6 additions and 0 deletions

View File

@ -596,7 +596,9 @@ int main(int argc, char *argv[])
fatal (EXIT_UNABLE_TO_DETERMINE_FILE_SIZE, "Failed to determine total file size.\n"); fatal (EXIT_UNABLE_TO_DETERMINE_FILE_SIZE, "Failed to determine total file size.\n");
} }
#ifndef _WIN32
m_signal(SIGINT, sigint_handler); m_signal(SIGINT, sigint_handler);
#endif
while (switch_to_next_file(0) && !processed_enough) while (switch_to_next_file(0) && !processed_enough)
{ {

View File

@ -317,7 +317,9 @@ int hex2int (char high, char low);
void timestamp_to_srttime(uint64_t timestamp, char *buffer); void timestamp_to_srttime(uint64_t timestamp, char *buffer);
void millis_to_date (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); 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)); void m_signal(int sig, void (*func)(int));
#endif
unsigned encode_line (unsigned char *buffer, unsigned char *text); unsigned encode_line (unsigned char *buffer, unsigned char *text);

View File

@ -246,6 +246,7 @@ int hex2int (char high, char low)
return h*16+l; return h*16+l;
} }
#ifndef _WIN32
void m_signal(int sig, void (*func)(int)) void m_signal(int sig, void (*func)(int))
{ {
struct sigaction act; struct sigaction act;
@ -258,3 +259,4 @@ void m_signal(int sig, void (*func)(int))
return; return;
} }
#endif