commit - 364730f45d4ccc77ec080e287723104cee560cd0
commit + 0d877486d2b85f6e333e50765e1f2cf8119da67c
blob - a01c8522f771678381c7403b2105b8363ad9f0f2
blob + 9774cd2d627ecdd5300f75a8b1add9ca0d456326
--- mime.c
+++ mime.c
static int check_for_utf8(char*);
-static struct parser_table {
+static const struct parser_table {
const char *mediatype;
void (*parserinit)(struct parser*);
} ptable[] = {
int
setup_parser_for(struct tab *tab)
{
- char *b, buf[GEMINI_URL_LEN] = {0};
- struct parser_table *t;
+ char *b, buf[GEMINI_URL_LEN] = {0};
+ const struct parser_table *t;
memcpy(buf, tab->meta, sizeof(tab->meta));
blob - 61f4fec2fae4c283a874d775710363ada79f4885
blob + 57eae92163eb02e3d31328a530e52eb16e554360
--- telescope.c
+++ telescope.c
#include "ui.h"
#include "utils.h"
-static struct option longopts[] = {
+static const struct option longopts[] = {
{"colors", no_argument, NULL, 'C'},
{"colours", no_argument, NULL, 'C'},
{"help", no_argument, NULL, 'h'},
static pid_t start_child(enum telescope_process, const char *, int);
static void send_url(const char *);
-static struct proto {
+static const struct proto {
const char *schema;
const char *port;
int (*loadfn)(struct tab *, const char *);
static int
do_load_url(struct tab *tab, const char *url, const char *base, int mode)
{
+ const struct proto *p;
struct phos_uri uri;
- struct proto *p;
struct proxy *proxy;
int nocache = mode & LU_MODE_NOCACHE;
char *t;