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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? 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一区二区三区免费野_久草精品视频
久久成人久久爱| 亚洲综合无码一区二区| 成人欧美一区二区三区小说| 7777精品伊人久久久大香线蕉超级流畅 | 91精品婷婷国产综合久久竹菊| 欧美精选一区二区| 精品国产精品一区二区夜夜嗨| 精品一区二区三区影院在线午夜 | 国产乱人伦偷精品视频免下载| 麻豆专区一区二区三区四区五区| 91在线视频官网| 国产精品久久久久9999吃药| 国产精品一线二线三线| 国产亚洲欧美色| 丰满白嫩尤物一区二区| av中文字幕亚洲| 在线一区二区三区做爰视频网站| 欧美在线一二三| 日韩一区二区精品葵司在线| 日韩精品资源二区在线| 国产精品欧美极品| 亚洲一区二区三区在线播放| 亚洲成人精品在线观看| 国内精品国产成人| 欧美系列亚洲系列| 国产目拍亚洲精品99久久精品| 亚洲色图欧美激情| 奇米四色…亚洲| eeuss鲁一区二区三区| 欧美久久一二区| 国产精品剧情在线亚洲| 蜜乳av一区二区| 91亚洲永久精品| 国产日韩欧美一区二区三区乱码| 欧美日韩三级一区二区| 久久精品欧美日韩| 国产99久久久精品| 国产精品每日更新在线播放网址| 国产精品456| 久久蜜桃av一区精品变态类天堂| 久久精品国产精品青草| 日韩欧美中文一区| 成人免费的视频| 亚洲女子a中天字幕| 欧美在线高清视频| 欧美bbbbb| 国产欧美日韩精品a在线观看| 不卡的av网站| 青青草国产精品97视觉盛宴| 久久五月婷婷丁香社区| 色婷婷综合五月| 免播放器亚洲一区| 亚洲欧洲无码一区二区三区| 欧美精品三级日韩久久| 国产乱码精品一区二区三| 亚洲欧美日韩久久精品| 日韩精品一区二区三区三区免费| 国产成人一区在线| 日韩精品久久久久久| 国产欧美日韩卡一| 日韩美一区二区三区| 色婷婷av一区二区三区gif| 日韩精品免费专区| 天天综合网 天天综合色| 亚洲午夜日本在线观看| 五月天中文字幕一区二区| 亚洲在线视频免费观看| 依依成人精品视频| 欧美写真视频网站| 99re成人精品视频| 在线观看成人小视频| 精品视频在线免费| 一级特黄大欧美久久久| 欧美日韩国产三级| 伦理电影国产精品| 国产精品伦一区二区三级视频| 精品国产麻豆免费人成网站| 久久先锋影音av| 亚洲色图欧美激情| 日韩不卡一区二区三区| 成人性生交大片免费看视频在线| 99精品在线免费| 日韩欧美中文字幕公布| 亚洲三级电影全部在线观看高清| 亚洲在线成人精品| 国产美女一区二区| 欧美日本一区二区三区四区 | 91美女在线视频| 亚洲高清免费视频| 亚洲国产精品成人久久综合一区| 制服丝袜成人动漫| 韩日欧美一区二区三区| 一区二区三区在线视频观看| 国产精品日产欧美久久久久| 毛片av一区二区| 国产一区二区在线观看视频| 国产美女在线观看一区| 99国产精品一区| 国产乱人伦偷精品视频不卡| 成人动漫一区二区| 国产精品一区二区在线播放 | 久久久亚洲精品一区二区三区| 丰满少妇在线播放bd日韩电影| 国产精品国产a| 欧美高清视频在线高清观看mv色露露十八| 亚洲一区免费观看| 亚洲午夜影视影院在线观看| 91香蕉视频黄| 日韩av不卡一区二区| 久久99热这里只有精品| 麻豆国产精品777777在线| 亚洲欧美日韩综合aⅴ视频| 国产色综合一区| 国产一区二区三区四区五区美女 | 韩国v欧美v亚洲v日本v| 日韩精品一区二区三区中文不卡| 青青草91视频| 久久一二三国产| eeuss鲁一区二区三区| 亚洲欧美福利一区二区| 在线成人av网站| 国产综合色视频| 国产精品久久久久久久久搜平片| 99riav久久精品riav| 成人h动漫精品一区二区| 国产精品一区二区果冻传媒| 日韩午夜在线观看| 蜜桃一区二区三区四区| 欧美日本在线播放| 日韩高清在线不卡| 91精品国产一区二区三区蜜臀 | 成人精品小蝌蚪| 一区二区三区小说| www.日韩大片| 国产免费观看久久| 亚洲国产另类精品专区| 激情综合色综合久久综合| 极品少妇xxxx偷拍精品少妇| 91丝袜国产在线播放| 中文字幕乱码久久午夜不卡| 男人的j进女人的j一区| 日本电影亚洲天堂一区| 亚洲男人天堂一区| 欧美一区二区国产| 国产·精品毛片| 一区二区三区丝袜| 日韩精品一区二区三区视频在线观看| 日本美女一区二区三区| 国产日韩欧美综合一区| 在线精品亚洲一区二区不卡| 久久精品国产亚洲5555| 国产精品久久久久影院老司 | 欧美日韩视频在线观看一区二区三区| 亚洲国产精品久久人人爱蜜臀| 91精品国产91久久久久久一区二区 | 亚洲综合色婷婷| 精品入口麻豆88视频| 在线一区二区三区| 国产成a人亚洲精| 同产精品九九九| 亚洲伊人色欲综合网| 成人av一区二区三区| 国产亚洲精品超碰| 94色蜜桃网一区二区三区| 国产精品视频在线看| 精品一区二区三区香蕉蜜桃 | 国产伦精品一区二区三区视频青涩| 国产欧美综合在线观看第十页| 欧美日韩国产不卡| 93久久精品日日躁夜夜躁欧美| 亚洲综合视频在线| 欧美二区三区的天堂| 麻豆精品在线看| 国产欧美一区二区三区沐欲| 韩国v欧美v亚洲v日本v| 久久久久久电影| 欧美性猛交一区二区三区精品| 亚洲高清中文字幕| 国产性色一区二区| 精品毛片乱码1区2区3区 | 日韩精品一区二区三区swag| 欧美性受xxxx黑人xyx性爽| 94-欧美-setu| 91久久精品网| 欧美三片在线视频观看| 欧美私人免费视频| 欧美中文字幕一区| 精品污污网站免费看| 欧美一区二区福利在线| 欧美一二三四在线| 日韩欧美一区二区视频| 日韩你懂的在线播放| 国产欧美综合在线| 亚洲三级久久久| 蜜桃视频在线观看一区| 国产a级毛片一区| 色婷婷综合久久久中文字幕| 在线不卡的av| 日本一区二区三区四区在线视频| 中文字幕一区在线观看|