Skip to content

Instantly share code, notes, and snippets.

View flatcap's full-sized avatar
🥾
Hiking in Scotland

Richard Russon flatcap

🥾
Hiking in Scotland
View GitHub Profile
@flatcap
flatcap / 2001.txt
Last active April 26, 2017 11:37
Functions in C99, POSIX:2001 and POSIX:2008
a64l
accept
access
aio_cancel
aio_error
aio_fsync
aio_read
aio_return
aio_suspend
aio_write
@flatcap
flatcap / inherit.c
Last active September 17, 2018 20:55
inheritance
#include <stdio.h>
/* ---------------------------------- */
#define struct_Named \
char *name
struct Named
{
struct_Named;
// Function
static void clean_references(struct MuttThread *brk, struct MuttThread *cur);
// Original Code
for (ref = cur->message->env->references; p->message && ref; ref = ref->next)
if (mutt_strcasecmp(ref->data, p->message->env->message_id) == 0)
{
done = true;
break;
}
@flatcap
flatcap / bdb.txt
Last active August 23, 2017 12:12
NeoMutt External Function Calls
db_create
db_env_create
@flatcap
flatcap / distros.md
Last active September 17, 2018 20:55

Build and Install Changes to NeoMutt

There are a lot of changes coming to NeoMutt's build and install. I suggest using this issue as a discussion board and creating pull-requests as needed. Whether you make changes as they happen in NeoMutt, or wait for us to finish, is up to you.

version number doesn't contain mutt's version no mutt strings, only neomutt

The Build

s/--disable-doc\>/--disable-doc/g
s/--disable-fcntl\>/--disable-fcntl/g
s/--disable-full-doc\>/--full-doc/g
s/--disable-iconv\>/GONE/g
s/--disable-nls\>/--disable-nls/g
s/--disable-pgp\>/--disable-pgp/g
s/--disable-po\>/GONE/g
s/--disable-smime\>/--disable-smime/g
s/--enable-debug\>/GONE/g
s/--enable-dotlock\>/GONE/g
// gcc -Wall -o test-dns test-dns.c
#include <netdb.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <sys/utsname.h>
#include <unistd.h>
@flatcap
flatcap / Makefile
Created November 9, 2017 11:56
linker test
all: main
main: main.o libfruit.a
$(CC) -o main main.o -L. -lfruit
libfruit.a: apple.o banana.o global.o
ar cr libfruit.a apple.o banana.o global.o
clean:
rm -f *.o *.a main
@flatcap
flatcap / libemail.md
Last active September 17, 2018 20:55
libemail

libemail

A library of all the structs that make up an email and a set of functions to manipulate them.

The functions should rely only on the shared libmutt library.

  • Address
  • AttachPtr
  • Body
  • Content
@flatcap
flatcap / rename-lib.sed
Created November 16, 2017 16:11
Sed script to rename all functions in libmutt
# base64
s/\<mutt_from_base64\>/mutt_b64_decode/g
s/\<mutt_to_base64\>/mutt_b64_encode/g
# buffer
s/\<mutt_buffer_addch\>/mutt_buffer_addch/g
s/\<mutt_buffer_addstr\>/mutt_buffer_addstr/g
s/\<mutt_buffer_free\>/mutt_buffer_free/g
s/\<mutt_buffer_from\>/mutt_buffer_from/g
s/\<mutt_buffer_init\>/mutt_buffer_init/g