[w3m-dev 03709] Re: view source, edit source
* display.c (displayBuffer): INIT_BUFFER_WIDTH * file.c (_saveBuffer): added (saveBuffer): use _saveBuffer (saveBufferBody): added * main.c (vmSrc): saveBufferBody * proto.h (saveBufferBody): added From: Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp>
This commit is contained in:
@@ -1,3 +1,13 @@
|
|||||||
|
2003-01-30 Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp>
|
||||||
|
|
||||||
|
* [w3m-dev 03709] Re: view source, edit source
|
||||||
|
* display.c (displayBuffer): INIT_BUFFER_WIDTH
|
||||||
|
* file.c (_saveBuffer): added
|
||||||
|
(saveBuffer): use _saveBuffer
|
||||||
|
(saveBufferBody): added
|
||||||
|
* main.c (vmSrc): saveBufferBody
|
||||||
|
* proto.h (saveBufferBody): added
|
||||||
|
|
||||||
2003-01-30 Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp>
|
2003-01-30 Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp>
|
||||||
|
|
||||||
* [w3m-dev-en 00852] Re: Enhancement: content type detection of files
|
* [w3m-dev-en 00852] Re: Enhancement: content type detection of files
|
||||||
@@ -6937,4 +6947,4 @@ a * [w3m-dev 03276] compile error on EWS4800
|
|||||||
* release-0-2-1
|
* release-0-2-1
|
||||||
* import w3m-0.2.1
|
* import w3m-0.2.1
|
||||||
|
|
||||||
$Id: ChangeLog,v 1.724 2003/01/29 17:33:28 ukai Exp $
|
$Id: ChangeLog,v 1.725 2003/01/29 17:38:12 ukai Exp $
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/* $Id: display.c,v 1.59 2003/01/29 17:10:27 ukai Exp $ */
|
/* $Id: display.c,v 1.60 2003/01/29 17:38:14 ukai Exp $ */
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include "fm.h"
|
#include "fm.h"
|
||||||
|
|
||||||
@@ -360,13 +360,13 @@ displayBuffer(Buffer *buf, int mode)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (buf->width == 0)
|
if (buf->width == 0)
|
||||||
buf->width = COLS;
|
buf->width = INIT_BUFFER_WIDTH;
|
||||||
if (buf->height == 0)
|
if (buf->height == 0)
|
||||||
buf->height = LASTLINE + 1;
|
buf->height = LASTLINE + 1;
|
||||||
if ((buf->width != INIT_BUFFER_WIDTH && ((buf->type &&
|
if (buf->sourcefile &&
|
||||||
!strcmp(buf->type, "text/html"))
|
((buf->width != INIT_BUFFER_WIDTH &&
|
||||||
|| FoldLine))
|
((buf->type && !strcmp(buf->type, "text/html")) || FoldLine))
|
||||||
|| buf->need_reshape) {
|
|| buf->need_reshape)) {
|
||||||
buf->need_reshape = TRUE;
|
buf->need_reshape = TRUE;
|
||||||
reshapeBuffer(buf);
|
reshapeBuffer(buf);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/* $Id: file.c,v 1.212 2003/01/29 17:26:51 ukai Exp $ */
|
/* $Id: file.c,v 1.213 2003/01/29 17:38:14 ukai Exp $ */
|
||||||
#include "fm.h"
|
#include "fm.h"
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include "myctype.h"
|
#include "myctype.h"
|
||||||
@@ -6963,10 +6963,9 @@ conv_rule(Line *l)
|
|||||||
/*
|
/*
|
||||||
* saveBuffer: write buffer to file
|
* saveBuffer: write buffer to file
|
||||||
*/
|
*/
|
||||||
void
|
static void
|
||||||
saveBuffer(Buffer *buf, FILE * f, int cont)
|
_saveBuffer(Buffer *buf, Line *l, FILE * f, int cont)
|
||||||
{
|
{
|
||||||
Line *l = buf->firstLine;
|
|
||||||
Str tmp;
|
Str tmp;
|
||||||
|
|
||||||
#ifndef KANJI_SYMBOLS
|
#ifndef KANJI_SYMBOLS
|
||||||
@@ -6995,6 +6994,22 @@ saveBuffer(Buffer *buf, FILE * f, int cont)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
saveBuffer(Buffer *buf, FILE * f, int cont)
|
||||||
|
{
|
||||||
|
_saveBuffer(buf, buf->firstLine, f, cont);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
saveBufferBody(Buffer *buf, FILE * f, int cont)
|
||||||
|
{
|
||||||
|
Line *l = buf->firstLine;
|
||||||
|
|
||||||
|
while (l != NULL && l->real_linenumber == 0)
|
||||||
|
l = l->next;
|
||||||
|
_saveBuffer(buf, l, f, cont);
|
||||||
|
}
|
||||||
|
|
||||||
static Buffer *
|
static Buffer *
|
||||||
loadcmdout(char *cmd,
|
loadcmdout(char *cmd,
|
||||||
Buffer *(*loadproc) (URLFile *, Buffer *), Buffer *defaultbuf)
|
Buffer *(*loadproc) (URLFile *, Buffer *), Buffer *defaultbuf)
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/* $Id: main.c,v 1.203 2003/01/29 17:10:41 ukai Exp $ */
|
/* $Id: main.c,v 1.204 2003/01/29 17:38:15 ukai Exp $ */
|
||||||
#define MAINPROGRAM
|
#define MAINPROGRAM
|
||||||
#include "fm.h"
|
#include "fm.h"
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
@@ -4399,7 +4399,7 @@ vwSrc(void)
|
|||||||
f = fopen(tmpf->ptr, "w");
|
f = fopen(tmpf->ptr, "w");
|
||||||
if (f == NULL)
|
if (f == NULL)
|
||||||
return;
|
return;
|
||||||
saveBuffer(Currentbuf, f, TRUE);
|
saveBufferBody(Currentbuf, f, TRUE);
|
||||||
fclose(f);
|
fclose(f);
|
||||||
Currentbuf->sourcefile = tmpf->ptr;
|
Currentbuf->sourcefile = tmpf->ptr;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/* $Id: proto.h,v 1.85 2003/01/29 17:10:51 ukai Exp $ */
|
/* $Id: proto.h,v 1.86 2003/01/29 17:38:15 ukai Exp $ */
|
||||||
/*
|
/*
|
||||||
* This file was automatically generated by version 1.7 of cextract.
|
* This file was automatically generated by version 1.7 of cextract.
|
||||||
* Manual editing not recommended.
|
* Manual editing not recommended.
|
||||||
@@ -226,6 +226,7 @@ extern Buffer *loadBuffer(URLFile *uf, Buffer *newBuf);
|
|||||||
extern Buffer *loadImageBuffer(URLFile *uf, Buffer *newBuf);
|
extern Buffer *loadImageBuffer(URLFile *uf, Buffer *newBuf);
|
||||||
#endif
|
#endif
|
||||||
extern void saveBuffer(Buffer *buf, FILE * f, int cont);
|
extern void saveBuffer(Buffer *buf, FILE * f, int cont);
|
||||||
|
extern void saveBufferBody(Buffer *buf, FILE * f, int cont);
|
||||||
extern Buffer *getshell(char *cmd);
|
extern Buffer *getshell(char *cmd);
|
||||||
extern Buffer *getpipe(char *cmd);
|
extern Buffer *getpipe(char *cmd);
|
||||||
extern Buffer *openPagerBuffer(InputStream stream, Buffer *buf);
|
extern Buffer *openPagerBuffer(InputStream stream, Buffer *buf);
|
||||||
|
|||||||
Reference in New Issue
Block a user