Revision 1077 branches/simulator/projects/simulator/simulator/core/main.c

View differences:

main.c
29 29
	if (robots_initialize())
30 30
		return -1;
31 31

  
32
	if(argc - optind < 0){
33
		printf("Usage: simulator <robot execetuable>\n");
34
		exit(-1);
35
	}        
36

  
37 32
	int c;
38
    char worldLoadedFlag = 0;
33
	char worldLoadedFlag = 0;
39 34

  
40 35
	while((c = getopt(argc, argv, ":l:p:w:")) != -1)
41 36
	{
......
61 56
				break;
62 57
		}
63 58
	}
59
	
60
	if(argc - optind < 0){
61
		printf("Usage: simulator <robot execetuable>\n");
62
		exit(-1);
63
	}        
64 64

  
65 65
	if(!worldLoadedFlag)
66 66
		load_world("../test/world.txt", 100);
67 67

  
68
	if (optind > 0 && optind < argc)
69
		robot_create(argv[optind]);
68 70

  
69
	robot_create(argv[optind]);
70
	/*robot_create(argv[optind]);
71
	robot_create(argv[optind]);
72
	robot_create(argv[optind]);
73
	robot_create(argv[optind]);
74
	robot_create(argv[optind]);
75
	robot_create(argv[optind]);
76
	robot_create(argv[optind]);
77
	robot_create(argv[optind]);
78
	robot_create(argv[optind]);
79
	robot_create(argv[optind]);
80
	robot_create(argv[optind]);
81
	robot_create(argv[optind]);
82
	robot_create(argv[optind]);
83
	robot_create(argv[optind]);
84
	robot_create(argv[optind]);
85
	robot_create(argv[optind]);
86
	robot_create(argv[optind]);
87
	robot_create(argv[optind]);
88
	robot_create(argv[optind]);*/
89

  
90

  
91 71
	sigset_t set;
92 72
	//TODO: errors
93 73
	sigemptyset(&set);

Also available in: Unified diff