1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

Make MIME backend metadata const.

This commit is contained in:
Kalle Olavi Niemitalo 2007-02-04 13:34:48 +02:00 committed by Kalle Olavi Niemitalo
parent a6886634bc
commit 68b069a657
7 changed files with 9 additions and 9 deletions

View File

@ -24,7 +24,7 @@
#include "mime/backend/mailcap.h" #include "mime/backend/mailcap.h"
#include "mime/backend/mimetypes.h" #include "mime/backend/mimetypes.h"
static struct mime_backend *mime_backends[] = { static const struct mime_backend *const mime_backends[] = {
&default_mime_backend, &default_mime_backend,
#ifdef CONFIG_MAILCAP #ifdef CONFIG_MAILCAP
&mailcap_mime_backend, &mailcap_mime_backend,
@ -39,7 +39,7 @@ static struct mime_backend *mime_backends[] = {
unsigned char * unsigned char *
get_content_type_backends(unsigned char *extension) get_content_type_backends(unsigned char *extension)
{ {
struct mime_backend *backend; const struct mime_backend *backend;
int i; int i;
foreach_module (backend, mime_backends, i) { foreach_module (backend, mime_backends, i) {
@ -57,7 +57,7 @@ get_content_type_backends(unsigned char *extension)
struct mime_handler * struct mime_handler *
get_mime_handler_backends(unsigned char *ctype, int have_x) get_mime_handler_backends(unsigned char *ctype, int have_x)
{ {
struct mime_backend *backend; const struct mime_backend *backend;
int i; int i;
foreach_module (backend, mime_backends, i) { foreach_module (backend, mime_backends, i) {

View File

@ -206,7 +206,7 @@ get_mime_handler_default(unsigned char *type, int have_x)
} }
struct mime_backend default_mime_backend = { const struct mime_backend default_mime_backend = {
/* get_content_type: */ get_content_type_default, /* get_content_type: */ get_content_type_default,
/* get_mime_handler: */ get_mime_handler_default, /* get_mime_handler: */ get_mime_handler_default,
}; };

View File

@ -5,7 +5,7 @@
#include "main/module.h" #include "main/module.h"
#include "mime/backend/common.h" #include "mime/backend/common.h"
extern struct mime_backend default_mime_backend; extern const struct mime_backend default_mime_backend;
extern struct module default_mime_module; extern struct module default_mime_module;
#endif #endif

View File

@ -661,7 +661,7 @@ get_mime_handler_mailcap(unsigned char *type, int options)
} }
struct mime_backend mailcap_mime_backend = { const struct mime_backend mailcap_mime_backend = {
/* get_content_type: */ NULL, /* get_content_type: */ NULL,
/* get_mime_handler: */ get_mime_handler_mailcap, /* get_mime_handler: */ get_mime_handler_mailcap,
}; };

View File

@ -5,7 +5,7 @@
#include "main/module.h" #include "main/module.h"
#include "mime/backend/common.h" #include "mime/backend/common.h"
extern struct mime_backend mailcap_mime_backend; extern const struct mime_backend mailcap_mime_backend;
extern struct module mailcap_mime_module; extern struct module mailcap_mime_module;
#endif #endif

View File

@ -270,7 +270,7 @@ get_content_type_mimetypes(unsigned char *extension)
return NULL; return NULL;
} }
struct mime_backend mimetypes_mime_backend = { const struct mime_backend mimetypes_mime_backend = {
/* get_content_type: */ get_content_type_mimetypes, /* get_content_type: */ get_content_type_mimetypes,
/* get_mime_handler: */ NULL, /* get_mime_handler: */ NULL,
}; };

View File

@ -5,7 +5,7 @@
#include "main/module.h" #include "main/module.h"
#include "mime/backend/common.h" #include "mime/backend/common.h"
extern struct mime_backend mimetypes_mime_backend; extern const struct mime_backend mimetypes_mime_backend;
extern struct module mimetypes_mime_module; extern struct module mimetypes_mime_module;
#endif #endif