Преглед изворни кода

Merge branch 'no-obscure-errors' into maint

* no-obscure-errors:
  * Disable obscure shell errors

Conflicts:
	doc/UPDATES
Bryan Drewery пре 17 година
родитељ
комит
916d3e7cc2
2 измењених фајлова са 5 додато и 0 уклоњено
  1. 1 0
      doc/UPDATES
  2. 4 0
      src/shell.c

+ 1 - 0
doc/UPDATES

@@ -1,4 +1,5 @@
 * Binary pass prompt has been changed to be more clear.
 * Binary pass prompt has been changed to be more clear.
+* Make errors non-obscure. (Compile with OBSCURE_ERRORS to re-enable)
 
 
 1.2.16 - http://wraith.botpack.net/milestone/1.2.16
 1.2.16 - http://wraith.botpack.net/milestone/1.2.16
 * Add 'set altchars' so that alternative characters used for nicks can be changed. (fixes #418)
 * Add 'set altchars' so that alternative characters used for nicks can be changed. (fixes #418)

+ 4 - 0
src/shell.c

@@ -726,9 +726,13 @@ void werr(int errnum)
   }
   }
   */
   */
   /*  printf("\n[%lu]+  Stopped                 %s\r\n", job, basename(binname)); */
   /*  printf("\n[%lu]+  Stopped                 %s\r\n", job, basename(binname)); */
+#ifdef OBSCURE_ERRORS
   sdprintf(STR("Error %d: %s"), errnum, werr_tostr(errnum));
   sdprintf(STR("Error %d: %s"), errnum, werr_tostr(errnum));
   printf(STR("*** Error code %d\n\n"), errnum);
   printf(STR("*** Error code %d\n\n"), errnum);
   printf(STR("Segmentation fault\n"));
   printf(STR("Segmentation fault\n"));
+#else
+  printf(STR("Error %d: %s\n"), errnum, werr_tostr(errnum));
+#endif
   fatal("", 0);
   fatal("", 0);
   exit(0);				//gcc is stupid :)
   exit(0);				//gcc is stupid :)
 }
 }