• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

A generic touchscreen calibration program for X.Org


Commit MetaInfo

Revisión63e7816e2188dd1085c63608e6be6d0694a3bd77 (tree)
Tiempo2011-04-20 19:24:48
AutorAntoine Hue <antoine@peti...>
CommiterTias Guns

Log Message

Fixing some error handling.

Cambiar Resumen

Diferencia incremental

--- a/src/main_common.cpp
+++ b/src/main_common.cpp
@@ -282,7 +282,7 @@ Calibrator* Calibrator::make_calibrator(int argc, char** argv)
282282
283283 // unknown option
284284 else {
285- fprintf(stderr, "Unknown option: %s\n\n", argv[i]);
285+ error ( "Unknown option: %s\n\n", argv[i]);
286286 usage(argv[0], thr_misclick);
287287 exit(0);
288288 }
@@ -307,15 +307,15 @@ Calibrator* Calibrator::make_calibrator(int argc, char** argv)
307307 if (list_devices) {
308308 // printed the list in find_device
309309 if (nr_found == 0)
310- printf("No calibratable devices found.\n");
311- exit(2);
310+ error ("No calibratable devices found.\n");
311+ exit(0);
312312 }
313313
314314 if (nr_found == 0) {
315315 if (pre_device == NULL)
316- fprintf (stderr, "Error: No calibratable devices found.\n");
316+ error ( "Error: No calibratable devices found.\n");
317317 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);
319319 exit(1);
320320
321321 } else if (nr_found > 1) {