Added missing prototypes, protected
argument decls with __P and the whole stuff with extern "C".
Showing
1 changed file
with
58 additions
and
24 deletions
... | @@ -23,64 +23,98 @@ | ... | @@ -23,64 +23,98 @@ |
23 | 23 | ||
24 | /* See RFC1524 (A User Agent Configuration Mechanism). */ | 24 | /* See RFC1524 (A User Agent Configuration Mechanism). */ |
25 | 25 | ||
26 | #ifdef __cplusplus | ||
27 | extern "C" { | ||
28 | #endif | ||
29 | |||
26 | /* Create a mailcap from stream. */ | 30 | /* Create a mailcap from stream. */ |
27 | int mu_mailcap_create (mu_mailcap_t * mailcap, stream_t stream); | 31 | int mu_mailcap_create __P((mu_mailcap_t * mailcap, stream_t stream)); |
28 | 32 | ||
29 | /* Destroy mailcap object. */ | 33 | /* Destroy mailcap object. */ |
30 | void mu_mailcap_destroy (mu_mailcap_t * mailcap); | 34 | void mu_mailcap_destroy __P((mu_mailcap_t * mailcap)); |
31 | 35 | ||
32 | /* Return the number of entries in the mailcap file. */ | 36 | /* Return the number of entries in the mailcap file. */ |
33 | int mu_mailcap_entries_count (mu_mailcap_t mailcap, size_t *pno); | 37 | int mu_mailcap_entries_count __P((mu_mailcap_t mailcap, size_t *pno)); |
34 | 38 | ||
35 | /* Return the mailcap record number, no, of the mailcap file . */ | 39 | /* Return the mailcap record number, no, of the mailcap file . */ |
36 | int mu_mailcap_get_entry (mu_mailcap_t mailcap, size_t no, mu_mailcap_entry_t *entry); | 40 | int mu_mailcap_get_entry __P((mu_mailcap_t mailcap, size_t no, |
41 | mu_mailcap_entry_t *entry)); | ||
42 | |||
43 | /* Return the number of fields in a mailcap entry */ | ||
44 | int mu_mailcap_entry_fields_count __P((mu_mailcap_entry_t entry, | ||
45 | size_t *pcount)); | ||
37 | 46 | ||
38 | /* Save in buffer[] the content-type of the record. */ | 47 | /* Save in buffer[] the content-type of the record. */ |
39 | int mu_mailcap_entry_get_typefield (mu_mailcap_entry_t entry, char *buffer, size_t buflen, size_t *pn); | 48 | int mu_mailcap_entry_get_typefield __P((mu_mailcap_entry_t entry, |
49 | char *buffer, size_t buflen, | ||
50 | size_t *pn)); | ||
40 | 51 | ||
41 | /* Save in buffer[] the view command of the record. */ | 52 | /* Save in buffer[] the view command of the record. */ |
42 | int mu_mailcap_entry_get_viewcommand (mu_mailcap_entry_t entry, char *buffer, size_t buflen, size_t *pn); | 53 | int mu_mailcap_entry_get_viewcommand __P((mu_mailcap_entry_t entry, |
54 | char *buffer, size_t buflen, | ||
55 | size_t *pn)); | ||
43 | 56 | ||
44 | /* Save in buffer[] the field number no the record . */ | 57 | /* Save in buffer[] the field number no the record . */ |
45 | int mu_mailcap_entry_get_field (mu_mailcap_entry_t entry, size_t no, char *buffer, size_t buflen, size_t *pn); | 58 | int mu_mailcap_entry_get_field __P((mu_mailcap_entry_t entry, size_t no, |
59 | char *buffer, size_t buflen, size_t *pn)); | ||
46 | 60 | ||
47 | /* Save in buffer the value of a key: | 61 | /* Save in buffer the value of a key: |
48 | * mu_mailcap_entry_get_value (entry, "compose", buffer, buflen, pn); | 62 | * mu_mailcap_entry_get_value __P((entry, "compose", buffer, buflen, pn)); |
49 | * i.e compose="lynx %s" --> "lynx %s" will be save in buffer without the quotes. */ | 63 | * i.e compose="lynx %s" --> "lynx %s" will be saved in the buffer without |
50 | int mu_mailcap_entry_get_value (mu_mailcap_entry_t entry, const char *key, char *buffer, size_t buflen, size_t *pn); | 64 | * the quotes. */ |
51 | 65 | int mu_mailcap_entry_get_value __P((mu_mailcap_entry_t entry, const char *key, | |
66 | char *buffer, size_t buflen, size_t *pn)); | ||
52 | 67 | ||
53 | /* Helper function saving in buffer, the argument of "compose" field. */ | 68 | /* Helper function saving in buffer, the argument of "compose" field. */ |
54 | int mu_mailcap_entry_get_compose (mu_mailcap_entry_t entry, char *buffer, size_t buflen, size_t *pn); | 69 | int mu_mailcap_entry_get_compose __P((mu_mailcap_entry_t entry, char *buffer, |
70 | size_t buflen, size_t *pn)); | ||
55 | 71 | ||
56 | /* Helper function saving in buffer, the argument of "composetyped" field. */ | 72 | /* Helper function saving in buffer, the argument of "composetyped" field. */ |
57 | int mu_mailcap_entry_get_composetyped (mu_mailcap_entry_t entry, char *buffer, size_t buflen, size_t *pn); | 73 | int mu_mailcap_entry_get_composetyped __P((mu_mailcap_entry_t entry, |
74 | char *buffer, size_t buflen, | ||
75 | size_t *pn)); | ||
58 | 76 | ||
59 | /* Helper function saving in buffer, the argument of "edit" field. */ | 77 | /* Helper function saving in buffer, the argument of "edit" field. */ |
60 | int mu_mailcap_entry_get_edit (mu_mailcap_entry_t entry, char *buffer, size_t buflen, size_t *pn); | 78 | int mu_mailcap_entry_get_edit __P((mu_mailcap_entry_t entry, char *buffer, |
79 | size_t buflen, size_t *pn)); | ||
61 | 80 | ||
62 | /* Helper function saving in buffer, the argument of "textualnewlines" field. */ | 81 | /* Helper function saving in buffer, the argument of "textualnewlines" field. */ |
63 | int mu_mailcap_entry_get_textualnewlines (mu_mailcap_entry_t entry, char *buffer, size_t buflen, size_t *pn); | 82 | int mu_mailcap_entry_get_textualnewlines __P((mu_mailcap_entry_t entry, |
83 | char *buffer, size_t buflen, | ||
84 | size_t *pn)); | ||
64 | 85 | ||
65 | /* Helper function saving in buffer, the argument of "test" field. */ | 86 | /* Helper function saving in buffer, the argument of "test" field. */ |
66 | int mu_mailcap_entry_get_test (mu_mailcap_entry_t entry, char *buffer, size_t buflen, size_t *pn); | 87 | int mu_mailcap_entry_get_test __P((mu_mailcap_entry_t entry, |
88 | char *buffer, size_t buflen, size_t *pn)); | ||
67 | 89 | ||
68 | /* Helper function saving in buffer, the argument of "x11-bitmap" field. */ | 90 | /* Helper function saving in buffer, the argument of "x11-bitmap" field. */ |
69 | int mu_mailcap_entry_get_x11bitmap (mu_mailcap_entry_t entry, char *buffer, size_t buflen, size_t *pn); | 91 | int mu_mailcap_entry_get_x11bitmap __P((mu_mailcap_entry_t entry, |
92 | char *buffer, size_t buflen, size_t *pn)); | ||
70 | 93 | ||
71 | /* Helper function saving in buffer, the argument of "description" field. */ | 94 | /* Helper function saving in buffer, the argument of "description" field. */ |
72 | int mu_mailcap_entry_get_description (mu_mailcap_entry_t entry, char *buffer, size_t buflen, size_t *pn); | 95 | int mu_mailcap_entry_get_description __P((mu_mailcap_entry_t entry, |
96 | char *buffer, size_t buflen, | ||
97 | size_t *pn)); | ||
73 | 98 | ||
74 | /* Helper function saving in buffer, the argument of "nametemplate" field. */ | 99 | /* Helper function saving in buffer, the argument of "nametemplate" field. */ |
75 | int mu_mailcap_entry_get_nametemplate (mu_mailcap_entry_t entry, char *buffer, size_t buflen, size_t *pn); | 100 | int mu_mailcap_entry_get_nametemplate __P((mu_mailcap_entry_t entry, |
101 | char *buffer, size_t buflen, | ||
102 | size_t *pn)); | ||
76 | 103 | ||
77 | /* Helper function saving in buffer, the argument of "notes" field. */ | 104 | /* Helper function saving in buffer, the argument of "notes" field. */ |
78 | int mu_mailcap_entry_get_notes (mu_mailcap_entry_t entry, char *buffer, size_t buflen, size_t *pn); | 105 | int mu_mailcap_entry_get_notes __P((mu_mailcap_entry_t entry, char *buffer, |
106 | size_t buflen, size_t *pn)); | ||
79 | 107 | ||
80 | /* Helper function return *on != 0 if the flag "needsterminal" is in the record. */ | 108 | /* Helper function. Returns *on != 0 if the flag "needsterminal" is in the |
81 | int mu_mailcap_entry_needsterminal (mu_mailcap_entry_t entry, int *on); | 109 | record. */ |
110 | int mu_mailcap_entry_needsterminal __P((mu_mailcap_entry_t entry, int *on)); | ||
82 | 111 | ||
83 | /* Helper function return *on != 0 if the flag "copiousoutput" is in the record. */ | 112 | /* Helper function. Returns *on != 0 if the flag "copiousoutput" is in the |
84 | int mu_mailcap_entry_copiousoutput (mu_mailcap_entry_t entry, int *on); | 113 | record. */ |
114 | int mu_mailcap_entry_copiousoutput __P((mu_mailcap_entry_t entry, int *on)); | ||
85 | 115 | ||
116 | #ifdef __cplusplus | ||
117 | } | ||
118 | #endif | ||
119 | |||
86 | #endif | 120 | #endif | ... | ... |
-
Please register or sign in to post a comment