💾 Archived View for gemini.rmf-dev.com › repo › Vaati › Vgmi › files › c0518eb762197d4b7ba9001f33624… captured on 2024-02-05 at 09:54:12. Gemini links have been rewritten to link to archived content

View Raw

More Information

-=-=-=-=-=-=-

Go Back

0 /*

1 * ISC License

2 * Copyright (c) 2023 RMF <rawmonk@firemail.cc>

3 */

4 #define LTS 0

5 #define MAJOR "2"

6 #define MINOR "0"

7 #if LTS

8 #define VERSION MAJOR "." MINOR " LTS"

9 #else

10 #define VERSION MAJOR "." MINOR " (" __DATE__ " " __TIME__ ")"

11 #endif

12

13 #ifdef ABOUT_INTERNAL

14 #pragma GCC diagnostic ignored "-Woverlength-strings"

15 #define HELP_INFO \

16 "## Keybindings\n\n" \

17 "* k - Scroll up\n" \

18 "* j - Scroll up\n" \

19 "* gT - Switch to the previous tab\n" \

20 "* gt - Switch to the next tab\n" \

21 "* h - Go back to the previous page\n" \

22 "* l - Go forward to the next page\n" \

23 "* gg - Go at the top of the page\n" \

24 "* G - Go at the bottom of the page\n" \

25 "* / - Open search mode\n" \

26 "* : - Open input mode\n" \

27 "* u - Open input mode with the current url\n" \

28 "* b - Open about:bookmarks in a new tab\n" \

29 "* f - Open about:history in a new tab\n" \

30 "* r - Reload the page\n" \

31 "* [number]Tab - Select link\n" \

32 "* Tab - Follow the selected link\n" \

33 "* Shift+Tab - Open the selected link in a new tab\n\n" \

34 "You can prefix a movement key with a number to repeat it.\n\n" \

35 "## Commands\n\n" \

36 "* :q - Close the current tab\n" \

37 "* :qa - Close all tabs, exit the program\n" \

38 "* :o [url] - Open an url\n" \

39 "* :s [search] - Search the Geminispace using geminispace.info\n" \

40 "* :nt [url] - Open a new tab, the url is optional\n" \

41 "* :add [name] - Add the current url to the bookmarks, the name is optional\n"\

42 "* :[number] - Scroll to the line number\n" \

43 "* :gencert - Generate a client-certificate for the current capsule\n" \

44 "* :forget <host> - Forget the certificate for the host\n" \

45 "* :download [name] - Download the current page, the name is optional\n" \

46 "* :help - Open about:help in a new tab\n"

47 #define HEADER "20 text/gemini\r\n"

48 static const char header[] = HEADER;

49 int about_history(char **out, size_t *length_out);

50 int about_history_param(const char *param);

51 int about_bookmarks(char **out, size_t *length_out);

52 int about_bookmarks_param(const char *param);

53 int about_known_hosts(char **out, size_t *length_out);

54 int about_known_hosts_arg(const char *param);

55 int about_newtab(char **out, size_t *length_out);

56 int about_certificates(char **out, size_t *length_out);

57 int about_certificates_param(const char *param);

58 int about_config(char **out, size_t *length_out);

59 int about_config_arg(char *param, char **out, size_t *length_out);

60 void *dyn_strcat(char *dst, size_t *dst_length,

61 const char *src, size_t src_len);

62 void *dyn_utf8_strcat(char *dst, size_t *dst_length,

63 const char *src, size_t src_len);

64 #endif

65

66 struct request;

67 int about_parse(struct request *request);

68