a gopher interface forked from the popular cgit
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
cgit-70/ui-shared_70.c

40 lines
834 B

/*
*
* Gopher-related functions
*
*/
#include <stdio.h>
void cgit_gopher_selector(char type, char *str, char *sel, char *host, int port){
printf("%c%s\t%s\t%s\t%d\r\n",
type, str, sel, host, port);
}
void cgit_gopher_info(char *msg, char *host, int port){
cgit_gopher_selector('i', msg, "", host, port);
}
void cgit_gopher_menu(char *descr, char *sel, char *host, int port){
cgit_gopher_selector('1', descr, sel, host, port);
}
void cgit_gopher_textfile(char *descr, char *sel, char *host, int port){
cgit_gopher_selector('0', descr, sel, host, port);
}
void cgit_gopher_error(char *msg, char *host, int port){
cgit_gopher_selector('3', msg, "Err", host, port);
}
void cgit_tree_link_gopher(const char *name, const char *title, const char *class,
const char *head, const char *rev, const char *path)
{
}