diff --git a/src/syncterm/GNUmakefile b/src/syncterm/GNUmakefile index ee17b4f6e6e945e7f8f730760bd48e006a3777b6..3ebd454a64b0281313c864341e9dc36b6a567ca1 100644 --- a/src/syncterm/GNUmakefile +++ b/src/syncterm/GNUmakefile @@ -62,9 +62,11 @@ ifdef USE_GUTS endif PREFIX ?= /usr/local +SYSTEM_LIST_DIR ?= ${PREFIX}/etc DESKTOPDIR ?= $(PREFIX)/share/applications CFLAGS += -DPREFIX=\"${PREFIX}\" +CFLAGS += -DSYSTEM_LIST_DIR=\"${SYSTEM_LIST_DIR}\" ifeq ($(PREFIX),/usr) MANPREFIX ?= /usr/share else diff --git a/src/syncterm/syncterm.c b/src/syncterm/syncterm.c index 185bbc046c8794a52aa5c6a910d338bb0f287cad..5efd20102d0af70c30b7917d66e7404aa3f0904e 100644 --- a/src/syncterm/syncterm.c +++ b/src/syncterm/syncterm.c @@ -689,6 +689,16 @@ void parse_url(char *url, struct bbslist *bbs, int dflt_conn_type, int force_def bbs->port=conn_ports[bbs->conn_type]; p1=url+9; } + else if(!strnicmp("raw://",url,6)) { + bbs->conn_type=CONN_TYPE_TELNET; + bbs->port=conn_ports[bbs->conn_type]; + p1=url+6; + } + else if(!strnicmp("shell:",url,6)) { + bbs->conn_type=CONN_TYPE_SHELL; + bbs->port=conn_ports[bbs->conn_type]; + p1=url+6; + } /* ToDo: RFC2806 */ /* Remove trailing / (Win32 adds one 'cause it hates me) */ p2=strchr(p1,'/'); @@ -841,10 +851,9 @@ char *get_syncterm_filename(char *fn, int fnlen, int type, int shared) } if(shared) { -#ifdef PREFIX - strcpy(fn,PREFIX); +#ifdef SYSTEM_LIST_DIR + strcpy(fn,SYSTEM_LIST_DIR); backslash(fn); - strcat(fn,"etc/"); #else strcpy(fn,"/usr/local/etc/"); #endif @@ -1203,11 +1212,20 @@ int main(int argc, char **argv) "-h = use SSH mode if URL does not include the scheme\n" "-s = enable \"Safe Mode\" which prevents writing/browsing local files\n" "\n" - "URL format is: [(rlogin|telnet|ssh)://][user[:password]@]domainname[:port]\n" + "URL format is: [(rlogin|telnet|ssh|raw)://][user[:password]@]domainname[:port]\n" + "raw:// URLs MUST include a port.\n" +#ifdef __unix__ + "shell:command URLs are also supported.\n" +#endif "examples: rlogin://deuce:password@nix.synchro.net:5885\n" " telnet://deuce@nix.synchro.net\n" " nix.synchro.net\n" - " telnet://nix.synchro.net\n\nPress any key to exit..." + " telnet://nix.synchro.net\n" + " raw://nix.synchro.net:23\n" +#ifdef __unix__ + " shell:/usr/bin/sh\n" +#endif + "\nPress any key to exit..." ); getch(); return(0);