aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFumitoshi UKAI <ukai@debian.or.jp>2002-11-21 17:11:15 +0000
committerFumitoshi UKAI <ukai@debian.or.jp>2002-11-21 17:11:15 +0000
commit2d542ae4ab751da0542af7169fb7060afb8701f4 (patch)
tree03f6327cb6aba84720b8e893dfad46dfe95cb126
parentfix indent (diff)
downloadw3m-2d542ae4ab751da0542af7169fb7060afb8701f4.tar.gz
w3m-2d542ae4ab751da0542af7169fb7060afb8701f4.zip
[w3m-dev 03457] open URL of command line on each new tabs
* main.c (delBuffer): static (fusage): -N (main): add open_new_tab for -N From: Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp>
Diffstat (limited to '')
-rw-r--r--ChangeLog9
-rw-r--r--main.c15
2 files changed, 22 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 6646214..12eadd1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2002-11-22 Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp>
+ * [w3m-dev 03457] open URL of command line on each new tabs
+ * main.c (delBuffer): static
+ (fusage): -N
+ (main): add open_new_tab for -N
+
+2002-11-22 Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp>
+
* [w3m-dev 03456] tiling of tab
* display.c (displayBuffer): use LastTab->y
(redrawNLine): fix column calculation
@@ -4993,4 +5000,4 @@ a * [w3m-dev 03276] compile error on EWS4800
* release-0-2-1
* import w3m-0.2.1
-$Id: ChangeLog,v 1.543 2002/11/21 17:05:00 ukai Exp $
+$Id: ChangeLog,v 1.544 2002/11/21 17:11:15 ukai Exp $
diff --git a/main.c b/main.c
index 6d47126..42f91eb 100644
--- a/main.c
+++ b/main.c
@@ -1,4 +1,4 @@
-/* $Id: main.c,v 1.149 2002/11/21 17:05:47 ukai Exp $ */
+/* $Id: main.c,v 1.150 2002/11/21 17:11:16 ukai Exp $ */
#define MAINPROGRAM
#include "fm.h"
#include <signal.h>
@@ -77,6 +77,7 @@ int (*searchRoutine) (Buffer *, char *);
JMP_BUF IntReturn;
+static void delBuffer(Buffer *buf);
static void cmd_loadfile(char *path);
static void cmd_loadURL(char *url, ParsedURL *current, char *referer);
static void cmd_loadBuffer(Buffer *buf, int prop, int linkid);
@@ -206,6 +207,7 @@ fusage(FILE * f, int err)
#ifdef USE_COLOR
fprintf(f, " -M monochrome display\n");
#endif /* USE_COLOR */
+ fprintf(f, " -N open URL of command line on each new tab\n");
fprintf(f, " -F automatically render frame\n");
fprintf(f,
" -cols width specify column width (used with -dump)\n");
@@ -367,6 +369,7 @@ main(int argc, char **argv, char **envp)
int load_argc = 0;
int load_bookmark = FALSE;
int visual_start = FALSE;
+ int open_new_tab = FALSE;
char search_header = FALSE;
char *default_type = NULL;
char *post_file = NULL;
@@ -527,6 +530,8 @@ main(int argc, char **argv, char **envp)
SearchHeader = search_header = TRUE;
else if (!strcmp("-v", argv[i]))
visual_start = TRUE;
+ else if (!strcmp("-N", argv[i]))
+ open_new_tab = TRUE;
#ifdef USE_COLOR
else if (!strcmp("-M", argv[i]))
useColor = FALSE;
@@ -899,6 +904,11 @@ main(int argc, char **argv, char **envp)
calcTabPos();
Firstbuf = Currentbuf = newbuf;
}
+ else if (open_new_tab) {
+ _newT();
+ Currentbuf->nextBuffer = newbuf;
+ delBuffer(Currentbuf);
+ }
else {
Currentbuf->nextBuffer = newbuf;
Currentbuf = newbuf;
@@ -934,6 +944,7 @@ main(int argc, char **argv, char **envp)
if (add_download_list) {
add_download_list = FALSE;
+ CurrentTab = LastTab;
if (!FirstTab) {
FirstTab = LastTab = CurrentTab = newTab();
nTab = 1;
@@ -948,6 +959,8 @@ main(int argc, char **argv, char **envp)
Currentbuf = Firstbuf;
ldDL();
}
+ else
+ CurrentTab = FirstTab;
if (!FirstTab || !Firstbuf || Firstbuf == NO_BUFFER) {
if (newbuf == NO_BUFFER) {
if (fmInitialized)