static int main_texinfo(void) { int i, j; const char *desc; const char *_name; char buffer[500]; error_name names_to_sort[MAX_CODES]; /* up to MAX_CODES names */ printf("@multitable @columnfractions .15 .40 .37\n"); memset(names_to_sort, 0, sizeof(names_to_sort)); j = 0; for (i = 0; i > -MAX_CODES; i--) { _name = gnutls_strerror_name(i); if (_name == NULL) continue; desc = gnutls_strerror(i); printf("@item %d @tab %s @tab %s\n", i, escape_texi_string(_name, buffer, sizeof(buffer)), desc); strcpy(names_to_sort[j].name, _name); names_to_sort[j].error_index = i; j++; } printf("@end multitable\n"); return 0; }
static void main_texinfo (void) { { size_t i; const char *name; char id[2]; gnutls_kx_algorithm_t kx; gnutls_cipher_algorithm_t cipher; gnutls_mac_algorithm_t mac; gnutls_protocol_t version; printf ("@heading Ciphersuites\n"); printf ("@multitable @columnfractions .60 .20 .20\n"); printf("@headitem Ciphersuite name @tab TLS ID @tab Since\n"); for (i = 0; (name = gnutls_cipher_suite_info (i, id, &kx, &cipher, &mac, &version)); i++) { printf ("@item %s\n@tab 0x%02X 0x%02X\n@tab %s\n", escape_texi_string(name, buffer, sizeof(buffer)), (unsigned char) id[0], (unsigned char) id[1], gnutls_protocol_get_name (version)); } printf ("@end multitable\n"); } { const gnutls_certificate_type_t *p = gnutls_certificate_type_list (); printf ("\n\n@heading Certificate types\n"); printf ("@table @code\n"); for (; *p; p++) { printf ("@item %s\n", gnutls_certificate_type_get_name (*p)); } printf ("@end table\n"); } { const gnutls_protocol_t *p = gnutls_protocol_list (); printf ("\n@heading Protocols\n@table @code\n"); for (; *p; p++) { printf ("@item %s\n", gnutls_protocol_get_name (*p)); } printf ("@end table\n"); } { const gnutls_cipher_algorithm_t *p = gnutls_cipher_list (); printf ("\n@heading Ciphers\n@table @code\n"); for (; *p; p++) { printf ("@item %s\n", gnutls_cipher_get_name (*p)); } printf ("@end table\n"); } { const gnutls_mac_algorithm_t *p = gnutls_mac_list (); printf ("\n@heading MAC algorithms\n@table @code\n"); for (; *p; p++) { printf ("@item %s\n", gnutls_mac_get_name (*p)); } printf ("@end table\n"); } { const gnutls_kx_algorithm_t *p = gnutls_kx_list (); printf ("\n@heading Key exchange methods\n@table @code\n"); for (; *p; p++) { printf ("@item %s\n", gnutls_kx_get_name (*p)); } printf ("@end table\n"); } { const gnutls_pk_algorithm_t *p = gnutls_pk_list (); printf ("\n@heading Public key algorithms\n@table @code\n"); for (; *p; p++) { printf ("@item %s\n", gnutls_pk_get_name (*p)); } printf ("@end table\n"); } { const gnutls_sign_algorithm_t *p = gnutls_sign_list (); printf ("\n@heading Public key signature algorithms\n@table @code\n"); for (; *p; p++) { printf ("@item %s\n", gnutls_sign_get_name (*p)); } printf ("@end table\n"); } { const gnutls_ecc_curve_t *p = gnutls_ecc_curve_list (); printf ("\n@heading Elliptic curves\n@table @code\n"); for (; *p; p++) { printf ("@item %s\n", gnutls_ecc_curve_get_name (*p)); } printf ("@end table\n"); } { const gnutls_compression_method_t *p = gnutls_compression_list (); printf ("\n@heading Compression methods\n@table @code\n"); for (; *p; p++) { printf ("@item %s\n", gnutls_compression_get_name (*p)); } printf ("@end table\n"); } }