commit - e18a9f1429efc0aff81d06fbaffcc44ce2c1d7b2
commit + 754622a2476761309d8b1a65ef3695c61cc43992
blob - bd119ecb712192bbcc512815692a08ebb2db55fe
blob + 4bef3c890fb6df6ded60bc904986713de9b7566e
--- gemini.c
+++ gemini.c
static void read_reply(int, short, void*);
static void parse_reply(struct req*);
static void copy_body(int, short, void*);
-
-static void check_special_page(struct req*, const char*);
static void handle_get(struct imsg*, size_t);
static void handle_cert_status(struct imsg*, size_t);
blob - e709cac2efc709636a8779ee056ead5ce41ddc49
blob + b75c3a3be55471aae44fd6d9ef2375970503d9bb
--- gemtext.c
+++ gemtext.c
static inline enum line_type
detect_line_type(const char *buf, size_t len, int in_pre)
{
- size_t i;
-
if (len == 0)
return LINE_TEXT;
blob - d2b6ccc26dfcecea5982c7885fe3254231d9784f
blob + 62d1abff1022bd444ca228e603e046d35fb568e7
--- keymap.c
+++ keymap.c
#define CTRL(n) ((n)&0x1F)
static struct keytable {
- char *p;
- int k;
+ const char *p;
+ int k;
} keytable[] = {
{ "<up>", KEY_UP },
{ "<down>", KEY_DOWN },
blob - 8835c67c5e9a1b2e9022463a13f0412b27ebacda
blob + 66aeacb2feb7350e257478046420fc263c58f08b
--- sandbox.c
+++ sandbox.c
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#include "compat.h"
+#include "telescope.h"
#ifdef __OpenBSD__
blob - 21547939e0c28d01e393d3693bb503e67d988ea8
blob + ab42757ef107f8dfba32453dfe47be2b3fd4547f
--- telescope.c
+++ telescope.c
const char *err;
char *p;
size_t len;
+
+ len = sizeof(tab->hist_cur->h)-1;
if (has_prefix(url, "gemini:")) {
if (!url_parse(url, &tab->url, &err))
goto err;
}
- len = sizeof(tab->hist_cur->h)-1;
url_unparse(&tab->url, tab->hist_cur->h, len);
imsg_compose(netibuf, IMSG_GET, tab->id, 0, -1,
tab->hist_cur->h, len+1);
blob - 8a0c4bf77dadc993d14ae53f7423151323641856
blob + 5669655068abe2e1efc285f48d0d063d06ec4370
--- ui.c
+++ ui.c
cmd_scroll_line_down(struct tab *tab)
{
struct vline *vl;
- size_t n;
if (tab->s.line_max == 0 || tab->s.line_off == tab->s.line_max-1)
return;
tab->s.line_off++;
wscrl(body, 1);
- if (tab->s.line_max - tab->s.line_off < body_lines)
+ if (tab->s.line_max - tab->s.line_off < (size_t)body_lines)
return;
vl = nth_line(tab, tab->s.line_off + body_lines-1);
off = MAX(0, off);
tab->s.line_off = off;
- tab->s.curs_y = MIN(body_lines, tab->s.line_max);
+ tab->s.curs_y = MIN((size_t)body_lines, tab->s.line_max);
redraw_body(tab);
}
static void
dispatch_stdio(int fd, short ev, void *d)
{
- struct tab *tab;
struct keymap *k;
const char *keyname;
char tmp[2] = {0};
return 1;
}
-static inline void
+static void
print_vline(struct vline *vl)
{
const char *text = vl->line;
pct = (tab->s.line_off + tab->s.curs_y) * 100.0 / tab->s.line_max;
- if (tab->s.line_max <= body_lines)
+ if (tab->s.line_max <= (size_t)body_lines)
wprintw(modeline, "All ");
else if (tab->s.line_off == 0)
wprintw(modeline, "Top ");
getyx(minibuf, off_y, off_x);
- while (ministate.off - skip > COLS / 2) {
+ while (ministate.off - skip > (size_t)COLS / 2) {
skip += MIN(ministate.off/4, 1);
}
static struct tab *
new_tab(void)
{
- struct tab *tab, *t;
+ struct tab *tab;
const char *url = "about:new";
if ((tab = calloc(1, sizeof(*tab))) == NULL)
blob - 785a759348d324ef376f1ece3a0daf32115351da
blob + 085df61ba454ddeb68b9da4c8f1fa8d0956d5366
--- wrap.c
+++ wrap.c
void
wrap_text(struct tab *tab, const char *prfx, struct line *l, size_t width)
{
- size_t zero, off, len, split;
+ size_t zero, off, len;
int cont = 0;
const char *endword, *endspc, *line, *linestart;