void b_main_sink(short * data_ptr);void _main(){short data;data=0;{WSADATA wsa_data;int wsa_data_init=0;int recv_rv;struct sockaddr_in s_in;SOCKET connect_socket=INVALID_SOCKET;char input_buf[CHAR_ARRAY_SIZE];do{if (WSAStartup(MAKEWORD(2,2), &wsa_data)!=NO_ERROR) break;wsa_data_init=1;connect_socket=socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);if (connect_socket==INVALID_SOCKET) break;memset(&s_in, 0, sizeof(s_in));s_in.sin_family=AF_INET;s_in.sin_addr.s_addr=inet_addr("127.0.0.1");s_in.sin_port=htons(TCP_PORT);if (connect(connect_socket, (struct sockaddr*)&s_in, sizeof(s_in))==SOCKET_ERROR) break;recv_rv=recv(connect_socket, input_buf, CHAR_ARRAY_SIZE, 0);if (recv_rv==SOCKET_ERROR || recv_rv==0) break;data=(short)atoi(input_buf);}while (0);if (connect_socket!=INVALID_SOCKET) CLOSE_SOCKET(connect_socket);if (wsa_data_init) WSACleanup();}b_main_sink(&data);}void b_main_sink(short * data_ptr){short data=*data_ptr;{char src[100];char dest[100]="";memset(src, 'A', 100-1);src[100-1]='\0';if (data < 100){strncpy(dest, src, data);}printLine(dest);}}
void b_main_sink(short * data);static void main(){short data;data=0;data=100-1;b_main_sink(&data);}void b_main_sink(short * data_ptr){short data=*data_ptr;{char src[100];char dest[100]="";memset(src, 'A', 100-1);src[100-1]='\0';if (data < 100){strncpy(dest, src, data);}printLine(dest);}}