Mercurial > gftp.yaz
view lib/bookmark.c @ 146:782f84694489
2003-4-25 Brian Masney <masneyb@gftp.org>
* lib/rfc959.c - added IPV6 support (RFC2428). The only part of the
project that isn't IPV6 ready is the proxy comparsion functions.
* lib/protocols.c - change the hints.ai_family paramater from AF_INET
to PF_UNSPEC
* lib/gftp.h lib/misc.c lib/pty.c - moved the functionality of
pty[ms]_open() to pty.c. Combined these 2 functions into open_ptys(),
and there is one defined for each system type (lots of #define's in
this file!)
* lib/Makefile.am po/POTFILES.in - added pty.c
* lib/sshv2.c - when searching for the password prompt, omit the first
character in case it is capitalized. Also, use the new function
open_ptys()
* configure.in - search for openpty in -lutil. Also, define
HAVE_OPENPTY if this function is present on the system
author | masneyb |
---|---|
date | Sat, 26 Apr 2003 15:26:42 +0000 |
parents | 76e2b58a9440 |
children | c505d9ba9d53 |
line wrap: on
line source
/*****************************************************************************/ /* bookmark.c - functions for connecting to a site via a bookmark */ /* Copyright (C) 1998-2003 Brian Masney <masneyb@gftp.org> */ /* */ /* 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., 59 Temple Place - Suite 330, Boston, MA 02111 USA */ /*****************************************************************************/ #include "gftp.h" static const char cvsid[] = "$Id$"; static int bookmark_parse_url (gftp_request * request, const char * url) { const char * pos; g_return_val_if_fail (request != NULL, GFTP_EFATAL); g_return_val_if_fail (url != NULL, GFTP_EFATAL); if ((pos = strstr (url, "://")) != NULL) { pos += 3; if (strncmp (url, "bookmark://", 11) != 0) { request->logging_function (gftp_logging_error, request->user_data, _("Invalid URL %s\n"), url); return (GFTP_EFATAL); } } else pos = url; return (gftp_parse_bookmark (request, pos)); } void bookmark_register_module (void) { } void bookmark_init (gftp_request * request) { g_return_if_fail (request != NULL); request->protonum = GFTP_BOOKMARK_NUM; request->init = bookmark_init; request->destroy = NULL; request->connect = NULL; request->disconnect = NULL; request->get_file = NULL; request->put_file = NULL; request->transfer_file = NULL; request->get_next_file_chunk = NULL; request->put_next_file_chunk = NULL; request->end_transfer = NULL; request->list_files = NULL; request->get_next_file = NULL; request->get_file_size = NULL; request->chdir = NULL; request->rmdir = NULL; request->rmfile = NULL; request->mkdir = NULL; request->rename = NULL; request->chmod = NULL; request->set_file_time = NULL; request->site = NULL; request->parse_url = bookmark_parse_url; request->url_prefix = "bookmark"; request->need_hostport = 0; request->need_userpass = 0; request->use_threads = 0; request->use_cache = 0; request->always_connected = 0; gftp_set_config_options (request); }