Deleted Added
full compact
sh.hist.c (59243) sh.hist.c (61524)
1/* $Header: /src/pub/tcsh/sh.hist.c,v 3.26 1999/02/06 15:01:23 christos Exp $ */
1/* $Header: /src/pub/tcsh/sh.hist.c,v 3.27 2000/06/10 22:07:56 kim Exp $ */
2/*
3 * sh.hist.c: Shell history expansions and substitutions
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

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

31 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
32 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
33 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
34 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
35 * SUCH DAMAGE.
36 */
37#include "sh.h"
38
2/*
3 * sh.hist.c: Shell history expansions and substitutions
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

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

31 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
32 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
33 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
34 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
35 * SUCH DAMAGE.
36 */
37#include "sh.h"
38
39RCSID("$Id: sh.hist.c,v 3.26 1999/02/06 15:01:23 christos Exp $")
39RCSID("$Id: sh.hist.c,v 3.27 2000/06/10 22:07:56 kim Exp $")
40
41#include "tc.h"
42
43extern bool histvalid;
44extern Char histline[];
45Char HistLit = 0;
46
47static bool heq __P((struct wordent *, struct wordent *));

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

371 (void) xsnprintf(buf, bufsiz, "%6d", hp->Hnum);
372 break;
373 case 'R':
374 if (HistLit && hp->histline)
375 (void) xsnprintf(buf, bufsiz, "%S", hp->histline);
376 else {
377 Char ibuf[INBUFSIZE], *ip;
378 char *p;
40
41#include "tc.h"
42
43extern bool histvalid;
44extern Char histline[];
45Char HistLit = 0;
46
47static bool heq __P((struct wordent *, struct wordent *));

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

371 (void) xsnprintf(buf, bufsiz, "%6d", hp->Hnum);
372 break;
373 case 'R':
374 if (HistLit && hp->histline)
375 (void) xsnprintf(buf, bufsiz, "%S", hp->histline);
376 else {
377 Char ibuf[INBUFSIZE], *ip;
378 char *p;
379 (void) sprlex(ibuf, sizeof(ibuf), &hp->Hlex);
379 (void) sprlex(ibuf, sizeof(ibuf) / sizeof(Char), &hp->Hlex);
380 for (p = buf, ip = ibuf; (*p++ = (CHAR & *ip++)) != '\0'; )
381 continue;
382 }
383 break;
384 default:
385 buf[0] = '\0';
386 break;
387 }

--- 90 unchanged lines hidden ---
380 for (p = buf, ip = ibuf; (*p++ = (CHAR & *ip++)) != '\0'; )
381 continue;
382 }
383 break;
384 default:
385 buf[0] = '\0';
386 break;
387 }

--- 90 unchanged lines hidden ---