A generic touchscreen calibration program for X.Org
Revisión | 63e7816e2188dd1085c63608e6be6d0694a3bd77 (tree) |
---|---|
Tiempo | 2011-04-20 19:24:48 |
Autor | Antoine Hue <antoine@peti...> |
Commiter | Tias Guns |
Fixing some error handling.
@@ -282,7 +282,7 @@ Calibrator* Calibrator::make_calibrator(int argc, char** argv) | ||
282 | 282 | |
283 | 283 | // unknown option |
284 | 284 | else { |
285 | - fprintf(stderr, "Unknown option: %s\n\n", argv[i]); | |
285 | + error ( "Unknown option: %s\n\n", argv[i]); | |
286 | 286 | usage(argv[0], thr_misclick); |
287 | 287 | exit(0); |
288 | 288 | } |
@@ -307,15 +307,15 @@ Calibrator* Calibrator::make_calibrator(int argc, char** argv) | ||
307 | 307 | if (list_devices) { |
308 | 308 | // printed the list in find_device |
309 | 309 | if (nr_found == 0) |
310 | - printf("No calibratable devices found.\n"); | |
311 | - exit(2); | |
310 | + error ("No calibratable devices found.\n"); | |
311 | + exit(0); | |
312 | 312 | } |
313 | 313 | |
314 | 314 | if (nr_found == 0) { |
315 | 315 | if (pre_device == NULL) |
316 | - fprintf (stderr, "Error: No calibratable devices found.\n"); | |
316 | + error ( "Error: No calibratable devices found.\n"); | |
317 | 317 | else |
318 | - fprintf (stderr, "Error: Device \"%s\" not found; use --list to list the calibratable input devices.\n", pre_device); | |
318 | + error ( "Error: Device \"%s\" not found; use --list to list the calibratable input devices.\n", pre_device); | |
319 | 319 | exit(1); |
320 | 320 | |
321 | 321 | } else if (nr_found > 1) { |