From 62fc785e241f456e60290571b0c5e5777d111d66 Mon Sep 17 00:00:00 2001 From: Fumitoshi UKAI Date: Fri, 15 Nov 2002 15:19:43 +0000 Subject: [w3m-dev 03431] save file by background process * file.c (loadGeneralFile): use _doFileCopy() (_doFileCopy): renamed from doFileCopy() lock fork & save (doFileSave): lock fork & save * fm.h (DownloadList): added (FirstDL): added (LastDL): added * form.c (struct internal_action): add download * funcname.tab (DOWNLOAD_LIST): added * html.h (URLFile): add url * main.c (dump_extra): add add_download_list (main): add_download_list, ldDL() (_quitfm): added (quitfm): rewrite with _quitfm() (qquitfm): ditto (w3m_exit): stopDownload() (addDownloadList): added (checkDownloadList): added (convert_size3): added (DownloadListBuffer): added (download_action): added (stopDownload): added (ldDL): added * proto.h (ldDL): added (convert_size): added (convert_size2): added (doFileCopy): deleted (_doFileCopy): added (addDownloadList): added (stopDownload): added (checkDownloadList): added (download_action): added * url.c (openURL): save url in uf From: Hironori SAKAMOTO --- fm.h | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'fm.h') diff --git a/fm.h b/fm.h index 5e63e24..4a151f9 100644 --- a/fm.h +++ b/fm.h @@ -1,4 +1,4 @@ -/* $Id: fm.h,v 1.76 2002/11/14 16:56:23 ukai Exp $ */ +/* $Id: fm.h,v 1.77 2002/11/15 15:19:44 ukai Exp $ */ /* * w3m: WWW wo Miru utility * @@ -453,6 +453,18 @@ typedef struct _TabBuffer { Buffer *firstBuffer; } TabBuffer; +typedef struct _DownloadList { + pid_t pid; + char *url; + char *save; + char *lock; + clen_t size; + time_t time; + int ok; + struct _DownloadList *next; + struct _DownloadList *prev; +} DownloadList; + #define COPY_BUFPOSITION(dstbuf, srcbuf) {\ (dstbuf)->topLine = (srcbuf)->topLine; \ (dstbuf)->currentLine = (srcbuf)->currentLine; \ @@ -795,6 +807,8 @@ global int TabCols init(10); : (nTab - 1) / ((nTab * TabCols - 1) / (COLS - 2) + 1) + 1) #define Currentbuf (CurrentTab->currentBuffer) #define Firstbuf (CurrentTab->firstBuffer) +global DownloadList *FirstDL init(NULL); +global DownloadList *LastDL init(NULL); global int CurrentKey; global char *CurrentKeyData; global char *CurrentCmdData; -- cgit v1.2.3