+2000-11-14 Ken Raeburn <raeburn@mit.edu>
+
+ * Makefile.in (check-unix): Depend on, and run, t_com_err and
+ test_et.
+ * test_et.c (main): Return type is int; return 0 at end. Use %ld
+ format for error code values.
+ (error_table_name): Declare.
+
2000-11-08 Ken Raeburn <raeburn@mit.edu>
Test out lclint and its4 on com_err library, fixing reported
clean-unix::
$(RM) $(BUILDTOP)/include/com_err.h
+# test_et doesn't have an interesting exit status, but it'll exercise
+# some cases that t_com_err doesn't, so let's see if it crashes.
+check-unix:: t_com_err test_et
+ ./test_et
+ ./t_com_err
+
# The real compile_et just isn't portable. (But then again, anything using
# lex and yacc isn't portable by definition. :-( )
#
extern int sys_nerr, errno;
-main()
+/* XXX Not part of official public API. */
+extern const char *error_table_name (errcode_t);
+
+int main()
{
printf("Before initiating error table:\n\n");
printf("Table name '%s'\n", error_table_name(KRB_MK_AP_TGTEXP));
printf("With 0: tgt-expired -> %s\n", error_message(KRB_MK_AP_TGTEXP));
initialize_krb_error_table();
- printf("KRB error table initialized: base %d (%s), name %s\n",
+ printf("KRB error table initialized: base %ld (%s), name %s\n",
ERROR_TABLE_BASE_krb, error_message(ERROR_TABLE_BASE_krb),
error_table_name(ERROR_TABLE_BASE_krb));
initialize_krb_error_table();
error_message(KRB_MK_AP_TGTEXP));
initialize_quux_error_table();
- printf("QUUX error table initialized: base %d (%s), name %s\n",
+ printf("QUUX error table initialized: base %ld (%s), name %s\n",
ERROR_TABLE_BASE_quux, error_message(ERROR_TABLE_BASE_quux),
error_table_name(ERROR_TABLE_BASE_quux));
com_err("whoami", FOO_ERR, " -- message goes %s", "here");
com_err("whoami", 0, (char *)0);
com_err("whoami", 0, "error number %d\n", 0);
+ return 0;
}