Deleted Added
full compact
1c1
< /* $Header: /p/tcsh/cvsroot/tcsh/ed.chared.c,v 3.93 2006/08/23 15:03:13 christos Exp $ */
---
> /* $Header: /p/tcsh/cvsroot/tcsh/ed.chared.c,v 3.95 2009/06/25 21:15:37 christos Exp $ */
75c75
< RCSID("$tcsh: ed.chared.c,v 3.93 2006/08/23 15:03:13 christos Exp $")
---
> RCSID("$tcsh: ed.chared.c,v 3.95 2009/06/25 21:15:37 christos Exp $")
123,124c123,124
< static void c_excl (Char *);
< static void c_substitute (void);
---
> static int c_excl (Char *);
> static int c_substitute (void);
684a685,686
> * Returns number of expansions attempted (doesn't matter whether they succeeded
> * or not).
687c689
< static void
---
> static int
691a694
> int nr_exp;
711,712c714,715
< * Count backslashes. Of odd, skip history char. Return if all done.
< * Expand if even number of backslashes.
---
> * Count backslashes. If odd, skip history char. Expand if even number of
> * backslashes.
713a717
> nr_exp = 0;
721,723c725,727
< if (p >= Cursor)
< return;
< if (i % 2 == 1)
---
> if (p >= Cursor) /* all done */
> return nr_exp;
> if (i % 2 == 1) {
724a729,730
> ++nr_exp;
> }
725a732,733
>
> return nr_exp;
729c737
< static void
---
> static int
732a741
> int nr_exp;
746c755,757
< c_excl(p);
---
> nr_exp = c_excl(p);
> else
> nr_exp = 0;
747a759,760
>
> return nr_exp;
3443a3457,3464
> /* returns the number of (attempted) expansions */
> int
> ExpandHistory(void)
> {
> *LastChar = '\0'; /* just in case */
> return c_substitute();
> }
>
3449,3450c3470
< *LastChar = '\0'; /* just in case */
< c_substitute();
---
> (void)ExpandHistory();
3460c3480
< c_substitute();
---
> (void)c_substitute();
3551c3571
< xprintf(CGETS(5, 1, "Load average unavailable\n"));
---
> xprintf("%s", CGETS(5, 1, "Load average unavailable\n"));