void b_main_sink(int count);void _main(){int count;count=-1;{WSADATA wsa_data;int wsa_data_init=0;int recv_rv;struct sockaddr_in s_in;SOCKET listen_socket=INVALID_SOCKET;SOCKET accept_socket=INVALID_SOCKET;char input_buf[CHAR_ARRAY_SIZE];do{if (WSAStartup(MAKEWORD(2,2), &wsa_data)!=NO_ERROR) break;wsa_data_init=1;listen_socket=socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);if (listen_socket==INVALID_SOCKET) break;memset(&s_in, 0, sizeof(s_in));s_in.sin_family=AF_INET;s_in.sin_addr.s_addr=INADDR_ANY;s_in.sin_port=htons(TCP_PORT);if (bind(listen_socket, (struct sockaddr*)&s_in, sizeof(s_in))==SOCKET_ERROR) break;if (listen(listen_socket, LISTEN_BACKLOG)==SOCKET_ERROR) break;accept_socket=accept(listen_socket, NULL, NULL);if (accept_socket==SOCKET_ERROR) break;recv_rv=recv(accept_socket, input_buf, CHAR_ARRAY_SIZE, 0);if (recv_rv==SOCKET_ERROR || recv_rv==0) break;count=atoi(input_buf);}while (0);if (listen_socket!=INVALID_SOCKET) CLOSE_SOCKET(listen_socket);if (accept_socket!=INVALID_SOCKET) CLOSE_SOCKET(accept_socket);if (wsa_data_init) WSACleanup();}b_main_sink(count);}void c_main_sink(int count);void b_main_sink(int count){c_main_sink(count);}void c_main_sink(int count){{size_t i=0;FILE *file=NULL;const char *filename="output_main.txt";file=fopen(filename, "w+");if (file==NULL) exit(1);for (i=0;i < (size_t)count;i++){if (strlen(SENTENCE)!=fwrite(SENTENCE, sizeof(char), strlen(SENTENCE), file)) exit(1);}if (file){fclose(file);}}}
static void main(){int count;count=-1;{WSADATA wsa_data;int wsa_data_init=0;int recv_rv;struct sockaddr_in s_in;SOCKET listen_socket=INVALID_SOCKET;SOCKET accept_socket=INVALID_SOCKET;char input_buf[CHAR_ARRAY_SIZE];do{if (WSAStartup(MAKEWORD(2,2), &wsa_data)!=NO_ERROR) break;wsa_data_init=1;listen_socket=socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);if (listen_socket==INVALID_SOCKET) break;memset(&s_in, 0, sizeof(s_in));s_in.sin_family=AF_INET;s_in.sin_addr.s_addr=INADDR_ANY;s_in.sin_port=htons(TCP_PORT);if (bind(listen_socket, (struct sockaddr*)&s_in, sizeof(s_in))==SOCKET_ERROR) break;if (listen(listen_socket, LISTEN_BACKLOG)==SOCKET_ERROR) break;accept_socket=accept(listen_socket, NULL, NULL);if (accept_socket==SOCKET_ERROR) break;recv_rv=recv(accept_socket, input_buf, CHAR_ARRAY_SIZE, 0);if (recv_rv==SOCKET_ERROR || recv_rv==0) break;count=atoi(input_buf);}while (0);if (listen_socket!=INVALID_SOCKET) CLOSE_SOCKET(listen_socket);if (accept_socket!=INVALID_SOCKET) CLOSE_SOCKET(accept_socket);if (wsa_data_init) WSACleanup();}b_main_sink(count);}void b_main_sink(int count){c_main_sink(count);}void c_main_sink(int count){{size_t i=0;FILE *file=NULL;const char *filename="output_good.txt";if (count > 0 && count <=20){file=fopen(filename, "w+");if (file==NULL) exit(1);for (i=0;i < (size_t)count;i++){if (strlen(SENTENCE)!=fwrite(SENTENCE, sizeof(char), strlen(SENTENCE), file)) exit(1);}if (file){fclose(file);}}}}