Use sysexits.h for better exit-codes
[mmh] / sbr / fmt_scan.c
index 0616d17..a8e773a 100644 (file)
@@ -15,6 +15,7 @@
 #include <h/tws.h>
 #include <h/fmt_compile.h>
 #include <ctype.h>
+#include <sysexits.h>
 
 #ifdef HAVE_SYS_TIME_H
 # include <sys/time.h>
@@ -323,7 +324,7 @@ fmt_scan(struct format *format, char *scanl, int width, int *dat)
                        cptrimmed(&cp, str, fmt->f_width, fmt->f_fill, ep - cp);
                        break;
                case FT_STRFW:
-                       adios(NULL, "internal error (FT_STRFW)");
+                       adios(EX_SOFTWARE, NULL, "internal error (FT_STRFW)");
 
                case FT_NUM:
                        n = snprintf(cp, ep - cp + 1, "%d", value);
@@ -775,7 +776,7 @@ fmt_scan(struct format *format, char *scanl, int width, int *dat)
                        indent = strlen(sp);
                        wid -= indent;
                        if (wid <= 0) {
-                               adios(NULL, "putaddr -- num register (%d) "
+                               adios(EX_SOFTWARE, NULL, "putaddr -- num register (%d) "
                                                "must be greater than label "
                                                "width (%d)", value, indent);
                        }