/** * Application entry point * @param argc Number of command line arguments * @param argv Array of command line arguments * @return EXIT_SUCCESS if all ok */ int main(int argc, char **argv){ if(argc_check(argc) || argv_check(argv)){ FILE *binFile = fopen(argv[1], "rb"); memory_load_file(binFile); // fclose(binFile); } else{ return EXIT_FAILURE; } return EXIT_SUCCESS; }
int main(int argc, char **argv){ pthread_t thread_1; int ret_code; argv_check(argc,argv); if(keep_alive == 0){ pthread_create(&thread_1, NULL, trans_thread, NULL); ret_code = pthread_join(thread_1, NULL); } else{ while(1){ printf(">>>"); fflush(stdout); fgets(str_to_trans,150,stdin); pthread_create(&thread_1, NULL, trans_thread, NULL); ret_code = pthread_join(thread_1, NULL); } } //printf("retcode:%d\n",ret_code); return 0; }