commit - 0e2ac86488b43d8dbe6ccf38221d6ca9d47a2dbc
commit + 95a8c791ec85e7b79a1975e82a22f7c07dbb9107
blob - 8fffd131ffca3680b5f8fa9ccc936f9851f7958f
blob + af1433de7080b942fe9b82382dd92b9d9bbf71d9
--- cmd.c
+++ cmd.c
void
cmd_redraw(struct buffer *buffer)
{
- ui_schedule_redraw();
+ ui_schedule_redraw();
}
void
void
cmd_clear_minibuf(struct buffer *buffer)
{
- message(NULL);
+ message(NULL);
}
void
blob - 167ff546b01b58fee00760256ac5e7efd01a80b0
blob + f3b0669094cf7628faa05efb8ddc03e1e9e26baf
--- defaults.c
+++ defaults.c
int
config_setcolor(int bg, const char *name, int prfx, int line, int trail)
{
- struct mapping *m;
+ struct mapping *m;
struct line_face *f;
if (!strcmp(name, "tabline")) {
blob - a6fb01a74a768fac0f881a840cd446ebaeb18664
blob + f806e9b6b96ff9722ad359b0799fbef47bf44ef8
--- mime.c
+++ mime.c
char *b, buf[GEMINI_URL_LEN] = {0};
struct parser_table *t;
- memcpy(buf, tab->meta, sizeof(tab->meta));
+ memcpy(buf, tab->meta, sizeof(tab->meta));
for (b = buf; *b != ';' && *b != '\0'; ++b)
;
blob - 25df1a9c74f194f0b1c8b304b1e3c1aaea927a4d
blob + 3fb0100b72f58b281acbced7b9fbfce4123c3842
--- minibuffer.c
+++ minibuffer.c
static void
read_select(void)
{
- exit_minibuffer();
+ exit_minibuffer();
minibuffer_hist_save_entry();
read_cb(ministate.buf, read_data);
}
blob - 1744d479e330fed1fd7164316bb4be4495ca6419
blob + 88b9b979998d210062fdde5d8e9507772e1a56d3
--- net.c
+++ net.c
&len) == -1)
goto err;
if (error != 0) {
- errno = error;
- goto err;
+ errno = error;
+ goto err;
}
goto done;
}
}
if (error & EVBUFFER_EOF) {
- src = EVBUFFER_INPUT(req->bev);
+ src = EVBUFFER_INPUT(req->bev);
if (EVBUFFER_LENGTH(src) != 0)
net_send_ui(IMSG_BUF, req->id, EVBUFFER_DATA(src),
EVBUFFER_LENGTH(src));
req->proto = r->proto;
#if HAVE_ASR_RUN
- async_conn_towards(req);
+ async_conn_towards(req);
#else
blocking_conn_towards(req);
#endif
blob - 57991d3be50c6e5da66de728fe6b4435bf31bbb7
blob + 677425cfe54588e1894012ab1bd1a88ae486dcbd
--- pagebundler.c
+++ pagebundler.c
return 1;
}
- printf("const uint8_t %s[] = {\n", varname);
+ printf("const uint8_t %s[] = {\n", varname);
did = 0;
len = 0;
- for (;;) {
+ for (;;) {
r = fread(buf, 1, sizeof(buf), f);
len += r;
blob - 760d2ffadc45202fef40f0f5fc8b2198b1f5c33f
blob + be9267bc30ef6a42d03ef8b377dc3eb8b3e2900b
--- parse.y
+++ parse.y
static void
setvars(char *var, char *val)
{
- if (!config_setvars(var, val))
+ if (!config_setvars(var, val))
yyerror("invalid variable or value: %s = \"%s\"",
var, val);
{
struct cmd *cmd;
- for (cmd = cmds; cmd->cmd != NULL; ++cmd) {
+ for (cmd = cmds; cmd->cmd != NULL; ++cmd) {
if (!strcmp(cmd->cmd, name))
return cmd->fn;
}
blob - 856e623cc88284401819cdd61d9fe8a05d55be61
blob + 344c70e5943a87ab1de510d3cbe67704b4ad5932
--- parser.c
+++ parser.c
return 1;
if (!(p->flags & PARSER_IN_BODY)) {
- p->flags |= PARSER_IN_BODY;
+ p->flags |= PARSER_IN_BODY;
/*
* drop the BOM: only UTF-8 is supported, and there
blob - fc3fcfec2380b5651dbc025725aedf1f9db3b99b
blob + 8c3836541d0711877d98ed828dbc511a38a8e323
--- parser_gophermap.c
+++ parser_gophermap.c
if ((line = strchr(line, '\t')) == NULL)
return;
- *line++ = '\0';
+ *line++ = '\0';
s->selector = line;
if ((line = strchr(line, '\t')) == NULL)
char buf[LINE_MAX], b[2] = {0};
if ((l = calloc(1, sizeof(*l))) == NULL)
- goto err;
+ goto err;
if ((l->line = strdup(s->ds)) == NULL)
goto err;
blob - 104e8c4c7dbb21fba7e4b341d0d62fc24f989b6e
blob + fe7748cae901398026f414f1c82e87bce40313b4
--- session.c
+++ session.c
*s++ = '\0';
- if ((t = strchr(s, ' ')) != NULL) {
+ if ((t = strchr(s, ' ')) != NULL) {
*t++ = '\0';
*title = t;
}
}
while ((linelen = getline(&line, &linesize, session)) != -1) {
- if ((nl = strchr(line, '\n')) != NULL)
+ if ((nl = strchr(line, '\n')) != NULL)
*nl = '\0';
parse_session_line(line, &title, &flags);
if ((tab = new_tab(line, NULL, NULL)) == NULL)
err(1, "new_tab");
- strlcpy(tab->buffer.page.title, title,
+ strlcpy(tab->buffer.page.title, title,
sizeof(tab->buffer.page.title));
if (flags & TAB_CURRENT)
curr = tab;
blob - 6be7ec6fe0393108c660c9508e739cfe58beba2d
blob + fa211ceb197301f961bddc1abf98b065eca6f140
--- tofu.c
+++ tofu.c
struct tofu_entry *e;
if ((e = calloc(1, sizeof(*e))) == NULL)
- abort();
+ abort();
- strlcpy(e->domain, host, sizeof(e->domain));
+ strlcpy(e->domain, host, sizeof(e->domain));
if (*port != '\0' && strcmp(port, "1965")) {
strlcat(e->domain, ":", sizeof(e->domain));
strlcat(e->domain, port, sizeof(e->domain));
blob - 8532e8276791abb4bb8afa03438ae40d3b4b107d
blob + 1d13ffc7f6a98e21d87fb1abc7cadf7f293b6b1d
--- ui.c
+++ ui.c
strlcat(buf, " ", len);
/* skip the emoji */
- *text_ret += (space - vl->parent->line) + 1;
+ *text_ret += (space - vl->parent->line) + 1;
}
*prfx_ret = buf;
else {
ots = toskip;
toskip--;
- while (toskip != 0 &&
+ while (toskip != 0 &&
(ots - toskip+1) * tabwidth < space)
toskip--;
}
else
strlcpy(buf, " ", sizeof(buf));
- if (strlcat(buf, title, sizeof(buf)) >= sizeof(buf)) {
+ if (strlcat(buf, title, sizeof(buf)) >= sizeof(buf)) {
/* truncation happens */
strlcpy(&buf[sizeof(buf)-4], "...", 4);
} else {
/ buffer->line_max;
if (buffer->line_max <= (size_t)body_lines)
- wprintw(modeline, "All ");
+ wprintw(modeline, "All ");
else if (buffer->line_off == 0)
- wprintw(modeline, "Top ");
+ wprintw(modeline, "Top ");
else if (buffer->line_off + body_lines >= buffer->line_max)
wprintw(modeline, "Bottom ");
else
struct vline *vl;
if (ministate.curmesg != NULL)
- wprintw(echoarea, "%s", ministate.curmesg);
+ wprintw(echoarea, "%s", ministate.curmesg);
else if (*keybuf != '\0')
waddstr(echoarea, keybuf);
else {
blob - 15dbf003bd7d3d09c76ee97cb7c93ec5b1618d58
blob + 5389e8cc921278dc8e97c46a1a42547b0564f70c
--- utf8.c
+++ utf8.c
utf8_encode(uint32_t cp, char *s)
{
if (cp <= 0x7F) {
- *s = (uint8_t)cp;
+ *s = (uint8_t)cp;
return 1;
} else if (cp <= 0x7FF) {
- s[1] = (uint8_t)(( cp & 0x3F ) + 0x80);
+ s[1] = (uint8_t)(( cp & 0x3F ) + 0x80);
s[0] = (uint8_t)(((cp >> 6) & 0x1F) + 0xC0);
return 2;
} else if (cp <= 0xFFFF) {
- s[2] = (uint8_t)(( cp & 0x3F) + 0x80);
+ s[2] = (uint8_t)(( cp & 0x3F) + 0x80);
s[1] = (uint8_t)(((cp >> 6) & 0x3F) + 0x80);
s[0] = (uint8_t)(((cp >> 12) & 0x0F) + 0xE0);
return 3;
} else if (cp <= 0x10FFFF) {
- s[3] = (uint8_t)(( cp & 0x3F) + 0x80);
+ s[3] = (uint8_t)(( cp & 0x3F) + 0x80);
s[2] = (uint8_t)(((cp >> 6) & 0x3F) + 0x80);
s[1] = (uint8_t)(((cp >> 12) & 0x3F) + 0x80);
s[0] = (uint8_t)(((cp >> 18) & 0x07) + 0xF0);
for (; start > base; start--) {
c = *start;
- if ((c & 0xC0) != 0x80)
+ if ((c & 0xC0) != 0x80)
return (char*)start;
}
blob - 117a06d2c1d495102c971d4a8ad30b718749fc3e
blob + 0c1b5d78e8ce1a182cba23a1248acc8ac065f9e5
--- util.c
+++ util.c
int flags;
if ((flags = fcntl(fd, F_GETFL)) == -1)
- return 0;
+ return 0;
if (fcntl(fd, F_SETFL, flags | O_NONBLOCK) == -1)
- return 0;
+ return 0;
return 1;
}
blob - 70bc02d732917d8c2bc6ede2b3458d1617b2591c
blob + 6fd7a38bb0ef087bbca6a041f93fb5abbdefc022
--- wrap.c
+++ wrap.c
return 0;
cont = L_CONTINUATION;
if (dont_wrap_pre)
- return 1;
+ return 1;
cur = 0;
start = lastchar;
}