summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeinrich Wendel <lanius@gentoo.org>2003-07-15 14:45:33 +0000
committerHeinrich Wendel <lanius@gentoo.org>2003-07-15 14:45:33 +0000
commit07184a79181c5071a42c0cf961ab3f7aec3f4fe4 (patch)
tree629fef8af3a33e7ca6950c8598e16359eded6ce6 /app-misc/mtoolsfm/files/mtoolsfm.c.diff
parentinitial release (diff)
downloadgentoo-2-07184a79181c5071a42c0cf961ab3f7aec3f4fe4.tar.gz
gentoo-2-07184a79181c5071a42c0cf961ab3f7aec3f4fe4.tar.bz2
gentoo-2-07184a79181c5071a42c0cf961ab3f7aec3f4fe4.zip
initial release
Diffstat (limited to 'app-misc/mtoolsfm/files/mtoolsfm.c.diff')
-rw-r--r--app-misc/mtoolsfm/files/mtoolsfm.c.diff62
1 files changed, 62 insertions, 0 deletions
diff --git a/app-misc/mtoolsfm/files/mtoolsfm.c.diff b/app-misc/mtoolsfm/files/mtoolsfm.c.diff
new file mode 100644
index 000000000000..cc7b12e95fc4
--- /dev/null
+++ b/app-misc/mtoolsfm/files/mtoolsfm.c.diff
@@ -0,0 +1,62 @@
+--- src/mtoolsfm.c 2001-08-27 08:45:25.000000000 +0200
++++ src/mtoolsfm.c.1 2003-07-04 20:24:03.000000000 +0200
+@@ -85,6 +85,10 @@
+ char *homedir;
+ int debug=0;
+
++char *leftpath = "";
++char *rightpath = "";
++int sidecount=0;
++
+ /* should a configuration file ~/.mtoolsfm be written in user's homedir ? */
+ #ifdef DEFAULT_NOSAVE
+ int nosave=1;
+@@ -652,6 +656,7 @@
+ char *nextposition;
+ unsigned int path_length=50;
+ unsigned int path_add=50;
++ sidecount++;
+
+ if (debug) {
+ printf ("In gethdpath()\n");
+@@ -660,11 +665,19 @@
+ clearpath (whichside);
+ errno = 0;
+ path = malloc (path_length * sizeof (char));
++ if (sidecount == 1 && strlen(leftpath) != 0) {
++ strcpy(path, leftpath);
++ }
++ else if (sidecount == 2 && strlen(rightpath) != 0) {
++ strcpy(path, rightpath);
++ }
++ else {
+ while ((!getcwd (path, path_length - 2)) && (errno == ERANGE))
+ {
+ if (debug) printf(" getcwd buffer resize: errno=%d, path_length=%d, path=%s\n",errno,path_length,path);
+ path = g_realloc (path, (path_length+=path_add) * sizeof (char));
+ }
++ }
+ strcat (path, "/");
+ if (debug)
+ printf (" path: %s\n", path);
+@@ -2920,6 +2933,20 @@
+ debug = 1;
+ else if (!strcmp (argv[i], "--debug"))
+ debug = 1;
++ else if (!strncmp (argv[i], "--leftpath", 10)) {
++ leftpath = strchr(argv[i], '=');
++ if(leftpath) {
++ *leftpath = 0;
++ leftpath++;
++ }
++ }
++ else if (!strncmp (argv[i], "--rightpath", 11)) {
++ rightpath = strchr(argv[i], '=');
++ if(rightpath) {
++ *rightpath = 0;
++ rightpath++;
++ }
++ }
+ else if (!strcmp (argv[i], "--help")) {
+ g_print ("\n%s%s\n%s%s%s\n",ABOUTMTOOLSFM_1,ABOUTMTOOLSFM_2,
+ MTOOLSFMOPTIONS_1,CONFFILE,MTOOLSFMOPTIONS_2);