Add new routine krb5_input_flag_to_string to allow an application to
authorEzra Peisach <epeisach@mit.edu>
Sun, 10 Dec 1995 16:19:38 +0000 (16:19 +0000)
committerEzra Peisach <epeisach@mit.edu>
Sun, 10 Dec 1995 16:19:38 +0000 (16:19 +0000)
loop over the input flag strings for displaying help messages (i.e.
modent in krb5_edit).

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7187 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/kadm/ChangeLog
src/lib/kadm/str_conv.c

index 791ec525336594f1fe90d373732cc0771df92e37..fdf21ac2d143973a15bc9befe4cfe2d9e4f6b37f 100644 (file)
@@ -1,3 +1,7 @@
+Sun Dec 10 11:02:56 1995  Ezra Peisach  <epeisach@kangaroo.mit.edu>
+
+       * str_conv.c (krb5_input_flag_to_string): Add new routine.
+
 Wed Nov  8 02:46:54 1995  Theodore Y. Ts'o  <tytso@dcl>
 
        * alt_prof.c (krb5_free_realm_params): Free the realm_kdc_ports
index fc99674932c0b61be77a3862d1fd883b758ca37d..ccd0da03035b39fa03643cf5c1b06d4a428c6cb4 100644 (file)
@@ -207,3 +207,15 @@ krb5_flags_to_string(flags, sep, buffer, buflen)
     }
     return(retval);
 }
+
+krb5_error_code
+krb5_input_flag_to_string(flag, buffer, buflen)
+    int                flag;
+    char       * buffer;
+    size_t     buflen;
+{
+    if(flag < 0 || flag >= flags_table_nents) return ENOENT; /* End of list */
+    if(strlen(flags_table[flag].fl_specifier) > buflen) return ENOMEM;
+    strcpy(buffer, flags_table[flag].fl_specifier);
+    return  0;
+}