1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-11-04 08:17:17 -05:00

Bug 744: Consume semicolons and fix parameters of stubs.

Most stub protocol handlers were protocol_external_handler_T when they
should have been protocol_handler_T.
This commit is contained in:
Kalle Olavi Niemitalo 2007-07-19 17:07:28 +03:00 committed by Witold Filipczyk
parent 22cfb0b71c
commit 54178b189f

View File

@ -4,11 +4,11 @@
#include "elinks.h"
#include "bfu/msgbox.h" /* msg_text, msg_box */
#include "bfu/msgbox.h"
#include "main/module.h"
#include "protocol/test/harness.h"
#include "protocol/user.h" /* get_user_program */
#include "session/session.h" /* print_error_dialog */
#include "protocol/user.h"
#include "session/session.h"
#define STUB_MODULE(name) \
struct module name = struct_module( \
@ -41,28 +41,37 @@ stub_called(const unsigned char *fun)
test_failed();
}
#define STUB_PROTOCOL_HANDLER(name) \
#define STUB_PROTOCOL_HANDLER(name) \
void \
name(struct connection *conn) \
{ \
stub_called(#name); \
} \
protocol_handler_T name /* consume semicolon */
#define STUB_PROTOCOL_EXTERNAL_HANDLER(name) \
void \
name(struct session *ses, struct uri *uri) \
{ \
stub_called(#name); \
}
STUB_PROTOCOL_HANDLER(about_protocol_handler)
} \
protocol_external_handler_T name /* consume semicolon */
STUB_PROTOCOL_HANDLER(about_protocol_handler);
STUB_PROTOCOL_HANDLER(bittorrent_protocol_handler);
STUB_PROTOCOL_HANDLER(data_protocol_handler)
STUB_PROTOCOL_HANDLER(ecmascript_protocol_handler)
STUB_PROTOCOL_HANDLER(file_protocol_handler)
STUB_PROTOCOL_HANDLER(data_protocol_handler);
STUB_PROTOCOL_EXTERNAL_HANDLER(ecmascript_protocol_handler);
STUB_PROTOCOL_HANDLER(file_protocol_handler);
STUB_PROTOCOL_HANDLER(finger_protocol_handler);
STUB_PROTOCOL_HANDLER(fsp_protocol_handler)
STUB_PROTOCOL_HANDLER(ftp_protocol_handler)
STUB_PROTOCOL_HANDLER(fsp_protocol_handler);
STUB_PROTOCOL_HANDLER(ftp_protocol_handler);
STUB_PROTOCOL_HANDLER(gopher_protocol_handler);
STUB_PROTOCOL_HANDLER(http_protocol_handler)
STUB_PROTOCOL_HANDLER(http_protocol_handler);
STUB_PROTOCOL_HANDLER(news_protocol_handler);
STUB_PROTOCOL_HANDLER(nntp_protocol_handler);
STUB_PROTOCOL_HANDLER(proxy_protocol_handler)
STUB_PROTOCOL_HANDLER(smb_protocol_handler)
STUB_PROTOCOL_HANDLER(user_protocol_handler)
STUB_PROTOCOL_HANDLER(proxy_protocol_handler);
STUB_PROTOCOL_HANDLER(smb_protocol_handler);
STUB_PROTOCOL_EXTERNAL_HANDLER(user_protocol_handler);
/* declared in "protocol/user.h" */
unsigned char *
get_user_program(struct terminal *term, unsigned char *progid, int progidlen)
{
@ -70,6 +79,7 @@ get_user_program(struct terminal *term, unsigned char *progid, int progidlen)
return NULL;
}
/* declared in "session/session.h" */
void
print_error_dialog(struct session *ses, enum connection_state state,
struct uri *uri, enum connection_priority priority)
@ -77,6 +87,7 @@ print_error_dialog(struct session *ses, enum connection_state state,
stub_called("print_error_dialog");
}
/* declared in "bfu/msgbox.h" */
unsigned char *
msg_text(struct terminal *term, unsigned char *format, ...)
{
@ -84,6 +95,7 @@ msg_text(struct terminal *term, unsigned char *format, ...)
return NULL;
}
/* declared in "bfu/msgbox.h" */
struct dialog_data *
msg_box(struct terminal *term, struct memory_list *mem_list,
enum msgbox_flags flags, unsigned char *title, enum format_align align,