OSDN Git Service

* src/lharc.c (main): provisionally fix. set `get_filename_from_stdin' to false.
authorarai <arai@6a8cc165-1e22-0410-a132-eb4e3f353aba>
Sat, 18 May 2002 18:21:48 +0000 (18:21 +0000)
committerarai <arai@6a8cc165-1e22-0410-a132-eb4e3f353aba>
Sat, 18 May 2002 18:21:48 +0000 (18:21 +0000)
git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/lha/lha/trunk@53 6a8cc165-1e22-0410-a132-eb4e3f353aba

src/lharc.c

index 4be3b2b..98ef105 100644 (file)
@@ -384,7 +384,10 @@ work:
        }
        else {
                if (ac == 3 && !isatty(0)) { /* 1999.7.18 */
        }
        else {
                if (ac == 3 && !isatty(0)) { /* 1999.7.18 */
+#if !__MINGW32__ /* FIXME: Bug(?) on MinGW, isatty() return 0 on
+                    Cygwin console.  Cygwin 1.3.10(0.51/3/2) on Win2000 */
                        get_filename_from_stdin = TRUE;
                        get_filename_from_stdin = TRUE;
+#endif
                }
        }
 
                }
        }
 
@@ -405,9 +408,8 @@ work:
 
                        if (cmd_filec >= xfilec) {
                                xfilec += 256;
 
                        if (cmd_filec >= xfilec) {
                                xfilec += 256;
-                               cmd_filev = (char **) xrealloc(xfilev,
+                               xfilev = (char **) xrealloc(xfilev,
                                                   sizeof(char *) * xfilec);
                                                   sizeof(char *) * xfilec);
-                               xfilev = cmd_filev;
                        }
                        if (strlen(inpbuf) < 1)
                                continue;
                        }
                        if (strlen(inpbuf) < 1)
                                continue;