histedit.c (88148a071b24746d513d50d03142ac27b2827915) histedit.c (94b793c49790cdb4f945fe909c65d4c89fe71f16)
1/*-
2 * Copyright (c) 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * Kenneth Almquist.
7 *
8 * Redistribution and use in source and binary forms, with or without

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

467 error("history pattern not found: %s", str);
468 }
469 return (he.num);
470}
471
472int
473bindcmd(int argc, char **argv)
474{
1/*-
2 * Copyright (c) 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * Kenneth Almquist.
7 *
8 * Redistribution and use in source and binary forms, with or without

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

467 error("history pattern not found: %s", str);
468 }
469 return (he.num);
470}
471
472int
473bindcmd(int argc, char **argv)
474{
475 int ret;
476 FILE *old;
477 FILE *out;
475
476 if (el == NULL)
477 error("line editing is disabled");
478
479 if (el == NULL)
480 error("line editing is disabled");
478 return (el_parse(el, argc, __DECONST(const char **, argv)));
481
482 INTOFF;
483
484 out = out1fp();
485 if (out == NULL)
486 error("Out of space");
487
488 el_get(el, EL_GETFP, 1, &old);
489 el_set(el, EL_SETFP, 1, out);
490
491 ret = el_parse(el, argc, __DECONST(const char **, argv));
492
493 el_set(el, EL_SETFP, 1, old);
494
495 fclose(out);
496
497 INTON;
498
499 return ret;
479}
480
481#else
482#include "error.h"
483
484int
485histcmd(int argc, char **argv)
486{

--- 14 unchanged lines hidden ---
500}
501
502#else
503#include "error.h"
504
505int
506histcmd(int argc, char **argv)
507{

--- 14 unchanged lines hidden ---