Re: lftp = lftp-pre3.0.0-20040212 problem

2004-05-04 Thread Alexander V. Lukyanov
On Sun, May 02, 2004 at 01:36:32PM +0900, SHIOTA Shoichi wrote:
 Please commit this patch.

 $ cat AIX.patch
 --- src/StatusLine.cc.orig  2004-03-13 22:36:09 +0900
 +++ src/StatusLine.cc   2004-05-01 16:31:18 +0900
 @@ -234,6 +234,7 @@
  wpos--;  // FIXME: assumption - space width is 1
}

 +  if ((end-newstr[curr_line])  0)
write(fd,newstr[curr_line],end-newstr[curr_line]);

const char *shown_curr=(curr_line=shown.Count()?:shown[curr_line]);

Thanks! Patch applied.

--
   Alexander.


lftp = lftp-pre3.0.0-20040212 problem

2004-05-02 Thread SHIOTA Shoichi
Hi.

problem)
not use lftp (ver 3).
not return prompt (lftp or shell).

environment)
OS: AIX 5L 5.1
$ oslevel -r
5100-05
CC: gcc-3.3-20040411
$ gcc --version
gcc version 3.3.4 20040411 (prerelease)



* OK (lftp = lftp-pre3.0.0-20040205)
$ ./configure \
  --disable-largefile \
  --disable-nls \
  --enable-static \
  --with-ssl
$ gmake
$ src/lftp --version
Lftp | Version pre3.0.0-20040205 | Copyright (c) 1996-2002 Alexander V. Lukyanov
This is free software with ABSOLUTELY NO WARRANTY. See COPYING for details.
Send bug reports and questions to [EMAIL PROTECTED].
$ src/lftp
readline: warning: turning on OPOST for terminal
readline: warning: turning on OPOST for terminal
lftp :~ bye
$



* NG (lftp = lftp-pre3.0.0-20040212)
$ ./configure \
  --disable-largefile \
  --disable-nls \
  --enable-static \
  --with-ssl
$ gmake
$ src/lftp --version

(not return)
$ src/lftp

(not return)



Please commit this patch.

$ cat AIX.patch
--- src/StatusLine.cc.orig  2004-03-13 22:36:09 +0900
+++ src/StatusLine.cc   2004-05-01 16:31:18 +0900
@@ -234,6 +234,7 @@
 wpos--;  // FIXME: assumption - space width is 1
   }

+  if ((end-newstr[curr_line])  0)
   write(fd,newstr[curr_line],end-newstr[curr_line]);

   const char *shown_curr=(curr_line=shown.Count()?:shown[curr_line]);
$


test)
$ cat test.c
#include stdio.h
#include unistd.h

int main(int argc, char *argv[])
{
int fd = 1;
int size = 0;
char buff[] = write() system call test.;

#ifdef NG
size = 0;
#else
size = sizeof(buff) - 1;
#endif
write(fd, buff, size);

fprintf(stderr, \n\n\treached\n); fflush(stderr);

return 0;
}
$ cc test.c(-- cc is IBM vac.C 5.0.2.9)
$ ./a.out
write() system call test.

reached
$ cc -DNG test.c
$ ./a.out


(not display string reached. not return.)



The Open Group Base Specifications Issue 6
IEEE Std 1003.1, 2003 Edition
Copyright (c) 2001-2003 The IEEE and The Open Group,
 All Rights reserved.
 ...
 SYNOPSIS
 ...
  ssize_t write(int fildes, const void *buf, size_t nbyte);
 ...
 DESCRIPTION
 ...
 If nbyte is zero and the file is not a regular file, the results
 are unspecified.
 ...
fildes == 1 (stdout) is a regular file or not a regular file ?

---
Sorry, broken english.
I can speak Japanese only.