mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
[nntp] enum nntp_code -> nntp_code_T
This commit is contained in:
parent
4478133f01
commit
fd1ba62f1b
@ -96,4 +96,5 @@ enum nntp_code {
|
|||||||
NNTP_CODE_580_AUTH_FAILED = 580, /* Authorization Failed */
|
NNTP_CODE_580_AUTH_FAILED = 580, /* Authorization Failed */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
typedef int nntp_code_T;
|
||||||
#endif
|
#endif
|
||||||
|
@ -280,7 +280,7 @@ read_nntp_data(struct socket *socket, struct read_buffer *rb)
|
|||||||
|
|
||||||
/* Translate NNTP code to the internal connection state. */
|
/* Translate NNTP code to the internal connection state. */
|
||||||
static struct connection_state
|
static struct connection_state
|
||||||
get_nntp_connection_state(enum nntp_code code)
|
get_nntp_connection_state(nntp_code_T code)
|
||||||
{
|
{
|
||||||
switch (code) {
|
switch (code) {
|
||||||
case NNTP_CODE_400_GOODBYE: return connection_state(S_NNTP_SERVER_HANG_UP);
|
case NNTP_CODE_400_GOODBYE: return connection_state(S_NNTP_SERVER_HANG_UP);
|
||||||
|
@ -63,7 +63,7 @@ struct nntp_connection_info {
|
|||||||
enum nntp_command command;
|
enum nntp_command command;
|
||||||
|
|
||||||
/* The current NNTP status or response code received from the server */
|
/* 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
|
/* Strings pointing into the connection URI. They caches info useful
|
||||||
* for requesting the target. */
|
* for requesting the target. */
|
||||||
|
@ -557,13 +557,13 @@ parse_nntp_group_parameters(struct nntp_connection_info *nntp,
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
enum nntp_code
|
nntp_code_T
|
||||||
get_nntp_response_code(struct connection *conn, struct read_buffer *rb)
|
get_nntp_response_code(struct connection *conn, struct read_buffer *rb)
|
||||||
{
|
{
|
||||||
struct nntp_connection_info *nntp = (struct nntp_connection_info *)conn->info;
|
struct nntp_connection_info *nntp = (struct nntp_connection_info *)conn->info;
|
||||||
char *line = rb->data;
|
char *line = rb->data;
|
||||||
char *end = get_nntp_line_end(rb->data, rb->length);
|
char *end = get_nntp_line_end(rb->data, rb->length);
|
||||||
enum nntp_code code;
|
nntp_code_T code;
|
||||||
int linelen;
|
int linelen;
|
||||||
|
|
||||||
if (!end) return NNTP_CODE_NONE;
|
if (!end) return NNTP_CODE_NONE;
|
||||||
|
@ -27,7 +27,7 @@ read_nntp_response_data(struct connection *conn, struct read_buffer *rb);
|
|||||||
* check should be rescheduled.
|
* check should be rescheduled.
|
||||||
* NNTP_CODE_INVALID if the response code is not within the range
|
* NNTP_CODE_INVALID if the response code is not within the range
|
||||||
* 100 - 599 of valid codes. */
|
* 100 - 599 of valid codes. */
|
||||||
enum nntp_code
|
nntp_code_T
|
||||||
get_nntp_response_code(struct connection *conn, struct read_buffer *rb);
|
get_nntp_response_code(struct connection *conn, struct read_buffer *rb);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
Loading…
Reference in New Issue
Block a user