youtube/feed: show usage for gopher too - frontends - front-ends for some sites (experiment) (DIR) Log (DIR) Files (DIR) Refs (DIR) README (DIR) LICENSE --- (DIR) commit e6b4a7a9a5af5d5b9c3387799751d696d7fa2222 (DIR) parent 7f35bd62ab42c3e5da539b6faa1fef27ad331ed9 (HTM) Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Sun, 2 Jul 2023 13:40:02 +0200 youtube/feed: show usage for gopher too Diffstat: M youtube/feed.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) --- (DIR) diff --git a/youtube/feed.c b/youtube/feed.c @@ -1038,16 +1038,18 @@ isvalidchannel(const char *s) void usage(void) { - const char *msg = "Bad Request, path should be the channel id + file extension, for example: UCrbvoMC0zUvPL8vjswhLOSw.json"; + const char *line1 = "Bad Request, path should be the channel id + file extension, for example: UCrbvoMC0zUvPL8vjswhLOSw.json"; + const char *line2 = "Supported extensions are: [atom|gph|html|json|tsv|txt]"; if (cgimode) { if (godmode) { - printf("3%s\tErr\t%s\t%s\r\n", msg, server_name, server_port); + printf("3%s\tErr\t%s\t%s\r\n", line1, server_name, server_port); + printf("3%s\tErr\t%s\t%s\r\n", line2, server_name, server_port); } else { fputs("Status: 400 Bad Request\r\n", stdout); fputs("Content-Type: text/plain; charset=utf-8\r\n\r\n", stdout); - printf("400 %s\n", msg); - fputs("Supported extensions are: [atom|gph|html|json|tsv|txt]\n", stdout); + printf("400 %s\n", line1); + printf("\n%s", line2); } exit(0); } else {