1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-06-27 01:25:34 +00:00

[nntp] enum nntp_code -> nntp_code_T

This commit is contained in:
Witold Filipczyk 2022-01-28 17:07:51 +01:00
parent 4478133f01
commit fd1ba62f1b
5 changed files with 6 additions and 5 deletions

View File

@ -96,4 +96,5 @@ enum nntp_code {
NNTP_CODE_580_AUTH_FAILED = 580, /* Authorization Failed */
};
typedef int nntp_code_T;
#endif

View File

@ -280,7 +280,7 @@ read_nntp_data(struct socket *socket, struct read_buffer *rb)
/* Translate NNTP code to the internal connection state. */
static struct connection_state
get_nntp_connection_state(enum nntp_code code)
get_nntp_connection_state(nntp_code_T code)
{
switch (code) {
case NNTP_CODE_400_GOODBYE: return connection_state(S_NNTP_SERVER_HANG_UP);

View File

@ -63,7 +63,7 @@ struct nntp_connection_info {
enum nntp_command command;
/* The current NNTP status or response code received from the server */
enum nntp_code code;
nntp_code_T code;
/* Strings pointing into the connection URI. They caches info useful
* for requesting the target. */

View File

@ -557,13 +557,13 @@ parse_nntp_group_parameters(struct nntp_connection_info *nntp,
return 1;
}
enum nntp_code
nntp_code_T
get_nntp_response_code(struct connection *conn, struct read_buffer *rb)
{
struct nntp_connection_info *nntp = (struct nntp_connection_info *)conn->info;
char *line = rb->data;
char *end = get_nntp_line_end(rb->data, rb->length);
enum nntp_code code;
nntp_code_T code;
int linelen;
if (!end) return NNTP_CODE_NONE;

View File

@ -27,7 +27,7 @@ read_nntp_response_data(struct connection *conn, struct read_buffer *rb);
* check should be rescheduled.
* NNTP_CODE_INVALID if the response code is not within the range
* 100 - 599 of valid codes. */
enum nntp_code
nntp_code_T
get_nntp_response_code(struct connection *conn, struct read_buffer *rb);
#ifdef __cplusplus