亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? sites.c

?? 站點映像程序
?? C
?? 第 1 頁 / 共 4 頁
字號:
/*    sitecopy, for managing remote web sites.   Copyright (C) 1998-99, Joe Orton <joe@orton.demon.co.uk>                                                                        This program is free software; you can redistribute it and/or modify   it under the terms of the GNU General Public License as published by   the Free Software Foundation; either version 2 of the License, or   (at your option) any later version.     This program is distributed in the hope that it will be useful,   but WITHOUT ANY WARRANTY; without even the implied warranty of   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the   GNU General Public License for more details.     You should have received a copy of the GNU General Public License   along with this program; if not, write to the Free Software   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.   $Id: sites.c,v 1.34.2.17 1999/08/27 17:48:58 joe Exp $*//* This is the core functionality of sitecopy, performing updates * and checking files etc. */#include <config.h>#include <sys/types.h>#include <sys/stat.h>#include <errno.h>#include <dirent.h>#include <fnmatch.h>#include <fcntl.h>#include <stdio.h>#ifdef HAVE_STDLIB_H#include <stdlib.h>#endif /* HAVE_STDLIB_H */#ifdef HAVE_UNISTD_H#include <unistd.h>#endif /* HAVE_UNISTD_H */#ifdef HAVE_STRING_H#include <string.h>#endif#ifdef HAVE_STRINGS_H#include <strings.h>#endif#include <time.h>#include <utime.h>#ifndef HAVE_SNPRINTF#include <snprintf.h>#endif /* !HAVE_SNPRINTF */#include <basename.h>#include "common.h"#include "dirname.h"#include "frontend.h"#include "protocol.h"#include "socket.h"#include "sites.h"#include "ftp.h"/* The protocol drivers */const struct proto_driver ftp_driver = {    ftp_init,    ftp_finish,    ftp_move,    ftp_put,    ftp_get,    ftp_delete,    ftp_chmod,    ftp_mkdir,    ftp_rmdir,    NULL, /* create link */    NULL, /* change link target */    NULL, /* delete link */    ftp_fetch,    "ftp", /* service name */    21, /* service number */    "FTP",    ftp_error};#ifdef USE_DAV#include "httpdav.h"const struct proto_driver dav_driver = {    http_init, /* Connect */    http_finish, /* Disconnect */    dav_move, /* File move */    http_put, /* File upload - HTTP PUT */    http_get, /* File download */    http_delete, /* File delete */    NULL, /* File chmod... this could be done using either	   *   a) A special live property	   *   b) The ACL extensions: draft-ietf-webdav-acl-??.txt	   */    dav_mkcol, /* Dir create */    dav_rmdir, /* Dir remove, same as file remove */    dav_mkref, /* Create link */    dav_chref, /* Change link */    dav_rmref, /* Remove link */    /* fetch listing */#ifdef HAVE_LIBEXPAT    dav_fetch, #else    NULL, #endif    "http", /* Service name */    80, /* server number */    "WebDAV", /* User-visible protocol name */    http_error};#endif/* This is the maximum number of directories which can be held in the queue  * at one time - each entry is only a pointer, so the size is not too * much of a problem.  */#define MAXDIRS 500/* This is the string used in the storage files to indicate the * line is a directory rather than a file */#define DIRWORD "dir"/* And this is used for links */#define LINKWORD "link"/* Shorthand for protocol driver methods */#define CALL( a ) (*the_site->driver->a)/* This holds ALL the sites defined in the rcfile */struct site_t *all_sites; bool fe_prompting;bool site_keepgoing;static int proto_init( struct site_t *the_site );/* Prototypes */static void site_checkmoved( struct site_t *any_site );static void site_destroyfile( struct site_file_t *file );static int site_synch_create_directories( struct site_t *the_site );static int site_synch_files( struct site_t *the_site );static int site_synch_remove_directories( struct site_t *the_site );static int site_update_create_directories( struct site_t *the_site, bool onlymarked );static int site_update_delete_directories( struct site_t *the_site, bool onlymarked );static int site_update_delete_files( struct site_t *the_site, bool onlymarked );static int site_update_files( struct site_t *the_site, bool onlymarked );static int site_update_links( struct site_t *the_site, bool onlymarked );static void site_fetch_walk( struct site_t *the_site,		      struct proto_file_t *files );static int site_readlocalfiles( struct site_t * );static int site_readremotefiles( struct site_t * );static void site_flatlist_items( FILE *f, struct site_t *the_site, 			  const enum file_diff diff, const char *name );/* Assigns the _local and _remote filenames to the site file */static void site_assignnames( struct site_file_t *the_file, struct site_t *the_site );/* Functions for manipulating the doubly linked files list */static void file_delete( struct site_t *site, struct site_file_t *item );static struct site_file_t *file_prepend( struct site_t *site );static struct site_file_t *file_append( struct site_t *site );static struct site_file_t *file_create( void );/* Whether a file is excluded from the site or not */static bool file_isexcluded( const char *filename, const char *fullpath, 		      struct site_t *site );/* Whether a file is ASCII text or binary */static bool file_isascii( char *filename, struct site_t *site );/* Creates and initializes a file. * Returns NULL if out-of-memory */inline struct site_file_t *file_create( void ) {    struct site_file_t *file;    file = malloc( sizeof(struct site_file_t) );    if( file!=NULL ) {	/* Initialize */	memset( file, 0, sizeof(struct site_file_t) );    }    return file;}/* Creates a file prepended on to the beginning of the site files list. * Returns NULL if the file could not be malloc'ed. */struct site_file_t *file_prepend( struct site_t *site ) {    struct site_file_t *file;    file = file_create();    if( file == NULL ) return NULL;    if( site->files == NULL ) {	/* Empty list */	site->files = file;	site->files_tail = file;    } else {	/* Non-empty list... update pointers */	site->files->prev = file;	file->next = site->files;	site->files = file;    }    return file;}/* Deletes the given file from the given site */void file_delete( struct site_t *site, struct site_file_t *item ) {    if( item->prev ) {	/* Not first in list */	item->prev->next = item->next;    } else {	/* Not last in list */	site->files = item->next;    }    if( item->next ) {	/* Not last in list */	item->next->prev = item->prev;    } else {	/* Last in list */	site->files_tail = item->prev;    }    /* Safety */    item->prev = NULL;    item->next = NULL;}/* Creates a file added on to the end of the site files list. * Returns NULL if the file could not be malloc'ed. */struct site_file_t *file_append( struct site_t *site ) {    struct site_file_t *file;    file = file_create();    if( file == NULL ) return NULL;    if( site->files_tail == NULL ) {	/* Empty list */	site->files = file;	site->files_tail = file;    } else {	/* Non-empty list... update pointers */	site->files_tail->next = file;	file->prev = site->files_tail;	site->files_tail = file;    }    return file;}/* Returns whether the given filename is excluded from the * given site */bool file_isexcluded( const char *filename, const char *fullpath, 		      struct site_t *site ) {    struct exclude_t *excl;    DEBUG( DEBUG_FILES, "\nChecking excludes:\n" );    for( excl=site->excludes; excl != NULL; excl=excl->next ) {	DEBUG( DEBUG_FILES, "%s ", excl->pattern );	if( excl->haspath ) {	    if( fnmatch( excl->pattern, fullpath, FNM_PATHNAME ) == 0 )		break;	} else {	    if( fnmatch( excl->pattern, filename, 0 ) == 0 )		break;	}    }    if( excl != NULL ) { /* excluded */	DEBUG( DEBUG_FILES, "- matched\n" );	return true;    } else {	DEBUG( DEBUG_FILES, "... not matched.\n" );	return false;    }}bool file_isascii( char *filename, struct site_t *site ) {    int n;    DEBUG( DEBUG_FILES, "\nChecking ASCII list:\n" );    for( n=0; n != site->numascii; n++ ) {	DEBUG( DEBUG_FILES, "%s ", site->ascii[n] );	if( fnmatch( site->ascii[n], filename, 0 ) == 0 )	    break;    }    if( n < site->numascii ) { 	DEBUG( DEBUG_FILES, "- matched\n" );	return true;    } else {	DEBUG( DEBUG_FILES, "... not matched.\n" );	return false;    }}struct site_t *site_find( const char *sitename ) {    struct site_t *current;    for( current = all_sites; current!=NULL; current=current->next ) {	if( strcmp( current->name, sitename ) == 0 ) {	    /* We found it */	    return current;	}    }    return NULL;}static int site_synch_create_directories( struct site_t *the_site ) {    struct site_file_t *current;    int ret;        ret = 0;        for( current=the_site->files; current!=NULL; current=current->next ) {	if( current->dir && current->diff==file_deleted ) {	    fe_synching( current );	    if( mkdir( current->full_local, 0755 ) == 0 ) {		fe_synched( current, true, NULL );	    } else {		ret = 1;		fe_synched( current, false, strerror(errno) );	    }	}    }    return ret;}static int site_synch_files( struct site_t *the_site ) {    struct site_file_t *current;    struct utimbuf times;    int ret;    ret = 0;    for( current = the_site->files; current!=NULL; current=current->next ) {	if( current->dir ) continue;	switch( current->diff ) {	case file_changed:	case file_deleted:	    fe_synching( current );	    if( CALL(file_download)( current->full_local,current->full_remote,				     current->remotesize, current->isascii )		!= PROTO_OK ) {		fe_synched( current, false, the_site->driver->last_error );		ret = 2;	    } else {		/* Change the modtime of the local file so it doesn't look		 * like it's changed already */		times.actime = current->remotetime;		times.modtime = current->remotetime;		if( utime( current->full_local, &times ) < 0 ) {		    fe_synched( current, false, strerror(errno) );		    ret = 2;		} else {		    fe_synched( current, true, NULL );		}	    }	    break;	case file_new:	    fe_synching( current );	    if( unlink( current->full_local ) != 0 ) {		fe_synched( current, false, strerror(errno) );		ret = 2;	    } else {		fe_synched( current, true, NULL );	    }	    break;	case file_moved:	    fe_synching( current );	    if( rename( current->full_local, 			current->old->full_local ) == 0 ) {		fe_synched( current, true, NULL );	    } else {		fe_synched( current, false, strerror(errno) );		ret = 2;	    }	default:	    break;	    	}    }    return ret;}static int site_synch_remove_directories( struct site_t *the_site ) {    struct site_file_t *current;    int ret;    ret = 0;    for( current=the_site->files_tail; current!=NULL; current=current->prev ) {	if( current->dir && (current->diff==file_new) ) {	    fe_synching( current );	    if( rmdir( current->full_local ) == -1 ) {		fe_synched( current, false, strerror(errno) );		ret = 3;	    } else {		fe_synched( current, true, NULL );	    }	}    }    return ret;}/* Resyncs the LOCAL site with the REMOTE site. * This is site_update backwards, and is essentially the same in structure, * except with the logic reversed. */int site_synch( struct site_t *the_site ) {    int ret;    ret = proto_init( the_site );

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产成人精品1024| 亚洲国产美国国产综合一区二区| 日韩av中文在线观看| 在线不卡a资源高清| 日本不卡一二三| 精品国产第一区二区三区观看体验| 日本少妇一区二区| 精品国产凹凸成av人网站| 国产精品99久久久久久宅男| 国产精品狼人久久影院观看方式| 成a人片国产精品| 曰韩精品一区二区| 欧美日本精品一区二区三区| 裸体歌舞表演一区二区| 国产视频一区在线观看 | 日日夜夜免费精品视频| 欧美一级二级在线观看| 激情久久五月天| 中文字幕一区二区不卡| 欧美体内she精高潮| 久久国产欧美日韩精品| 亚洲欧美怡红院| 7777精品久久久大香线蕉| 久久电影国产免费久久电影| 中文字幕的久久| 欧美日韩国产大片| 狠狠色狠狠色合久久伊人| 中文字幕中文字幕在线一区| 欧美日韩成人综合在线一区二区| 久久99国产精品免费| 国产精品久久久久久亚洲伦| 欧美一区二区三区啪啪| 972aa.com艺术欧美| 美女www一区二区| 最新成人av在线| 欧美sm美女调教| 色哟哟精品一区| 极品美女销魂一区二区三区| 亚洲精品第1页| 久久久久久久久久美女| 欧美午夜电影网| 成人午夜免费av| 蜜臀久久99精品久久久久宅男| 亚洲欧洲av色图| 精品福利在线导航| 欧美精品久久一区二区三区| 风间由美一区二区三区在线观看| 亚洲不卡在线观看| ●精品国产综合乱码久久久久| 日韩欧美国产电影| 欧美日韩一级二级| 在线日韩av片| av在线这里只有精品| 国产乱子伦视频一区二区三区| 午夜精品视频一区| 一区二区三区成人在线视频| 中文字幕国产精品一区二区| 日韩欧美一区二区免费| 欧美日韩国产bt| 在线观看区一区二| 色乱码一区二区三区88| 成人看片黄a免费看在线| 国产在线精品一区二区夜色| 日韩和的一区二区| 偷拍日韩校园综合在线| 亚洲国产日韩综合久久精品| ㊣最新国产の精品bt伙计久久| 久久免费偷拍视频| 久久精品一区二区三区不卡| 精品黑人一区二区三区久久| 3d动漫精品啪啪一区二区竹菊| 欧美日韩欧美一区二区| 欧美性生活久久| 欧美日韩一区二区欧美激情| 欧美偷拍一区二区| 欧美日韩国产电影| 7777精品久久久大香线蕉| 欧美精品一二三四| 欧美一区日韩一区| 日韩欧美自拍偷拍| 久久久影院官网| 久久欧美中文字幕| 久久精品一二三| 国产精品久久影院| 亚洲激情在线激情| 亚洲大片在线观看| 日韩精品一区第一页| 另类人妖一区二区av| 经典三级一区二区| av一区二区三区在线| 色综合av在线| 91精品国产欧美日韩| 精品国产一区二区三区久久久蜜月 | 国产在线精品免费| 成人小视频在线| 日本韩国一区二区| 欧美美女一区二区在线观看| 日韩欧美在线不卡| 欧美国产日本视频| 亚洲精品视频免费观看| 日韩在线卡一卡二| 国产成人午夜99999| 99国产精品久| 欧美卡1卡2卡| 国产清纯白嫩初高生在线观看91| 国产精品久久久久aaaa樱花| 亚洲美腿欧美偷拍| 奇米一区二区三区av| 国产风韵犹存在线视精品| 色综合久久88色综合天天6| 91精品国产一区二区三区| www日韩大片| 樱花草国产18久久久久| 久久99久久久久| 99国产欧美另类久久久精品| 91麻豆精品国产| 国产精品青草久久| 亚欧色一区w666天堂| 国产成人免费在线| 欧美日韩在线免费视频| 国产欧美日韩卡一| 亚洲成av人片在www色猫咪| 国产一级精品在线| 欧美怡红院视频| 中文子幕无线码一区tr| 日韩精品福利网| 99精品久久只有精品| 精品乱码亚洲一区二区不卡| 亚洲欧美日韩国产另类专区 | 亚洲一区二区三区在线看| 国产美女一区二区| 制服.丝袜.亚洲.中文.综合| 国产精品国产自产拍高清av| 日本在线不卡视频| 色综合久久天天| 国产日韩欧美不卡在线| 日韩av一区二| 91久久一区二区| 国产精品少妇自拍| 久久不见久久见免费视频1| 91精品福利视频| 国产精品欧美极品| 狠狠色狠狠色合久久伊人| 欧美一级爆毛片| 午夜精品一区二区三区电影天堂 | 国产欧美1区2区3区| 日本网站在线观看一区二区三区| jiyouzz国产精品久久| 国产欧美精品一区| 极品尤物av久久免费看| 欧美一级一级性生活免费录像| 亚洲精品国产一区二区精华液 | 99精品国产视频| 国产精品人成在线观看免费| 国产成人在线视频网址| xnxx国产精品| 国产自产2019最新不卡| 日韩欧美一二三| 人人狠狠综合久久亚洲| 欧美精品粉嫩高潮一区二区| 夜夜精品视频一区二区| 91视频91自| 亚洲精品日韩一| 在线亚洲一区二区| 一区二区三区日韩在线观看| 91在线观看污| 亚洲视频1区2区| 一本大道久久a久久精二百| 亚洲欧美日本韩国| 在线一区二区观看| 亚洲成人免费看| 欧美视频一区二区三区| 亚洲v日本v欧美v久久精品| 欧洲精品一区二区| 亚洲成人动漫一区| 4438亚洲最大| 久久99精品一区二区三区三区| 精品国产一区二区三区忘忧草| 国产在线精品免费av| 中文字幕免费在线观看视频一区| 成人小视频免费观看| 最近日韩中文字幕| 欧美日韩1234| 久久草av在线| 国产精品女人毛片| 日本乱人伦一区| 日韩1区2区日韩1区2区| 精品人在线二区三区| 丁香六月久久综合狠狠色| 亚洲精品网站在线观看| 欧美精品乱码久久久久久按摩 | 91精品国产综合久久久久久久| 美腿丝袜一区二区三区| 久久精品视频免费| 在线免费精品视频| 秋霞电影一区二区| 国产精品美女久久久久av爽李琼| 91久久精品一区二区三区| 亚洲一级二级三级在线免费观看| 欧美一级视频精品观看|