|
|
@ -294,7 +294,12 @@ main(int argc, char *argv[]) |
|
|
|
orientation = atoi(argv[++i]); |
|
|
|
orientation = atoi(argv[++i]); |
|
|
|
} else if (!strcmp(argv[i], "-g")) { |
|
|
|
} else if (!strcmp(argv[i], "-g")) { |
|
|
|
gestsarrlen++; |
|
|
|
gestsarrlen++; |
|
|
|
realloc(gestsarr, (gestsarrlen * sizeof(Gesture))); |
|
|
|
void *ptr = realloc(gestsarr, (gestsarrlen * sizeof(Gesture))); |
|
|
|
|
|
|
|
if ( ptr == NULL ) { |
|
|
|
|
|
|
|
perror("Could not allocate memory"); |
|
|
|
|
|
|
|
exit(EXIT_FAILURE); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
gestsarr = ptr; |
|
|
|
gestpt = strtok(argv[++i], ","); |
|
|
|
gestpt = strtok(argv[++i], ","); |
|
|
|
for (j = 0; gestpt != NULL && j < 3; gestpt = strtok(NULL, ","), j++) { |
|
|
|
for (j = 0; gestpt != NULL && j < 3; gestpt = strtok(NULL, ","), j++) { |
|
|
|
switch(j) { |
|
|
|
switch(j) { |
|
|
|