Deleted Added
full compact
tc.func.c (100616) tc.func.c (131962)
1/* $Header: /src/pub/tcsh/tc.func.c,v 3.105 2002/07/12 13:16:18 christos Exp $ */
1/* $Header: /src/pub/tcsh/tc.func.c,v 3.107 2003/05/16 18:10:29 christos Exp $ */
2/*
3 * tc.func.c: New tcsh builtins.
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 * tc.func.c: New tcsh builtins.
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("$Id: tc.func.c,v 3.105 2002/07/12 13:16:18 christos Exp $")
35RCSID("$Id: tc.func.c,v 3.107 2003/05/16 18:10:29 christos Exp $")
36
37#include "ed.h"
38#include "ed.defns.h" /* for the function names */
39#include "tw.h"
40#include "tc.h"
41#ifdef WINNT_NATIVE
42#include "nt.const.h"
43#endif /* WINNT_NATIVE */

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

684 char *prm;
685{
686 static char pass[PASSMAX + 1];
687 int fd, i;
688 signalfun_t sigint;
689
690 sigint = (signalfun_t) sigset(SIGINT, SIG_IGN);
691 (void) Rawmode(); /* Make sure, cause we want echo off */
36
37#include "ed.h"
38#include "ed.defns.h" /* for the function names */
39#include "tw.h"
40#include "tc.h"
41#ifdef WINNT_NATIVE
42#include "nt.const.h"
43#endif /* WINNT_NATIVE */

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

684 char *prm;
685{
686 static char pass[PASSMAX + 1];
687 int fd, i;
688 signalfun_t sigint;
689
690 sigint = (signalfun_t) sigset(SIGINT, SIG_IGN);
691 (void) Rawmode(); /* Make sure, cause we want echo off */
692 if ((fd = open("/dev/tty", O_RDWR)) == -1)
692 if ((fd = open("/dev/tty", O_RDWR|O_LARGEFILE)) == -1)
693 fd = SHIN;
694
695 xprintf("%s", prm); flush();
696 for (i = 0;;) {
697 if (read(fd, &pass[i], 1) < 1 || pass[i] == '\n')
698 break;
699 if (i < PASSMAX)
700 i++;

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

1754 if (v == 0)
1755 stderror(ERR_NAME | ERR_NOMATCH);
1756 }
1757 else {
1758 v = gargv = saveblk(v);
1759 trim(v);
1760 }
1761
693 fd = SHIN;
694
695 xprintf("%s", prm); flush();
696 for (i = 0;;) {
697 if (read(fd, &pass[i], 1) < 1 || pass[i] == '\n')
698 break;
699 if (i < PASSMAX)
700 i++;

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

1754 if (v == 0)
1755 stderror(ERR_NAME | ERR_NOMATCH);
1756 }
1757 else {
1758 v = gargv = saveblk(v);
1759 trim(v);
1760 }
1761
1762 if ((fd = open(tmp = short2str(*v), O_RDONLY)) < 0)
1762 if ((fd = open(tmp = short2str(*v), O_RDONLY|O_LARGEFILE)) < 0)
1763 stderror(ERR_NAME | ERR_SYSTEM, tmp, strerror(errno));
1764
1765 getexit(oldexit);
1766 if (setexit() == 0) {
1767 for (;;) {
1768 Char *p = NULL;
1769 int n = 0;
1770 lp = line;

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

2158 if ((sptr = strchr(name, ':')) != NULL)
2159 *sptr = '\0';
2160 /* Leave IPv4 address as is */
2161 /*
2162 * we use inet_addr here, not inet_aton because many systems
2163 * have not caught up yet.
2164 */
2165 addr.s_addr = inet_addr(name);
1763 stderror(ERR_NAME | ERR_SYSTEM, tmp, strerror(errno));
1764
1765 getexit(oldexit);
1766 if (setexit() == 0) {
1767 for (;;) {
1768 Char *p = NULL;
1769 int n = 0;
1770 lp = line;

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

2158 if ((sptr = strchr(name, ':')) != NULL)
2159 *sptr = '\0';
2160 /* Leave IPv4 address as is */
2161 /*
2162 * we use inet_addr here, not inet_aton because many systems
2163 * have not caught up yet.
2164 */
2165 addr.s_addr = inet_addr(name);
2166 if (addr.s_addr != (unsigned long)~0)
2166 if (addr.s_addr != (unsigned int)~0)
2167 host = name;
2168 else {
2169 if (sptr != name) {
2170#ifdef INET6
2171 char *s, *domain;
2172 char dbuf[MAXHOSTNAMELEN], cbuf[MAXHOSTNAMELEN];
2173 struct addrinfo hints, *res = NULL;
2174

--- 94 unchanged lines hidden ---
2167 host = name;
2168 else {
2169 if (sptr != name) {
2170#ifdef INET6
2171 char *s, *domain;
2172 char dbuf[MAXHOSTNAMELEN], cbuf[MAXHOSTNAMELEN];
2173 struct addrinfo hints, *res = NULL;
2174

--- 94 unchanged lines hidden ---