Skip to content
This repository was archived by the owner on Oct 7, 2020. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions src/actions.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,36 @@ static int action_node (Node *node)
cs++;
}
}
} else if ((start =
strstr (fixnullstring (node_get (node, TEXT)), "https://"))) {
char url[200];
char *dest;

dest = url;
while (*start && !isspace ((unsigned char)*start)) {
*dest = *start;
dest++;
start++;
}
*dest = 0;
{
char *cs = web_command;
char *cd = cmdline;

while (*cs) {
if (*cs == '*') {
strcat (cd, url);
strcat (cd, cs + 1);
cli_outfunf ("shelling out: %s", cmdline);
/* strcat(cd,"> /dev/null 2>&1 &"); */
break;
} else {
*cd = *cs;
*(++cd) = '\0';
}
cs++;
}
}
} else if ((start = strchr (fixnullstring (node_get (node, TEXT)), '@'))) {
char mail_address[200];
char *dest;
Expand Down
2 changes: 1 addition & 1 deletion src/hnbrc.inc
Original file line number Diff line number Diff line change
Expand Up @@ -694,7 +694,7 @@
menu \"File\" \"save F2\" \"save\"\n\
menu \"File\" \"save as.. \" \"macro saveas\"\n\
macro define saveas\n\
getquery db_file 'fila to save'\n\
getquery db_file 'file to save'\n\
save_state\n\
go root\n\
export_$format $db_file\n\
Expand Down