about summary refs log tree commit diff stats
path: root/apps/tile/gap-buffer.mu
Commit message (Expand)AuthorAgeFilesLines
* 7159 - explicitly use 'return' everywhereKartik Agaram2020-11-021-55/+56
* 7115Kartik Agaram2020-10-261-1/+1
* 7098 - tile: string valuesKartik Agaram2020-10-251-0/+18
* tile: process space in middle of wordKartik Agaram2020-10-241-0/+6
* 7080Kartik Agaram2020-10-201-0/+10
* 7079Kartik Agaram2020-10-191-0/+18
* 6860Kartik Agaram2020-09-261-0/+7
* 6837Kartik Agaram2020-09-221-160/+0
* 6821 - highlight words clobbered by the next wordKartik Agaram2020-09-201-0/+34
* 6814 - tile: backspace deletes char or wordKartik Agaram2020-09-191-0/+6
* 6812 - tile: render cursor locationKartik Agaram2020-09-191-1/+7
* 6811 - tile: left-cursor movementKartik Agaram2020-09-191-0/+12
* 6807 - tile: render intermediate stack stateKartik Agaram2020-09-191-4/+50
* 6801 - snapshot: RPN structured editorKartik Agaram2020-09-191-37/+219
* 6796Kartik Agaram2020-09-161-14/+34
* 6789 - tile: print keystrokes to screenKartik Agaram2020-09-161-0/+137
200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
/*
 External application support.
 This feature allows lynx to pass a given URL to an external program.
 It was written for three reasons.
 1) To overcome the deficiency	of Lynx_386 not supporting ftp and news.
    External programs can be used instead by passing the URL.

 2) To allow for background transfers in multitasking systems.
    I use wget for http and ftp transfers via the external command.

 3) To allow for new URLs to be used through lynx.
    URLs can be made up such as mymail: to spawn desired applications
    via the external command.

 See lynx.cfg for other info.
*/

#include <LYUtils.h>
#include <HTAlert.h>
#include <LYGlobalDefs.h>
#include <LYExtern.h>
#include <LYCurses.h>

#include <LYLeaks.h>

#ifdef USE_EXTERNALS
void run_external ARGS1(char *, c)
{
	char command[1024];
	lynx_html_item_type *externals2=0;

	if (externals == NULL) return;

	for(externals2=externals; externals2 != NULL;
		 externals2=externals2->next)
	{

	 if (externals2->command != 0
	  && !strncasecomp(externals2->name,c,strlen(externals2->name)))
	 {
	     char *cp;

		if(no_externals && !externals2->always_enabled)
		{
		  HTUserMsg(EXTERNALS_DISABLED);
		  return;
		}

		/*  Too dangerous to leave any URL that may come along unquoted.
		 *  They often contain '&', ';', and '?' chars, and who knows
		 *  what else may occur.
		 *  Prevent spoofing of the shell.
		 *  Dunno how this needs to be modified for VMS or DOS. - kw
		 */
#if defined(VMS) || defined(DOSPATH) || defined(__EMX__)
		sprintf(command, externals2->command, c);
#else /* Unix: */
		cp = quote_pathname(c);
		sprintf(command, externals2->command, cp);
		FREE(cp);
#endif /* VMS */

		if (*command != '\0')
		{

		 HTUserMsg(command);

		 stop_curses();
		 LYSystem(command);
		 start_curses();
		}

		return;
	 }
	}

	return;
}
#endif /* USE_EXTERNALS */