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:
parent
a6886634bc
commit
68b069a657
@ -24,7 +24,7 @@
|
||||
#include "mime/backend/mailcap.h"
|
||||
#include "mime/backend/mimetypes.h"
|
||||
|
||||
static struct mime_backend *mime_backends[] = {
|
||||
static const struct mime_backend *const mime_backends[] = {
|
||||
&default_mime_backend,
|
||||
#ifdef CONFIG_MAILCAP
|
||||
&mailcap_mime_backend,
|
||||
@ -39,7 +39,7 @@ static struct mime_backend *mime_backends[] = {
|
||||
unsigned char *
|
||||
get_content_type_backends(unsigned char *extension)
|
||||
{
|
||||
struct mime_backend *backend;
|
||||
const struct mime_backend *backend;
|
||||
int i;
|
||||
|
||||
foreach_module (backend, mime_backends, i) {
|
||||
@ -57,7 +57,7 @@ get_content_type_backends(unsigned char *extension)
|
||||
struct mime_handler *
|
||||
get_mime_handler_backends(unsigned char *ctype, int have_x)
|
||||
{
|
||||
struct mime_backend *backend;
|
||||
const struct mime_backend *backend;
|
||||
int i;
|
||||
|
||||
foreach_module (backend, mime_backends, i) {
|
||||
|
@ -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_mime_handler: */ get_mime_handler_default,
|
||||
};
|
||||
|
@ -5,7 +5,7 @@
|
||||
#include "main/module.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;
|
||||
|
||||
#endif
|
||||
|
@ -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_mime_handler: */ get_mime_handler_mailcap,
|
||||
};
|
||||
|
@ -5,7 +5,7 @@
|
||||
#include "main/module.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;
|
||||
|
||||
#endif
|
||||
|
@ -270,7 +270,7 @@ get_content_type_mimetypes(unsigned char *extension)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
struct mime_backend mimetypes_mime_backend = {
|
||||
const struct mime_backend mimetypes_mime_backend = {
|
||||
/* get_content_type: */ get_content_type_mimetypes,
|
||||
/* get_mime_handler: */ NULL,
|
||||
};
|
||||
|
@ -5,7 +5,7 @@
|
||||
#include "main/module.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;
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user