Deleted Added
full compact
tw.comp.c (167466) tw.comp.c (195609)
1/* $Header: /p/tcsh/cvsroot/tcsh/tw.comp.c,v 1.41 2006/03/02 18:46:45 christos Exp $ */
1/* $Header: /p/tcsh/cvsroot/tcsh/tw.comp.c,v 1.42 2007/10/01 21:52:00 christos Exp $ */
2/*
3 * tw.comp.c: File completion builtin
4 */
5/*-
6 * Copyright (c) 1980, 1991 The Regents of the University of California.
7 * All rights reserved.
8 *
9 * Redistribution and use in source and binary forms, with or without

--- 17 unchanged lines hidden (view full) ---

27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 */
33#include "sh.h"
34
2/*
3 * tw.comp.c: File completion builtin
4 */
5/*-
6 * Copyright (c) 1980, 1991 The Regents of the University of California.
7 * All rights reserved.
8 *
9 * Redistribution and use in source and binary forms, with or without

--- 17 unchanged lines hidden (view full) ---

27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 */
33#include "sh.h"
34
35RCSID("$tcsh: tw.comp.c,v 1.41 2006/03/02 18:46:45 christos Exp $")
35RCSID("$tcsh: tw.comp.c,v 1.42 2007/10/01 21:52:00 christos Exp $")
36
37#include "tw.h"
38#include "ed.h"
39#include "tc.h"
40
41/* #define TDEBUG */
42struct varent completions;
43

--- 581 unchanged lines hidden (view full) ---

625 }
626 if (cmd == 'c')
627 *word += n;
628 break;
629
630 default:
631 abort(); /* Cannot happen */
632 }
36
37#include "tw.h"
38#include "ed.h"
39#include "tc.h"
40
41/* #define TDEBUG */
42struct varent completions;
43

--- 581 unchanged lines hidden (view full) ---

625 }
626 if (cmd == 'c')
627 *word += n;
628 break;
629
630 default:
631 abort(); /* Cannot happen */
632 }
633 tsetenv(STRCOMMAND_LINE, line);
633 res = tw_result(com, pat);
634 res = tw_result(com, pat);
635 Unsetenv(STRCOMMAND_LINE);
634 cleanup_until(buf);
635 return res;
636 }
637 cleanup_until(buf);
638 *suf = '\0';
639 return TW_ZERO;
640} /* end tw_complete */
636 cleanup_until(buf);
637 return res;
638 }
639 cleanup_until(buf);
640 *suf = '\0';
641 return TW_ZERO;
642} /* end tw_complete */