From 50ee9b03e320628b73d511c7d5ae217b07f00cce Mon Sep 17 00:00:00 2001 From: bptato Date: Mon, 18 Mar 2024 16:32:40 +0100 Subject: config: parse mime.types/mailcap/urimethodmap inside parseConfig Better (and simpler) than storing them all over the place. extra: change lmDownload text to match w3m --- src/config/mimetypes.nim | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/config/mimetypes.nim') diff --git a/src/config/mimetypes.nim b/src/config/mimetypes.nim index 542bc267..e8a0fd07 100644 --- a/src/config/mimetypes.nim +++ b/src/config/mimetypes.nim @@ -4,7 +4,11 @@ import std/tables import utils/twtstr # extension -> type -type MimeTypes* = Table[string, string] +type MimeTypes* = distinct Table[string, string] + +proc `[]`*(mimeTypes: MimeTypes; k: string): string {.borrow.} +proc contains*(mimeTypes: MimeTypes; k: string): bool {.borrow.} +proc hasKeyOrPut*(mimeTypes: var MimeTypes; k, v: string): bool {.borrow.} # Add mime types found in stream to mimeTypes. # No error handling for now. -- cgit 1.4.1-2-gfad0 a tiny new machine. More thorough tests → More comprehensible and rewrite-friendly software → More resilient society.Kartik K. Agaram <vc@akkartik.com>
about summary refs log blame commit diff stats
path: root/html/032operands.cc.html
blob: f711850861379fe603754530268c8a4bbe3bfd35 (plain) (tree)
1
2
3
4
5
6
7
8
9