diff -ruNd ftp/ftptool/patches/patch-aa ftp/ftptool/patches/patch-aa --- ftp/ftptool/patches/patch-aa Mon Mar 25 11:58:58 1996 +++ ftp/ftptool/patches/patch-aa Sun Apr 9 19:38:46 2000 @@ -25,45 +25,6 @@ if ((fp = fopen(filename, "r")) == NULL) { footer_message("%s:%s", filename, sys_errlist[errno]); -diff -rc ../../Ftptool4.6.orig/change_dir.c ./change_dir.c -*** ../../Ftptool4.6.orig/change_dir.c Tue Mar 19 21:11:22 1996 ---- ./change_dir.c Tue Mar 19 21:17:42 1996 -*************** -*** 82,88 **** ---- 82,90 ---- - #endif - { - static char cld[MAXPATHLEN + 2]; -+ #ifndef __FreeBSD__ - extern char *sys_errlist[]; -+ #endif - struct dirlist *head = NULL; - int wasinactive; - int rval = 0; -*************** -*** 482,488 **** ---- 484,492 ---- - { - struct dirlist *head = NULL; - struct dirlist *tmp; -+ #ifndef __FreeBSD__ - extern char *sys_errlist[]; -+ #endif - int rval = 0; - - if (chdir(dir) == -1) { -*************** -*** 524,530 **** ---- 528,536 ---- - #endif - { - int answer; -+ #ifndef __FreeBSD__ - extern char *sys_errlist[]; -+ #endif - #ifdef XVIEW3 - Xv_notice notice; - #endif diff -rc ../../Ftptool4.6.orig/dofuncs.c ./dofuncs.c *** ../../Ftptool4.6.orig/dofuncs.c Tue Mar 19 21:11:23 1996 --- ./dofuncs.c Tue Mar 19 21:17:41 1996 @@ -94,34 +55,6 @@ #ifdef USE_PROTOTYPES -diff -rc ../../Ftptool4.6.orig/ftptool.h ./ftptool.h -*** ../../Ftptool4.6.orig/ftptool.h Tue Mar 19 21:11:22 1996 ---- ./ftptool.h Tue Mar 19 21:17:40 1996 -*************** -*** 49,64 **** ---- 49,70 ---- - #ifdef AIXV3 - #include - #else -+ #ifdef __FreeBSD__ -+ #include -+ #else - #include - #endif - #endif - #endif -+ #endif - - #include - #include - #include - #include -+ #ifndef __FreeBSD__ - #include -+ #endif - #include - #include - #include diff -rc ../../Ftptool4.6.orig/tar_view.c ./tar_view.c *** ../../Ftptool4.6.orig/tar_view.c Tue Mar 19 21:11:24 1996 --- ./tar_view.c Tue Mar 19 21:17:41 1996 @@ -137,18 +70,3 @@ int rval; xv_set(base_window.frame, -diff -rc ../../Ftptool4.6.orig/view_file.c ./view_file.c -*** ../../Ftptool4.6.orig/view_file.c Tue Mar 19 21:11:23 1996 ---- ./view_file.c Tue Mar 19 21:17:41 1996 -*************** -*** 582,588 **** ---- 582,590 ---- - char *filename = NULL; - struct extension_info *tmp; - FILE *fp; -+ #ifndef __FreeBSD__ - extern char *sys_errlist[]; -+ #endif - char *typename; - - /* create will also truncate, which we want to do here */ diff -ruNd ftp/ftptool/patches/patch-ba ftp/ftptool/patches/patch-ba --- ftp/ftptool/patches/patch-ba Thu Jan 1 03:00:00 1970 +++ ftp/ftptool/patches/patch-ba Sun Apr 9 01:34:31 2000 @@ -0,0 +1,11 @@ +--- button_funcs.c.orig Mon Aug 29 07:05:42 1994 ++++ button_funcs.c Sat Apr 8 22:42:06 2000 +@@ -1162,7 +1162,7 @@ + if (!last_was_NL) + putc('\n', pp); + +- sigfile = find_dotfile(".signature"); ++ sigfile = find_dotfile(".desk/signature"); + if (sigfile) { + sigfp = fopen(sigfile, "r"); + if (sigfp != NULL) { diff -ruNd ftp/ftptool/patches/patch-bb ftp/ftptool/patches/patch-bb --- ftp/ftptool/patches/patch-bb Thu Jan 1 03:00:00 1970 +++ ftp/ftptool/patches/patch-bb Sun Apr 9 01:35:36 2000 @@ -0,0 +1,11 @@ +--- create_other.c.orig Mon Aug 29 07:05:43 1994 ++++ create_other.c Sat Apr 8 22:32:45 2000 +@@ -79,7 +79,7 @@ + XV_HELP_DATA, "ftptool:HostLoadHostList", + NULL, + MENU_ITEM, +- MENU_STRING, "Append .netrc", ++ MENU_STRING, "Append .desk/netrc", + MENU_NOTIFY_PROC, host_append_netrc_proc, + XV_HELP_DATA, "ftptool:HostAppendNetRC", + NULL, diff -ruNd ftp/ftptool/patches/patch-bc ftp/ftptool/patches/patch-bc --- ftp/ftptool/patches/patch-bc Thu Jan 1 03:00:00 1970 +++ ftp/ftptool/patches/patch-bc Sun Apr 9 19:35:09 2000 @@ -0,0 +1,78 @@ +--- ftptool.info.orig Mon Aug 29 07:05:38 1994 ++++ ftptool.info Sun Apr 9 19:33:50 2000 +@@ -130,7 +130,7 @@ + :ViewRemote + Remote File + +-Copies the remote file(s) to /var/tmp on the ++Copies the remote file(s) to /TMPDIR/ftptool.XXXXXX on the + local machine. It then tries to determine the + file type, and start the appropriate viewer. + The file types understood are: +@@ -389,7 +389,7 @@ + :RemoteMenuView + View File + +-Copies the remote file(s) to /var/tmp on the ++Copies the remote file(s) to /TMPDIR/ftptool.XXXXXX on the + local machine. It then tries to determine the + file type, and start the appropriate viewer. + The file types understood are: +@@ -709,9 +709,9 @@ + + This is your personal FTP host list. It allows + you to save your most recently used sites and +-logins in a menu, as the .netrc ftp uses does. ++logins in a menu, as the .desk/netrc ftp uses does. + This menu is saved in .ftptoolrc (which is +-constructed from .netrc if it doesn't exist) ++constructed from .desk/netrc if it doesn't exist) + in ASCII, so you can edit it by hand. + + Be careful when saving password information, as +@@ -1027,9 +1027,9 @@ + ftptool won't know about it). + # + :HostAppendNetRC +-Append .netrc ++Append .desk/netrc + +-Looks for a .netrc in your home directory, then ++Looks for a .desk/netrc in your home directory, then + the current directory if needed. Loads 'machine' + entries into your host list, using a name of + 'machinename loginname'. You can then change the +@@ -1038,10 +1038,10 @@ + 'login' entry. 'macdef' is not recognized. + + If you do not have a .ftptoolrc, then ftptool +-will look for a .netrc file at startup. ++will look for a .desk/netrc file at startup. + + You will not be able to select this if you do +-not have a .netrc. ++not have a .desk/netrc. + # + :HostWindow + Host Information +@@ -1051,9 +1051,9 @@ + + It is also your personal FTP host list. It + allows you to save your most recently used sites +-and logins in a menu, as the .netrc ftp uses does. ++and logins in a menu, as the .desk/netrc ftp uses does. + This menu is saved in .ftptoolrc (which is +-constructed from .netrc if it doesn't exist) ++constructed from .desk/netrc if it doesn't exist) + in ASCII, so you can edit it by hand. + + Be careful when saving password information, as +@@ -1107,7 +1107,7 @@ + + - Save your personal host list + - Load your original host list +- - Load your FTP .netrc (if you have one) ++ - Load your FTP .desk/netrc (if you have one) + - Add to your personal host list + - Change an entry in the host list + - Delete an entry from the host list diff -ruNd ftp/ftptool/patches/patch-bd ftp/ftptool/patches/patch-bd --- ftp/ftptool/patches/patch-bd Thu Jan 1 03:00:00 1970 +++ ftp/ftptool/patches/patch-bd Sun Apr 9 01:37:59 2000 @@ -0,0 +1,37 @@ +--- ftptool.man.orig Mon Aug 29 07:05:38 1994 ++++ ftptool.man Sat Apr 8 22:27:59 2000 +@@ -17,7 +17,7 @@ + Ftptool is a (hopefully) easier interface to ftp. It hides the interaction with + ftp and the need for knowing commands like 'get' and 'put', and the difference + between 'get' and 'mget'. It provides the ability to transfer directories, +-which ftp by itself does not do, and has an extended form of ftp's .netrc file. ++which ftp by itself does not do, and has an extended form of ftp's .desk/netrc file. + .SH OPTIONS + .TP + .B generic-tool-arguments +@@ -239,12 +239,12 @@ + Load the current host list. It will attempt to load from a file named .ftptoolrc + in your home directory. If that fails, it looks in your current directory. + .TP +-.B Append .netrc ++.B Append .desk/netrc + When ftptool is first started, it automatically reads the .ftptoolrc file. +-If that is not found, it will look for a .netrc file and load from that using ++If that is not found, it will look for a .desk/netrc file and load from that using + a (very) basic method. If you already have a .ftptoolrc, and want to load +-the .netrc too, use this option (this is primarily for earlier versions that +-did not read the .netrc). ++the .desk/netrc too, use this option (this is primarily for earlier versions that ++did not read the .desk/netrc). + .B Add + Add the current information into the list, based on the name in + the Alias field. +@@ -263,7 +263,7 @@ + a companion Minus button which will hide those options. + .TP + .B Alias +-The alias name. When .netrc entries are loaded, they appear as 'machine login'. ++The alias name. When .desk/netrc entries are loaded, they appear as 'machine login'. + .TP + .B Last Visited + The last time you successfully connected to the host described by this alias. diff -ruNd ftp/ftptool/patches/patch-be ftp/ftptool/patches/patch-be --- ftp/ftptool/patches/patch-be Thu Jan 1 03:00:00 1970 +++ ftp/ftptool/patches/patch-be Sun Apr 9 01:38:42 2000 @@ -0,0 +1,65 @@ +--- host_list.c.orig Mon Aug 29 07:05:37 1994 ++++ host_list.c Sat Apr 8 22:24:59 2000 +@@ -1384,11 +1384,11 @@ + home = getenv("HOME"); + if (home != NULL && home[0] != '\0') { + /* try $HOME/dotfile */ +- filename = malloc((unsigned int)(strlen(home) + 1 + ++ filename = malloc((unsigned int)(strlen(home) + 7 + + strlen(dotfile) + 1)); + if (filename == NULL) + return (NULL); +- sprintf(filename, "%s/%s", home, dotfile); ++ sprintf(filename, "%s/.desk/%s", home, dotfile); + if ((fd = creat(filename, mode)) == -1) { + free(filename); + return (NULL); +@@ -1422,11 +1422,11 @@ + home = getenv("HOME"); + if (home != NULL && home[0] != '\0') { + /* try $HOME/dotfile */ +- filename = malloc((unsigned int)(strlen(home) + 1 + ++ filename = malloc((unsigned int)(strlen(home) + 7 + + strlen(dotfile) + 1)); + if (filename == NULL) + return (NULL); +- sprintf(filename, "%s/%s", home, dotfile); ++ sprintf(filename, "%s/.desk/%s", home, dotfile); + if (access(filename, F_OK) == -1) { + free(filename); + return (NULL); +@@ -1520,14 +1520,14 @@ + break; + case LOGIN: + if (!foundmachine || fscanf(fp, "%s", login) == EOF) { +- footer_message("Error in .netrc."); ++ footer_message("Error in .desk/netrc."); + goto out; + } + break; + case PASSWORD: + if (!foundmachine || + fscanf(fp, "%s", password) == EOF) { +- footer_message("Error in .netrc."); ++ footer_message("Error in .desk/netrc."); + goto out; + } + break; +@@ -1557,7 +1557,7 @@ + #endif + { + if (machine[0] == '\0' || login[0] == '\0') { +- footer_message("Incomplete .netrc entry."); ++ footer_message("Incomplete .desk/netrc entry."); + return; + } + sprintf(scratch, "%s %s", machine, login); +@@ -1567,7 +1567,7 @@ + } + if ((hostlist_head = add_hostalias(hostlist_head, scratch, "Never", + DEFAULT_PROXY, machine, login, password, "", BINARY, ".", ".", +- UNIX_DIR_PATTERN, "From .netrc", REMOTE_OS_UNIX)) == NULL) { ++ UNIX_DIR_PATTERN, "From .desk/netrc", REMOTE_OS_UNIX)) == NULL) { + xv_set(host_window.frame, + FRAME_LEFT_FOOTER, "Add failed", + NULL); diff -ruNd ftp/ftptool/patches/patch-bf ftp/ftptool/patches/patch-bf --- ftp/ftptool/patches/patch-bf Thu Jan 1 03:00:00 1970 +++ ftp/ftptool/patches/patch-bf Sun Apr 9 21:49:57 2000 @@ -0,0 +1,41 @@ +--- main.c.orig Mon Aug 29 07:05:37 1994 ++++ main.c Sun Apr 9 21:49:47 2000 +@@ -66,8 +66,19 @@ + char *helppath; + int closed = 0; + struct servent *servent; ++ static char *tmpdiroot; + + /* FTP inits */ ++ tmpdiroot = getenv("TMPDIR"); ++ if (tmpdiroot == NULL || *tmpdiroot == '\0') tmpdiroot = "/tmp"; ++ asprintf(&tmpdir, "%s/ftptool.XXXXXX", tmpdiroot); ++ if ((tmpdiroot = mkdtemp(tmpdir)) == NULL) ++ err( EX_UNAVAILABLE ++ , "can't create %s\n" ++ , tmpdir ++ ); ++ free(tmpdir); ++ asprintf(&tmpdir, "%s", tmpdiroot); + data = -1; + abrtflag = 0; + verbose = 1; +@@ -123,15 +134,15 @@ + xv_init(XV_INIT_ARGC_PTR_ARGV, &argc, argv, NULL); + + if ((helppath = getenv("HELPPATH")) == NULL) { +- putenv("HELPPATH=/usr/local/lib/help:."); ++ putenv("HELPPATH=/usr/X11R6/lib/help:."); + } else { +- sprintf(scratch, "HELPPATH=%s:/usr/local/lib/help:.", helppath); ++ sprintf(scratch, "HELPPATH=%s:/usr/X11R6/lib/help:.", helppath); + putenv(strdup(scratch)); + } + + load_xdefaults(); + +- netrc_filename = find_dotfile(".netrc"); ++ netrc_filename = find_dotfile(".desk/netrc"); + + if (argc > 1) { + handle_tarfile(argv[1]); diff -ruNd ftp/ftptool/patches/patch-bg ftp/ftptool/patches/patch-bg --- ftp/ftptool/patches/patch-bg Thu Jan 1 03:00:00 1970 +++ ftp/ftptool/patches/patch-bg Sun Apr 9 01:39:52 2000 @@ -0,0 +1,11 @@ +--- menu_funcs.c.orig Mon Aug 29 07:05:38 1994 ++++ menu_funcs.c Sat Apr 8 22:29:04 2000 +@@ -763,7 +763,7 @@ + /* + * Save + * Load +- * Append .netrc ++ * Append .desk/netrc + * Add + * Change + * Delete diff -ruNd ftp/ftptool/patches/patch-bh ftp/ftptool/patches/patch-bh --- ftp/ftptool/patches/patch-bh Thu Jan 1 03:00:00 1970 +++ ftp/ftptool/patches/patch-bh Sun Apr 9 19:54:30 2000 @@ -0,0 +1,31 @@ +--- config.h.orig Mon Aug 29 07:05:37 1994 ++++ config.h Sun Apr 9 19:53:18 2000 +@@ -12,10 +12,10 @@ + + #define UNIX_DIR_PATTERN "PERMS LINKS USER GROUP SIZE MONTH DAY TIME NAME" + +-/* define this to be a global .ftptoolrc */ +-/* ftptool will load this if $HOME/.ftptoolrc does not exist */ ++/* define this to be a global ftptoolrc */ ++/* ftptool will load this if $HOME/.desk/ftptoolrc does not exist */ + #ifndef GLOBAL_FTPTOOLRC +-#define GLOBAL_FTPTOOLRC "/usr/local/lib/ftptoolrc" ++#define GLOBAL_FTPTOOLRC "/usr/X11R6/etc/ftptoolrc" + #endif + + /* Pick your favorite mailer, for use when sending feedback */ +@@ -25,10 +25,10 @@ + + /* The following are the filenames that ftptool will create in the */ + /* users home directory. You probably don't want to change this. */ +-#define FTPTOOL_RC ".ftptoolrc" +-#define FTPTOOL_LAYOUT ".ftptoollayout" +-#define FTPTOOL_DEFAULTS ".ftptooldefaults" +-#define FTPTOOL_TYPES ".ftptooltypes" ++#define FTPTOOL_RC "ftptoolrc" ++#define FTPTOOL_LAYOUT "ftptoollayout" ++#define FTPTOOL_DEFAULTS "ftptooldefaults" ++#define FTPTOOL_TYPES "ftptooltypes" + + /* This is the maximum size the magic number of the file can be */ + /* Actually an old term, but this is really how much ftptool will */ diff -ruNd ftp/ftptool/patches/patch-bi ftp/ftptool/patches/patch-bi --- ftp/ftptool/patches/patch-bi Thu Jan 1 03:00:00 1970 +++ ftp/ftptool/patches/patch-bi Sun Apr 9 20:40:31 2000 @@ -0,0 +1,42 @@ +--- ftptool.h.orig Mon Aug 29 07:05:37 1994 ++++ ftptool.h Sun Apr 9 20:25:54 2000 +@@ -14,6 +14,10 @@ + #include + #include + #include ++#include ++#include ++#include ++#include + + #include + #include +@@ -49,16 +53,22 @@ + #ifdef AIXV3 + #include + #else ++#ifdef __FreeBSD__ ++#include ++#else + #include + #endif + #endif + #endif ++#endif + + #include + #include + #include + #include ++#ifndef __FreeBSD__ + #include ++#endif + #include + #include + #include +@@ -525,3 +535,5 @@ + EXTERN int crflag; + EXTERN int runique; + EXTERN int sendport; ++EXTERN char *tmpdir; ++ diff -ruNd ftp/ftptool/patches/patch-bj ftp/ftptool/patches/patch-bj --- ftp/ftptool/patches/patch-bj Thu Jan 1 03:00:00 1970 +++ ftp/ftptool/patches/patch-bj Sun Apr 9 19:14:42 2000 @@ -0,0 +1,21 @@ +--- event.c.orig Mon Aug 29 07:05:36 1994 ++++ event.c Sun Apr 9 19:14:04 2000 +@@ -162,6 +162,7 @@ + { + int answer; + static int triedonce; ++ char *tmpstr; + #ifdef XVIEW3 + Xv_notice notice; + #endif +@@ -267,7 +268,9 @@ + + quit_ftp(); + +- system("rm -rf /usr/tmp/sched* /usr/tmp/ftptl*"); ++ asprintf(&tmpstr, "rm -rf %s/sched* %s/ftptl*", tmpdir, tmpdir); ++ system(tmpstr); ++ free(tmpstr); + + dowhat = DOQUIT; + diff -ruNd ftp/ftptool/patches/patch-bk ftp/ftptool/patches/patch-bk --- ftp/ftptool/patches/patch-bk Thu Jan 1 03:00:00 1970 +++ ftp/ftptool/patches/patch-bk Sun Apr 9 19:19:03 2000 @@ -0,0 +1,21 @@ +--- misc.c.orig Mon Aug 29 07:05:36 1994 ++++ misc.c Sun Apr 9 19:18:32 2000 +@@ -252,6 +252,7 @@ + void quit_ftp() + #endif + { ++ char *tmpstr; + connected = 0; + + if (!timedout && commandfp) +@@ -260,7 +261,9 @@ + data = -1; + + /* remove /usr/tmp files */ +- system("rm -rf /usr/tmp/ftptl*"); ++ asprintf(&tmpstr, "rm -rf %s/ftptl*", tmpdir); ++ system(tmpstr); ++ free(tmpstr); + } + + #ifdef USE_PROTOTYPES diff -ruNd ftp/ftptool/patches/patch-bl ftp/ftptool/patches/patch-bl --- ftp/ftptool/patches/patch-bl Thu Jan 1 03:00:00 1970 +++ ftp/ftptool/patches/patch-bl Sun Apr 9 19:22:43 2000 @@ -0,0 +1,21 @@ +--- view_file.c.orig Mon Aug 29 07:05:37 1994 ++++ view_file.c Sun Apr 9 19:22:05 2000 +@@ -294,7 +294,7 @@ + + if (tmpname == NULL || (access(tmpname, F_OK) == -1 && + errno == ENOENT)) { +- tmpname = tempnam("/var/tmp", "ftptl"); ++ tmpname = tempnam(tmpdir, "ftptl"); + if (tmpname == NULL || (mkdir(tmpname, 0777) == -1)) { + footer_message("Can't create temporary directory."); + return (1); +@@ -582,7 +582,9 @@ + char *filename = NULL; + struct extension_info *tmp; + FILE *fp; ++#ifndef __FreeBSD__ + extern char *sys_errlist[]; ++#endif + char *typename; + + /* create will also truncate, which we want to do here */ diff -ruNd ftp/ftptool/patches/patch-bm ftp/ftptool/patches/patch-bm --- ftp/ftptool/patches/patch-bm Thu Jan 1 03:00:00 1970 +++ ftp/ftptool/patches/patch-bm Sun Apr 9 19:25:12 2000 @@ -0,0 +1,11 @@ +--- schedule.c.orig Mon Aug 29 07:05:37 1994 ++++ schedule.c Sun Apr 9 19:24:36 2000 +@@ -308,7 +308,7 @@ + else + repeat_minutes = 0; + +- filename = tempnam("/var/tmp", "sched"); ++ filename = tempnam(tmpdir, "sched"); + if (filename == NULL) { + schedule_footer_message("Can't create temporary file."); + goto out; diff -ruNd ftp/ftptool/patches/patch-bn ftp/ftptool/patches/patch-bn --- ftp/ftptool/patches/patch-bn Thu Jan 1 03:00:00 1970 +++ ftp/ftptool/patches/patch-bn Sun Apr 9 19:37:58 2000 @@ -0,0 +1,48 @@ +--- change_dir.c.orig Mon Aug 29 07:05:43 1994 ++++ change_dir.c Sun Apr 9 19:37:15 2000 +@@ -46,13 +46,13 @@ + NULL); + } + local_footer_message( +- "Current directory was deleted. Changing to /tmp."); ++ "Current directory was deleted. Changing to TMPDIR."); + clear_slist(local_window.list); + xv_set(local_window.list, + XV_SHOW, TRUE, + NULL); + dircache_delete(&local_dircache, dirname); +- change_local_dir("/tmp", 0); ++ change_local_dir(tmpdir, 0); + return (1); + } else if (error != 0) { + local_footer_message( +@@ -82,7 +82,9 @@ + #endif + { + static char cld[MAXPATHLEN + 2]; ++#ifndef __FreeBSD__ + extern char *sys_errlist[]; ++#endif + struct dirlist *head = NULL; + int wasinactive; + int rval = 0; +@@ -482,7 +484,9 @@ + { + struct dirlist *head = NULL; + struct dirlist *tmp; ++#ifndef __FreeBSD__ + extern char *sys_errlist[]; ++#endif + int rval = 0; + + if (chdir(dir) == -1) { +@@ -524,7 +528,9 @@ + #endif + { + int answer; ++#ifndef __FreeBSD__ + extern char *sys_errlist[]; ++#endif + #ifdef XVIEW3 + Xv_notice notice; + #endif