Commits
- Commit:
2815e3a0bd30fa577f03de5af1a60086ee286e4a
- From:
- Omar Polo <op@omarpolo.com>
- Date:
typos; courtesy of codespell
- Commit:
3d89457cdeba5041aa6f0c1f8640b91bcbb6ec51
- From:
- Thomas Adam <thomas.adam22@gmail.com>
- Date:
code: add wrappers for common failure cases
Certain calls to well-known functions sometimes result in similar
error handling across the code base. Sometimes there's a need to
centralise the failure case.
Achieve this for common wrappers to often-used functions.
The transformation is achieved via coccinelle, commited with this patch.
Note that coccinelle can be told to ignore code blocks with comment
delimiters.
This transformation applies just to telescope's code, and not any of the
bundled depdencies in telescope (libgrapheme).
- Commit:
fd1c80ce62030c6e75bb05db1aee43425d70fc97
- From:
- Omar Polo <op@omarpolo.com>
- Date:
constify the parser structs
- Commit:
c1d27b0e114e6a65f7979971940df212f00bb2ae
- From:
- Omar Polo <op@omarpolo.com>
- Date:
untangle a bit buffers and parsers
Now buffers have a nicer interface, taking explicitly the buffer
where they push stuff, and the code that deals with buffers doesn't
need to peek into the parsers. The parsers now are 'pure' structs
without state attached to them, the state was moved to the buffer.
- Commit:
cfd1de029f7a27e08bbd263afa433b3208c45372
- From:
- Omar Polo <op@omarpolo.com>
- Date:
add missing time.h include
- Commit:
98d3e6c172747dc58042bde09a848d3e03572934
- From:
- Omar Polo <op@omarpolo.com>
- Date:
convert telescope to use ev instead of libevent
libevent is a very cool library, I like the APIs and enjoy using
it. However, telescope is not as large and doesn't have as many
file descriptor, so libevent is quite ``too big'' for our needs.
ev started as a small event loop on top of poll(2) for amused, and
can be used here too, it just needed to grow the ability to handle
several timers, as we need quite some on telescope (in fact, we use
more timers than fds!)
- Commit:
f7db6d139bba0fb56f0560533b77af219958ecc0
- From:
- Omar Polo <op@omarpolo.com>
- Date:
some headers cleanup
try to not include headers from headers, and remove some redundant
include.
This helps in modularizing the codebase and also helps during
incremental compilations.
- Commit:
65c4966563d067115fc09f5e5c8c43a917b1cf03
- From:
- Omar Polo <op@omarpolo.com>
- Date:
rework the history management
It was a huge pile of spaghetti with useless utility functions and
lots of code reaching into the "data structure" (if you can call it
so) to do stuff.
Instead, provide a "module" with a clean interface and noone reaching
in the insides.
- Commit:
0110411e1e32fa44d6e086f652dac916fc8707cf
- From:
- Omar Polo <op@omarpolo.com>
- Date:
partial revert of "abstract over evbuffers"
partial revert of commit d54dd8160b88709f3d243e1410a781e5de7fc187. We
don't really need an abstraction over "printf-like" things. I can
just use plain old FILEs. open_memstream (which conforms to POSIX.1)
is what I should have used from the beginning in my mcache
implementation.
- Commit:
d54dd8160b88709f3d243e1410a781e5de7fc187
- From:
- Omar Polo <op@omarpolo.com>
- Date:
parser/serialize: abstract over evbuffers
the serialize "method" will soon be used in other context where using
evbuffers would be awkward. Introduce a small abstraction over it: a
printfn (print function) fprintf-like.
- Commit:
fe84b7508f733106d346acf1b120951c78ad77a1
- From:
- Omar Polo <op@omarpolo.com>
- Date:
switch the cache to the new parser_serialize API
- Commit:
946d3439b93be9bac9eb246d9ff40f9e02e259a8
- From:
- Omar Polo <op@omarpolo.com>
- Date:
crank up cache limits
delete pages that are older than one hour, and scan the cache only once
every five minutes. The previous defaults were a bit too much
conservative.
- Commit:
a96922a16759643ba6a0bc3d9781e97fedbf1107
- From:
- Omar Polo <op@omarpolo.com>
- Date:
drop useless struct
instead of keeping the struct mcache that's private to mcache.c and
used only once, just define its fields as (static) variables. While
here, mark as static also gemtext_prefixes.
- Commit:
4b4c3458436c646c06d295cc56e990eef9897c6f
- From:
- Omar Polo <op@omarpolo.com>
- Date:
timer-based cache removal: delete cached pages older than 15 minutes
- Commit:
befa807e5bfef47c79310f7ab3b7038042a49ee8
- From:
- Omar Polo <op@omarpolo.com>
- Date:
cache: keep track of the total size and number of cached pages
- Commit:
ffcd827cfe2431a4f2ba116bc00b205d12cdf6df
- From:
- Omar Polo <op@omarpolo.com>
- Date:
mcache_tab: free previous copies of that page
- Commit:
9d65b1d9ae3209a8a2bc8e8c376dede4f71290ce
- From:
- Omar Polo <op@omarpolo.com>
- Date:
move util.c declarations in utils.h
it's not spelled `util.h' because otherwise it'd get included instead
of /usr/include/util.h
- Commit:
036c104e0d5b8758a8cf72c9085af23956fdfa6f
- From:
- Omar Polo <op@omarpolo.com>
- Date:
de-duplicate hash_* function: collect them in util.c
- Commit:
4e3871f5a61f3d1781f0e1b273ab3c7eeb9924f7
- From:
- Omar Polo <op@omarpolo.com>
- Date:
save parser name across mcache_tab/mcache_lookup
- Commit:
8f3c9af8369ac653695ca22777db99bfa1162cfe
- From:
- Omar Polo <op@omarpolo.com>
- Date:
simplify the caching API
- don't expose the evbuffer where we store the cached page
- cache to/from tabs instead of buffers
- Commit:
d5af38ccfe6c94218f4d7ab8d6aaf382e7dede80
- From:
- Omar Polo <op@omarpolo.com>
- Date:
add an in-memory cache store
see github issue #1