int main(int argc, char *argv[]) { int log_audio; int t38_mode; int test_sending; int use_gui; int opt; decode_test_file = NULL; log_audio = FALSE; test_sending = FALSE; t38_mode = FALSE; use_gui = FALSE; while ((opt = getopt(argc, argv, "d:glrst")) != -1) { switch (opt) { case 'd': decode_test_file = optarg; break; case 'g': #if defined(ENABLE_GUI) use_gui = TRUE; #else fprintf(stderr, "Graphical monitoring not available\n"); exit(2); #endif break; case 'l': log_audio = TRUE; break; case 'r': test_sending = FALSE; break; case 's': test_sending = TRUE; break; case 't': t38_mode = TRUE; break; default: //usage(); exit(2); break; } } if (t38_mode) t38_tests(use_gui, test_sending, 0, 1); else t30_tests(log_audio, test_sending); if (done) { printf("Tests passed\n"); } return 0; }
int main(int argc, char *argv[]) { int log_audio; int t38_mode; int test_sending; int use_ecm; int use_gui; int g1050_model_no; int g1050_speed_pattern_no; int opt; #if !defined(WIN32) int tioflags; #endif decode_test_file = NULL; log_audio = FALSE; test_sending = FALSE; t38_mode = FALSE; use_ecm = FALSE; use_gui = FALSE; g1050_model_no = 0; g1050_speed_pattern_no = 1; while ((opt = getopt(argc, argv, "d:eglM:rS:st")) != -1) { switch (opt) { case 'd': decode_test_file = optarg; break; case 'e': use_ecm = TRUE; break; case 'g': #if defined(ENABLE_GUI) use_gui = TRUE; #else fprintf(stderr, "Graphical monitoring not available\n"); exit(2); #endif break; case 'l': log_audio = TRUE; break; case 'M': g1050_model_no = optarg[0] - 'A' + 1; break; case 'r': test_sending = FALSE; break; case 'S': g1050_speed_pattern_no = atoi(optarg); break; case 's': test_sending = TRUE; break; case 't': t38_mode = TRUE; break; default: //usage(); exit(2); break; } } if (psuedo_terminal_create(&modem[0])) printf("Failure\n"); #if !defined(WIN32) ioctl(modem[0].slave, TIOCMGET, &tioflags); tioflags |= TIOCM_RI; ioctl(modem[0].slave, TIOCMSET, &tioflags); #endif t30_tests(t38_mode, use_ecm, use_gui, log_audio, test_sending, g1050_model_no, g1050_speed_pattern_no); if (psuedo_terminal_close(&modem[0])) printf("Failure\n"); printf("Tests passed\n"); return 0; }
int main(int argc, char *argv[]) { int log_audio; int t38_mode; int test_sending; int use_gui; int g1050_model_no; int g1050_speed_pattern_no; int opt; decode_test_file = NULL; log_audio = false; test_sending = false; t38_mode = false; use_gui = false; g1050_model_no = 0; g1050_speed_pattern_no = 1; while ((opt = getopt(argc, argv, "d:glM:rS:st")) != -1) { switch (opt) { case 'd': decode_test_file = optarg; break; case 'g': #if defined(ENABLE_GUI) use_gui = true; #else fprintf(stderr, "Graphical monitoring not available\n"); exit(2); #endif break; case 'l': log_audio = true; break; case 'M': g1050_model_no = optarg[0] - 'A' + 1; break; case 'r': test_sending = false; break; case 'S': g1050_speed_pattern_no = atoi(optarg); break; case 's': test_sending = true; break; case 't': t38_mode = true; break; default: //usage(); exit(2); break; } } if (t30_tests(t38_mode, use_gui, log_audio, test_sending, g1050_model_no, g1050_speed_pattern_no) < 0) return 2; printf("Tests passed\n"); return 0; }