Mon Aug 21 21:24:51 EDT 2006  [EMAIL PROTECTED]
  * fish_pager_via_stdin
New patches:

[fish_pager_via_stdin
[EMAIL PROTECTED] {
hunk ./complete.h 56
+/**
+   Sent to the fish_pager to signify the end of input
+*/
+
+#define PAGER_EOT '\003'
+
+/**
+   Sent to the fish_pager to signify the end of input
+*/
+#define PAGER_EOT_STR L"\003"
+
hunk ./complete.h 80
+/**
+   Terminator for completions sent to the fish_pager
+*/
+#define COMPLETE_TERMINATOR L'\006'
hunk ./fish_pager.c 898
+	int in = dup( 0 );
hunk ./fish_pager.c 900
-	if( open( ttyname(0), O_WRONLY ) != 1 )
+	close(0);
+
+	if( (in = open( ttyname(2), O_RDWR )) != -1 )
hunk ./fish_pager.c 906
-			debug( 0, L"Could not set up file descriptors for pager" );
+			debug( 0, L"Could not set up output file descriptors for pager" );
+			exit( 1 );
+		}
+		
+		if( dup2( in, 0 ) == -1 )
+		{			
+			debug( 0, L"Could not set up input file descriptors for pager %d", in );
hunk ./fish_pager.c 916
+	else
+	    {
+		debug( 0, L"Could not open tty for pager" );
+		exit( 1 );
+	    }
hunk ./fish_pager.c 989
+#define BUFSIZE 1024
+void read_array( FILE* file, array_list_t *comp )
+{
+	char buffer[BUFSIZE];
+	char c;
+	int i;
+	wchar_t *wcs;
+
+	while( !feof( file ) )
+	{
+		i = 0;
+		while( i < BUFSIZE-1 )
+		{
+		    c = getc( file );
+			if( c == '\n' || c == PAGER_EOT ) 
+			{
+				    break;
+			}
+			
+			buffer[ i++ ] = c;
+		}
+		buffer[ i ] = '\0';
+
+		wcs = str2wcs( buffer );
+		if( wcs ) 
+		    {
+			al_push( comp, wcs );
+		    }
+		if( c == PAGER_EOT )
+		    {
+			break;
+		    }
+	}
+}
+
hunk ./fish_pager.c 1031
-	init();
-	
hunk ./fish_pager.c 1044
-		for( i=3; i<argc; i++ )
-		{
-			wchar_t *wcs = str2wcs( argv[i] );
-			if( wcs )
+	    if( argc > 3 )
+         	{
+		    for( i=3; i<argc; i++ )
hunk ./fish_pager.c 1048
-				al_push( comp, wcs );
+			    wchar_t *wcs = str2wcs( argv[i] );
+			    if( wcs )
+				{
+				    al_push( comp, wcs );
+				}
hunk ./fish_pager.c 1055
-		
-		mangle_descriptions( comp );
-		if( wcscmp( prefix, L"-" ) == 0 )
-			join_completions( comp );
-		mangle_completions( comp, prefix );
+	    else
+		{
+		    read_array( stdin, comp );
+		}
+
+
+	    init();
+
+	    mangle_descriptions( comp );
+	    if( wcscmp( prefix, L"-" ) == 0 )
+		join_completions( comp );
+	    mangle_completions( comp, prefix );
hunk ./proc.h 48
+	/**
+	   A buffer
+	*/
+	INTERNAL_BUFFER,
+      
hunk ./proc.h 74
-	INTERNAL_EXEC.
+	INTERNAL_EXEC, INTERNAL_BUFFER
hunk ./proc.h 87
-	If the process is of type ITERNAL_BUILTIN, argv is the argument
+	If the process is of type INTERNAL_BUILTIN, argv is the argument
hunk ./proc.h 90
-	If the process is of type ITERNAL_FUNCTION, argv is the argument
+	If the process is of type INTERNAL_FUNCTION, argv is the argument
hunk ./proc.h 93
-	If the process is of type ITERNAL_BLOCK, argv has exactly one
+	If the process is of type INTERNAL_BLOCK, argv has exactly one
hunk ./proc.h 101
-		INTERNAL_BUILTIN, \c INTERNAL_FUNCTION, \c INTERNAL_BLOCK or
-		INTERNAL_EXEC
+		INTERNAL_BUILTIN, \c INTERNAL_FUNCTION, \c INTERNAL_BLOCK,
+		INTERNAL_EXEC, or INTERNAL_BUFFER
hunk ./reader.c 1488
-		wchar_t *el = escape( (wchar_t*)al_get( comp, i ),1);
+	    wchar_t *el = (wchar_t*)al_get( comp, i );
hunk ./reader.c 1490
-		free(el);
hunk ./reader.c 1491
+	sb_printf( &msg, PAGER_EOT_STR );
}

Context:

[Update french translation, thanks to Xavier Douville
[EMAIL PROTECTED] 
[Add a message to stdout in the help function describing where the help went if help opens an external browser window
[EMAIL PROTECTED] 
[Documentation correction
[EMAIL PROTECTED] 
[Check return value of del_curterm
[EMAIL PROTECTED] 
[Change null function to #define for del_curterm() - solves build problem on some BSDs.
[EMAIL PROTECTED] 
[Switch back to using -D for _POSIX_C_SOURCE and _XOPEN_SOURCE - solves build problem on Solaris 10
[EMAIL PROTECTED] 
[Update fish_pager interface, first try - this is the second patch to redo the fish_pager interface. Both this one and the previous one breaks the display of completions
[EMAIL PROTECTED] 
[Add support for buffering of input to a command, the first step to piping data to fish_pager instead of using the argument list
[EMAIL PROTECTED] 
[Make fish pager use non-universal variables as well for getting it's colors
[EMAIL PROTECTED] 
[Fix missing quote in configure.ac
[EMAIL PROTECTED] 
[Switch to using AC_DEFINE instead of using -D switces in CFLAGS for a few macros that don't need to be passed through the Makefile
[EMAIL PROTECTED] 
[Remove unneded include in Autoconf test. Thanks to Netocrat.
[EMAIL PROTECTED] 
[Always redefine del_curterm to be a no-op under bsd, seeme the double free bug can surface under ncurses as well. Thanks to Netocrat.
[EMAIL PROTECTED] 
[Comment away currently unused function to avoid warning. Thanks to Netocrat.
[EMAIL PROTECTED] 
[Do not call closedir on directories that failed to open. Avoids crash bug. Thanks to Netocrat.
[EMAIL PROTECTED] 
[Remove non-unicode character in documentation file. Thanks to Netocrat.
[EMAIL PROTECTED] 
[Rearrange includes so that config.h is always the first file to be included
[EMAIL PROTECTED] 
[Add two BSD-specific preprocessor macros to get additional prototypes. Thanks to Netocrat.
[EMAIL PROTECTED] 
[Do not use ! to negate shellscript results, this is unsupported on Solaris. Thanks to Netocrat.
[EMAIL PROTECTED] 
[Remove Solaris circular dependency in init file. Thanks to Netocrat.
[EMAIL PROTECTED] 
[Remove unneded includes in autoconf tesst and add possibly needed one. Thanks to Netocrat.
[EMAIL PROTECTED] 
[Added missing include in input_common.c, needed under FreeBSD. Thanks to Netocrat.
[EMAIL PROTECTED] 
[Added missing line continuation. Thanks to Netocrat.
[EMAIL PROTECTED] 
[Avoid circular dependency in ls autoload. Second try.
[EMAIL PROTECTED] 
[Add missing files to make uninstall
[EMAIL PROTECTED] 
[More header/autoconf fixes, improve winsize checking
[EMAIL PROTECTED] 
[Fix typo in seq.in
[EMAIL PROTECTED] 
[Use string.h not strings.h in all cases
[EMAIL PROTECTED] 
[Add SIGUSR1 as fallback if SIGIO doesn't exist
[EMAIL PROTECTED] 
[Add missing sys/select.h header needed on FreeBSD
[EMAIL PROTECTED] 
[A new faq question and some minor documentation edits
[EMAIL PROTECTED] 
[Minor edits to the spec file
[EMAIL PROTECTED] 
[Add a few missing dependencies for the spec file
[EMAIL PROTECTED] 
[Only write out titlebar message if it is of non-zero length
[EMAIL PROTECTED] 
[Tweak spec file as per suggestions from Michael Schwendt
[EMAIL PROTECTED] 
[Add posix macros in configure.ac, not in Makefile, so that they will be honored by the configure tests
[EMAIL PROTECTED] 
[Add __EXTENSIONS__ macro when under Solaris
[EMAIL PROTECTED] 
[The xpg4-path was mistyped. Fix it.
[EMAIL PROTECTED] 
[Fix minor nit in comment
[EMAIL PROTECTED] 
[Fix another typo in common.c
[EMAIL PROTECTED] 
[Fix typo in common.c
[EMAIL PROTECTED] 
[Fix typo in signal.c
[EMAIL PROTECTED] 
[Use S_IS* macros instead of S_IF*, which are non-posix
[EMAIL PROTECTED] 
[Changes to the fish spec file, written by Paul Howarth. Fixes spelling and broken dependencies.
[EMAIL PROTECTED] 
[Make grep call in seq fallback implementation Posix compliant
[EMAIL PROTECTED] 
[Move over a few more objects to the new array_list functions
[EMAIL PROTECTED] 
[Fix bug when using same array index more than once in a single array expansion, e.g. $PATH[1 1 1]
[EMAIL PROTECTED] 
[Use the new array_list functions in exec.c
[EMAIL PROTECTED] 
[Use maxi not max in test suite when comaparing ints
[EMAIL PROTECTED] 
[Minor documentation additions
[EMAIL PROTECTED] 
[Drup minf/maxf from util.h, they are unused
[EMAIL PROTECTED] 
[Use the new array_list functions in builtin.c
[EMAIL PROTECTED] 
[Use the new array_list functions in builtin_set.c
[EMAIL PROTECTED] 
[Add long and function pointer versions of all array_list_t calls
[EMAIL PROTECTED] 
[Add _POSIX_C_SOURCE macro, to enable Posix mode of various headers. Should help under Solaris. Thanks to Netocrat for the suggestion.
[EMAIL PROTECTED] 
[Always check strings sent to tparm
[EMAIL PROTECTED] 
[Make calls to grep Posix compliant
[EMAIL PROTECTED] 
[Make PATH validation only run for interactive shells to avoid infinite loop
[EMAIL PROTECTED] 
[Add Solaris xpg4 PATH test
[EMAIL PROTECTED] 
[Make sure install-sh is executable in the Makefile
[EMAIL PROTECTED] 
[Provide fallback of killpg function
[EMAIL PROTECTED] 
[Provide fallback is struct winsize is not defined
[EMAIL PROTECTED] 
[Include siginfo.h in all signal-using files to make Solaris happy. Thanks to Netocrat for the report and a description of the solution.
[EMAIL PROTECTED] 
[TAG 1.21.10
[EMAIL PROTECTED] 
Patch bundle hash:
51cf9969d3b24167983b9cf5e6e358ed98e1bcfd
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Fish-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fish-users

Reply via email to