Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP2:GA
lftp
lftp-wrapper+edit+compat-modify.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File lftp-wrapper+edit+compat-modify.patch of Package lftp
--- src/CmdExec.cc | 32 ++++++++++++++++++++++++++++++++ src/CmdExec.h | 3 +++ src/CopyJob.cc | 3 ++- src/Makefile.am | 12 ++++++++++-- 4 files changed, 47 insertions(+), 3 deletions(-) Index: src/CmdExec.cc =================================================================== --- src/CmdExec.cc.orig 2013-04-12 10:26:09.000000000 +0200 +++ src/CmdExec.cc 2013-10-07 16:20:54.281577956 +0200 @@ -1225,6 +1225,38 @@ void CmdExec::ChangeSession(FileAccess * ConnectionSlot::Set(slot,session); } +void CmdExec::RegisterCompatCommand(const char *name,cmd_creator_t creator,const char *short_desc,const char *long_desc) +{ + if(dyn_cmd_table==0) + { + int count=0; + for(const cmd_rec *c=static_cmd_table; c->name; c++) + count++; + dyn_cmd_table.nset(static_cmd_table,count); + } + for(int i=0; i<dyn_cmd_table.count(); i++) + { + cmd_rec *const c=&dyn_cmd_table[i]; + if(!strcmp(c->name,name)) + { + char *lftp_name=(char*)malloc(5+strlen(name)+1); + char *short_d = NULL; + + if (c->short_desc) { + short_d = (char*)malloc(5+strlen(c->short_desc)+1); + sprintf(short_d, "lftp-%s", c->short_desc); + c->short_desc = short_d; + } + + sprintf(lftp_name, "lftp-%s", name); + c->name = lftp_name; + break; + } + } + cmd_rec new_entry={name,creator,short_desc,long_desc}; + dyn_cmd_table.append(new_entry); +} + const char *CmdExec::CmdByIndex(int i) { if(dyn_cmd_table) Index: src/CmdExec.h =================================================================== --- src/CmdExec.h.orig 2013-03-19 13:48:18.000000000 +0100 +++ src/CmdExec.h 2013-10-07 16:21:22.657911764 +0200 @@ -237,6 +237,9 @@ public: static void RegisterCommand(const char *name,cmd_creator_t creator, const char *short_name=0,const char *long_name=0); + static void RegisterCompatCommand(const char *name,cmd_creator_t creator, + const char *short_name=0,const char *long_name=0); + Job *builtin_lcd(); Job *builtin_cd(); Job *builtin_open(); Index: src/CopyJob.cc =================================================================== --- src/CopyJob.cc.orig 2013-03-19 13:49:02.000000000 +0100 +++ src/CopyJob.cc 2013-10-07 16:14:44.709259516 +0200 @@ -18,6 +18,7 @@ */ #include <config.h> +#include <unistd.h> #include "CopyJob.h" #include "ArgV.h" #include "plural.h" @@ -250,7 +251,7 @@ void CopyJobEnv::SetCopier(FileCopy *c,c xstring& CopyJobEnv::FormatFinalWithPrefix(xstring& s,const char *p) { - if(no_status) + if(no_status || !isatty(1)) return s; if(count==errors) return s; Index: src/Makefile.am =================================================================== --- src/Makefile.am.orig 2013-05-28 07:42:43.000000000 +0200 +++ src/Makefile.am 2013-10-07 16:21:53.681183489 +0200 @@ -1,6 +1,6 @@ pkgverlibdir = $(pkglibdir)/$(VERSION) -bin_PROGRAMS = lftp +bin_PROGRAMS = lftp lftp_wrapper bin_SCRIPTS = lftpget pkgdata_SCRIPTS = import-ncftp import-netscape verify-file convert-mozilla-cookies xdg-move noinst_SCRIPTS = ftpget @@ -8,6 +8,7 @@ noinst_SCRIPTS = ftpget EXTRA_DIST = $(pkgdata_SCRIPTS) $(bin_SCRIPTS) $(noinst_SCRIPTS) lftp_SOURCES = lftp.cc complete.h complete.cc lftp_rl.c lftp_rl.h attach.cc attach.h +lftp_wrapper_SOURCES = lftp-wrapper.c noinst_PROGRAMS = example1 example2 example1-cmd noinst_LTLIBRARIES = example-module1.la @@ -18,7 +19,7 @@ example_module1_la_SOURCES = example-mod example_module1_la_LDFLAGS = -module -avoid-version -rpath $(pkgverlibdir) TASK_MODULES = liblftp-pty.la liblftp-network.la proto-ftp.la proto-http.la proto-file.la proto-fish.la proto-sftp.la -JOB_MODULES = cmd-mirror.la cmd-sleep.la cmd-torrent.la +JOB_MODULES = cmd-mirror.la cmd-sleep.la cmd-torrent.la cmd-edit.la compat-mode.la if WITH_MODULES pkgverlib_LTLIBRARIES = $(TASK_MODULES) $(JOB_MODULES) else @@ -37,6 +38,8 @@ cmd_mirror_la_SOURCES = MirrorJob.cc Mir cmd_sleep_la_SOURCES = SleepJob.cc SleepJob.h cmd_torrent_la_SOURCES= Torrent.cc Torrent.h TorrentTracker.cc TorrentTracker.h\ DHT.cc DHT.h Bencode.cc Bencode.h +cmd_edit_la_SOURCES = cmd-edit.cc +compat_mode_la_SOURCES= CompatMode.cc CompatMode.h liblftp_pty_la_SOURCES = PtyShell.cc PtyShell.h lftp_pty.c lftp_pty.h liblftp_network_la_SOURCES = NetAccess.cc NetAccess.h Resolver.cc Resolver.h\ lftp_ssl.cc lftp_ssl.h buffer_ssl.cc buffer_ssl.h RateLimit.cc RateLimit.h\ @@ -55,6 +58,8 @@ proto_sftp_la_LDFLAGS = -module -avoid-v cmd_mirror_la_LDFLAGS = -module -avoid-version -rpath $(pkgverlibdir) cmd_sleep_la_LDFLAGS = -module -avoid-version -rpath $(pkgverlibdir) cmd_torrent_la_LDFLAGS= -module -avoid-version -rpath $(pkgverlibdir) +cmd_edit_la_LDFLAGS = -module -avoid-version -rpath $(pkgverlibdir) +compat_mode_la_LDFLAGS = -module -avoid-version -rpath $(pkgverlibdir) liblftp_pty_la_LDFLAGS = -avoid-version -rpath $(pkgverlibdir) liblftp_network_la_LDFLAGS = -avoid-version -rpath $(pkgverlibdir) $(OPENSSL_LDFLAGS) liblftp_network_la_LIBADD = $(SOCKSLIBS) $(OPENSSL_LIBS) $(LIBGNUTLS_LIBS) $(GNULIB) @@ -101,6 +106,9 @@ liblftp_jobs_la_LIBADD = $(JOB_MODULES_S lftp_LDADD = liblftp-jobs.la $(READLINE) lftp_DEPENDENCIES = liblftp-jobs.la $(READLINE_DEPEND) +lftp_wrapper_LDADD = $(GNULIB) +lftp_wrapper_DEPENDENCIES = + example1_LDADD = liblftp-tasks.la example1_cmd_LDADD = liblftp-jobs.la example2_LDADD = liblftp-tasks.la
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor