Reorganise -subj option code, fix buffer overrun.
diff --git a/apps/apps.h b/apps/apps.h
index a05ba71..5b3836a 100644
--- a/apps/apps.h
+++ b/apps/apps.h
@@ -253,6 +253,8 @@
 			ASN1_GENERALIZEDTIME **pinvtm, char *str);
 int make_serial_index(TXT_DB *db);
 
+X509_NAME *do_subject(char *str, long chtype);
+
 #define FORMAT_UNDEF    0
 #define FORMAT_ASN1     1
 #define FORMAT_TEXT     2